Skip to content

Instantly share code, notes, and snippets.

View minikomi's full-sized avatar
🍕
I like pizza

Adam Moore minikomi

🍕
I like pizza
View GitHub Profile
@minikomi
minikomi / allstop.go
Created June 11, 2012 11:04 — forked from kylelemons/allstop.go
Using "close" to stop multiple goroutines
package main
import (
"fmt"
"sync"
)
func main() {
wg := new(sync.WaitGroup)
stop := make(chan bool)
@minikomi
minikomi / sort_count.clj
Created May 2, 2012 09:40 — forked from isa/gist:2571012
Convert in less than 30 lines
Question: Convert following into the latter data structure in less than 30 lines:
List:
A, B, C
A, C, E
E, F, D
D, A, J
E, D, J
List
@minikomi
minikomi / gist:2505719
Created April 27, 2012 04:21 — forked from j2labs/gist:2502467
abusing python functions
>>> def foo():
... foo.x = 0
... foo.total = lambda: foo.x
... def add(x):
... foo.x = foo.x + x
... return foo
... foo.add = add
...
>>> foo()
>>> foo.total()
@minikomi
minikomi / LICENSE.txt
Created March 13, 2012 09:19 — forked from 140bytes/LICENSE.txt
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
@minikomi
minikomi / gist:1892015
Created February 23, 2012 09:55 — forked from lezhangxyz/gist:1890401
ctfsh
#!/bin/sh
if [ ! -t 0 ]; then
echo >&2 'STDIN is not a terminal'
exit 1
fi
clear
cd "$(mktemp -d)"
@minikomi
minikomi / gist:1094800
Created July 20, 2011 11:34 — forked from jsmpereira/gist:1094024
Padrino pagination
#
# Adapted from http://pastebin.com/FL5KeQQH
#
# As mentioned on the link above put this on app/helpers/pagination.rb
# and you can use in your view
#
# =will_paginate @posts
#
# I'm also using this https://gist.github.com/837683
#