Skip to content

Instantly share code, notes, and snippets.

View auscompgeek's full-sized avatar

David Vo auscompgeek

View GitHub Profile
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@ttscoff
ttscoff / marky.rb
Created June 20, 2012 17:02
Ruby script for interfacing with Marky the Markdonwifier
#!/usr/bin/env ruby
require 'open-uri'
require 'net/http'
require 'iconv'
require 'optparse'
require 'fileutils'
require 'cgi'
$options = {}
@myano
myano / irc_games.md
Last active March 20, 2024 11:07
This is a list of games that are playable on IRC.

List of on-IRC games

AlphaChat

  • #multirpg

BakaShiMoe

# Go-style enums in Python
#
# Implementation is here, scroll down for usage.
#
import operator
class LazyValue(object):
def __init__(self, value):
@aras-p
aras-p / preprocessor_fun.h
Last active June 21, 2024 12:20
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,
@XVilka
XVilka / TrueColour.md
Last active June 27, 2024 11:24
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@maxteufel
maxteufel / Security of cloaks.md
Last active July 2, 2024 02:28
About the security of (unaffiliated) cloaks on freenode

Copyright (c) 2014, 2016, 2017 M. Teufel

Unlimited redistribution and modification of this document is allowed provided that the above copyright notice and this permission notice remains in tact.


If you are reading this, you probably asked for a (unaffiliated) cloak on freenode because you wanted to hide your IP or hostname.

This text is here to tell you that cloaks and vHosts don't hide your IP very well. Cloaks on freenode show your (lack of) affiliation with a project or a group being hosted on freenode.

@jaimergp
jaimergp / config-highlight.cfg
Last active May 27, 2024 12:16
Dark highlighting theme for Python IDLE based on SublimeText's Monokai color scheme
# Place this file inside your ~/.idlerc/ folder
# or paste its contents inside
# /path/to/python/idlelib/config-highlight.def
# Adapted from SublimeText's Monokai
[monokai]
normal-foreground= #F8F8F2
normal-background= #272822
keyword-foreground= #F92672
keyword-background= #272822
import re
def decode(x):
return re.sub("%[0-9A-F][0-9A-F]", lambda x: chr(int(x.group(0)[1:], 16)) , x, flags=re.I, count=100)
def eq(a, b):
if a != b:
print (a, "!=", b)
@boneskull
boneskull / bookmarks.md
Last active June 4, 2021 19:39
How to use Mercurial bookmarks

How to Use Mercurial Bookmarks

Note: This document is specific to the FocusVision development environment, however it's mostly applicable elsewhere.

by Christopher Hiller

Mercurial branches are not "cheap". Unlike Git, to create or destroy a branch, you actually have to commit a changeset to the repository. Branches are great for…something…but whatever that is, we're not doing it.

Enter Bookmarks.