Skip to content

Instantly share code, notes, and snippets.

@digitalpardoe
digitalpardoe / spidermonkey-1.7.0-osx.diff
Created December 28, 2011 23:08
Patches SpiderMonkey 1.7.0 to ensure compilation on OS X & to enable 'make install'.
--- src/jsprf.c.orig 2009-07-26 12:32:01.000000000 -0700
+++ src/jsprf.c 2009-07-26 12:33:12.000000000 -0700
@@ -58,6 +58,8 @@
*/
#ifdef HAVE_VA_COPY
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
+#elif defined(va_copy)
+#define VARARGS_ASSIGN(foo, bar) va_copy(foo,bar)
#elif defined(HAVE_VA_LIST_AS_ARRAY)
#define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
@kristoferjoseph
kristoferjoseph / Monokai.dvtcolortheme
Created March 4, 2012 18:33
Molokai theme for XCode4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.995968 0.995968 0.995968 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Consolas-Bold - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.995968 0.995968 0.995968 1</string>
@chendo
chendo / docstrings.rb
Created March 21, 2012 11:31
Python-like docstrings in Ruby!
class DocStrings
def docstrings!
"""
This is a docstring that's syntactically valid!
It'll do multiple lines!
"""
end
def single_line_docstring
"""Single line docstring!"""
@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
#
@schlamar
schlamar / processify.py
Last active March 12, 2025 19:37
processify
import os
import sys
import traceback
from functools import wraps
from multiprocessing import Process, Queue
def processify(func):
'''Decorator to run a function as a process.
Be sure that every argument and the return value
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ecin
ecin / phantomjs_facebook.js
Created April 23, 2012 21:06
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@paulmillr
paulmillr / active.md
Last active April 24, 2025 10:07
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 5, 2025 22:11
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bfontaine
bfontaine / LICENSE.txt
Created July 6, 2012 21:59 — forked from 140bytes/LICENSE.txt
140byt.es -- shuffleArray (92B)
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright © 2011 Baptiste Fontaine bfontaine.net
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE