Skip to content

Instantly share code, notes, and snippets.

@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
This file has been truncated, but you can view the full file.
210 hash chains, max search length 139 entries (from ('ab', 'ef')).
Average chain length 42 entries.
Average successful search length 31 entries.
Find column of first letter and row of fourth letter to get N.
If word N isn't your word, retry with the other number on line N.
ab c d ef gh ij kl mn op qr s t uv wxyz
ab 33 96 57 116 646 411 250 290 134 122 215 232 1033 462
c 572 27 12 84 3038 388 682 503 149 536 63 67 556 1893
d 391 478 1802 17 110 64 195 45 188 52 93 208 118 1238
ef 40 21 157 59 91 128 11 135 90 29 371 55 356 1475
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@zmaril
zmaril / softwarehelpskill.md
Last active August 3, 2021 04:52
I want to write software that helps kill people.

I want to write software that helps kill people.

Please, before you call the police and get my github account put on lockdown, allow me a moment to explain. What I really want to do is work on projects that advance the human condition and improve people's lives. I've been in a mad dash to learn how to program for the past four or five years exactly because I realized how much good I could do for the world with a computer.

@paulp
paulp / The Signs of Soundness
Last active June 17, 2021 06:48
The Signs of Soundness
Hello scala, my old friend
I've come to take you home again
Because a feature slowly creeping
left me plagued with doubts and weeping
and the version that was tagged in the repo
just has to go
it lacks the signs of soundness
On sleepless nights I hacked alone
applying ant and other tools of stone
@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

@puffnfresh
puffnfresh / overloading.js
Created September 6, 2012 00:55
Operator overloading in JavaScript
// This file shows a hack to achieve operator overloading in
// JavaScript. I have defined 3 different operators:
//
// >= = monadic bind
// >> = kleisli composition
// > = functor map
// * = applicative apply
// + = semigroup append
//
// Head straight to the bottom to see example usages.
@liamoc
liamoc / gist:3643591
Created September 5, 2012 19:58
Type-safe sum types in C
// needs -fnested-functions. Can be done without, but makes the whole thing a lot more cumbersome
// and less useful.
#include <stdio.h>
#define my_data_alts ( void (*A)(int) , void (*B)(int, int) , void (*C)(char, int) )
#define make_my_data(n) void n my_data_alts
typedef void (*my_data) my_data_alts;
void show(my_data match) {
@jboner
jboner / latency.txt
Last active May 6, 2024 07:06
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#