Skip to content

Instantly share code, notes, and snippets.

@io41
io41 / hack.sh
Created April 2, 2012 07:38 — forked from erikh/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/2281433/hack.sh | sh
#
@io41
io41 / .inputrc
Created April 2, 2012 07:59 — forked from gregorynicholas/.inputrc
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
“\e[5~”: history-search-backward
“\e[6~”: history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GnuTLS configure 2.12.18, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --disable-debug --disable-dependency-tracking --disable-guile --disable-static --prefix=/usr/local/Cellar/gnutls/2.12.18 --with-libgcrypt --without-p11-kit
## --------- ##
## Platform. ##
@io41
io41 / gist:2842791
Created May 31, 2012 11:31
poker planning cards
<html>
<head>
<style type="text/css">
.card {
height: 2in;
width: 2in;
border: 0.1in solid black;
border-radius: 0.25in;
display: inline-block;
margin: 1px 1px 0 0;
From home:
Transactions: 1730 hits
Availability: 100.00 %
Elapsed time: 94.71 secs
Data transferred: 0.24 MB
Response time: 0.31 secs
Transaction rate: 18.27 trans/sec
Throughput: 0.00 MB/sec
Concurrency: 5.65
@io41
io41 / tree.md
Created January 3, 2013 11:22 — forked from hrldcpr/tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@io41
io41 / gist:6592046
Created September 17, 2013 09:23
Track dom element clicks. Tested on chrome.
var getPath = function(el) {
var path = elName = "";
var siblings, siblingId;
while(el && elName != "body") {
elName = el.nodeName.toLowerCase();
siblings = (el.parentNode)?el.parentNode.childNodes:[];
siblingId = 0;
for (var i = 0; i < siblings.length; i++) {
@io41
io41 / tts.fish
Created September 19, 2013 15:25 — forked from anonymous/tts.fish
function tts
set q $argv;
mplayer "http://translate.google.com/translate_tts?ie=UTF-8&q=$q&tl=en&textlen="(math (echo "$q" | wc -m) - 1)"idx=0&total=1&prev=input";
end

Secret Santa

Title Header

h1.title {
  color: red;
  text-shadow: 2px 2px #A00;
}
bind @browser
@io41
io41 / keybase.md
Last active October 24, 2018 14:57

Keybase proof

I hereby claim:

To claim this, I am signing this object: