Skip to content

Instantly share code, notes, and snippets.

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@h3ssan
h3ssan / JetBrains trial reset.md
Last active May 2, 2024 09:23
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 2, 2024 09:23
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@taskylizard
taskylizard / fmhy.md
Last active May 2, 2024 09:21
/r/freemediaheckyeah, in one single file (view raw)
@guicattani
guicattani / befunge.rb
Last active May 2, 2024 09:19
Ruby interpreter for Esoteric Language Befunge https://en.wikipedia.org/wiki/Befunge
def interpret(code)
Befunge.new(code).interpret
end
class Array
def second
self[1]
end
def second=(val)
@phred
phred / unserialize.php
Created September 7, 2011 19:04
Simple reliable and non-regex method to unserialize PHP session data
//
// This is the result of about an hour's delving into PHP's hairy-ass serialization internals.
// PHP provides a session_decode function, however, it's only useful for setting the contents of
// $_SESSION. Say, for instance, you want to decode the session strings that PHP stores in its
// session files -- session_decode gets you nowhere.
//
// There are a bunch of nasty little solutions on the manual page[1] that use pretty hairy regular
// expressions to get the job done, but I found a simple way to use PHP's unserialize and recurse
// through the string extracting all of the serialized bits along the way.
//
@chepsi
chepsi / gist:2f83b85bbcab08bbc35feba158fd43b2
Created April 23, 2024 09:33
Android254 Canvas Logo.
@Composable
fun InstagramLogo() {
Canvas(
modifier = Modifier
.size(200.dp)
.clip(RoundedCornerShape(10.dp))
) {
val width = size.width
val height = size.height
drawRoundRect(brush = InstaGradient)
@diogocapela
diogocapela / moment-js-timezones.txt
Created September 7, 2018 00:10
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@ZhekaiJin
ZhekaiJin / hierarchical_mutex.hpp
Created July 11, 2018 09:09
hierarchical_mutex
#include <iostream>
#include <thread>
#include <mutex>
#include <climits>
class hierarchical_mutex {
std::mutex internal_mutex;
unsigned long const hierarchy_value;
unsigned long previous_hierarchy_value;
static thread_local unsigned long this_thread_hierarchy_value;