Skip to content

Instantly share code, notes, and snippets.

View jedahan's full-sized avatar
💀
.

Jonathan Dahan jedahan

💀
.
View GitHub Profile
@remy
remy / gist:350433
Created March 31, 2010 14:58
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
#!/bin/zsh
# Copyleft 2010 paradoxxxzero All wrongs reserved
# With contribution from James Ahlborn
# https://gist.github.com/752727
# Fork of https://gist.github.com/586698 by nicoulaj / dingram / roylzuo ...
# From http://www.zsh.org/mla/users/2010/msg00692.html
# Token types styles.
# See http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
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
@aalvarado
aalvarado / reabase-on-upstream
Created September 29, 2011 16:39
bashscript for rebasing on upstream master.
#!/bin/sh
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
current_branch=$(parse_git_branch)
if [[ -n "$current_branch" ]]; then
git fetch -v upstream
git checkout master

HNTR

hntr is a realtime collaborative hunting list that helps you prepare for the oncoming winter.

Let's say Prometheus and Bob have a shopping list for their brand new cave. They both hunt in different jungles, and have a common set of supplies needed for the winter:

  • impala meat
  • flint
<?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>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
@sax
sax / gist:3113693
Created July 14, 2012 22:24
set up basic zone in SmartOS within VirtualBox
## Set up SmartOS in VirtualBox
# http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
# set up global zone with Joyent datasets
if [[ ! -e /var/db/imgadm/sources.list || `grep -v "https://datasets.joyent.com/datasets" /var/db/imgadm/sources.list` ]]; then
echo "https://datasets.joyent.com/datasets" >> /var/db/imgadm/sources.list
fi
imgadm update
@SeanTAllen
SeanTAllen / gist:3790659
Created September 26, 2012 21:21
The many things I ended up bookmarking at StrangeLoop 2012
Many of these are from Strangeloop talks and tweets, I can't promise all are as it was a fast paced mess (if anyone cares, these are in reverse order):
I found this last night: blueprints graph db adapter for datomic:
https://github.com/datablend/blueprints/tree/master/blueprints-datomic-graph
The Boundary crew continue building great things & sharing their experience via excellent blogging:
http://boundary.com/blog/2012/09/26/incuriosity-killed-the-infrastructur/
Disruptor Workshop Materials:
http://mechanitis.blogspot.com/2012/09/strangeloop-disruptor-workshop-materials.html
@amycheng
amycheng / shellcommands.sh
Last active January 1, 2016 11:19
Useful Shell commands because I always have to google them!
# copy folders from remote to local
# use '/' for absolute directories
scp -r /path/to/source /path/to/destination
scp -r source login@address:/destination
# delete folder and files within that folder
rm -rf -- <dir-to-remove>
@imba3r
imba3r / twitcher.py
Created October 18, 2014 11:20
Dmenu for twitch.tv (for use with livestreamer)
#!/usr/bin/env python
#-------------------------------------------------
# file: twitcher.py
# author: Florian Ehmke
# description: dmenu for twitch streams
#-------------------------------------------------
import argparse
import requests
from subprocess import Popen, PIPE, STDOUT