Skip to content

Instantly share code, notes, and snippets.

View liamengland1's full-sized avatar
💭
I may be slow to respond.

Liam England liamengland1

💭
I may be slow to respond.
View GitHub Profile
@morgant
morgant / gist:1753095
Created February 6, 2012 16:25
Building GnuTLS on Mac OS X

Preparing the Build Environment

cd ~/Desktop
mkdir wget-build
cd wget-build

Building & Installing GMP 5.0.2

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@buritica
buritica / gist:2154326
Created March 22, 2012 00:08
Apple's .co domains
$matrix{"apple.co"} = "http://www.apple.com/?cid=oas-us-domains-apple.co";
$matrix{"itunes.co"} = "http://www.apple.com/itunes/?cid=oas-us-domains-itunes.co";
$matrix{"imac.co"} = "http://www.apple.com/imac/?cid=oas-us-domains-imac.co";
$matrix{"ipod.co"} = "http://www.apple.com/ipod/?cid=oas-us-domains-ipod.co";
$matrix{"macbook.co"} = "http://www.apple.com/macbook/?cid=oas-us-domains-macbook.co";
$matrix{"applestore.co"} = "http://store.apple.com/us?cid=oas-us-domains-applestore.co";
$matrix{"macintosh.co"} = "http://www.apple.com/mac/?cid=oas-us-domains-mac.co";
$matrix{"macintosh.cl"} = "http://www.apple.com/la/mac/?cid=oas-us-domains-macintosh.cl";
$matrix{"mobileme.co"} = "http://me.com";
$matrix{"itunesstore.co"} = "http://www.apple.com/itunes/?cid=oas-us-domains-itunesstore.co";
@lukeman
lukeman / gist:2155355
Created March 22, 2012 03:06
Apple Domains
#! /usr/bin/perl
# version 1.1
# if the host+path are in matrix then the redirect is to a single location
# if just the host is in matrix then the redirect is to host+the request uri
# nwk-productred 17.149.160.28&nbsp&amp&nbsp17.172.224.28
#
# to distibute this file us /usr/local/scr/distfilex
#
#
@jboner
jboner / latency.txt
Last active June 16, 2025 19:28
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
@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

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active June 16, 2025 07:20
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@2bj
2bj / History_19921103-hypertexthypertext_WWW_TheProject.html
Created August 8, 2012 07:46
The website of the world's first-ever web server
<HEADER>
<TITLE>The World Wide Web project</TITLE>
<NEXTID N="55">
</HEADER>
<BODY>
<H1>World Wide Web</H1>The WorldWideWeb (W3) is a wide-area<A
NAME=0 HREF="WhatIs.html">
hypermedia</A> information retrieval
initiative aiming to give universal
access to a large universe of documents.<P>
@baverman
baverman / vk-cli.py
Created September 17, 2012 20:34
Prints a downloadable url for VK video search
#!/usr/bin/env python2
import sys
import re
from urllib2 import build_opener, HTTPCookieProcessor
from urllib import urlencode
from cookielib import CookieJar
from netrc import netrc
{
"id": "e7469",
"campaign-name": "New Campaign",
"video-clicks": {
"click-thru-url": "http:\/\/www.innovid.com"
},
"theme": {
"fontLibrary": {
"fontLibrarySwfUrl": "http:\/\/cdn.innovid.com\/common\/runtime-libs\/font-packs\/flash\/defaultFontPack.swf",
"name": "English\/Latin"