Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# requires https://bitbucket.org/zhemao/bitbucket-cli
for folder in `ls -1`
do
[[ -d $folder ]] && cd $folder && git init && git add . && git commit -am "Initial Commit" && bitbucket create_from_local && cd ..
done
___ ___
/ /\ /__/\
/ /::\ \ \:\
/ /:/\:\ \__\:\
/ /:/ \:\ ___ / /::\
/__/:/ \__\:\ /__/\ /:/\:\
\ \:\ / /:/ \ \:\/:/__\/
\ \:\ /:/ \ \::/
\ \:\/:/ \ \:\
\ \::/ \ \:\
@aliou
aliou / llist.c
Last active December 17, 2015 00:19
/*
** llist.c for tools in /home/diallo_e/src/projets/zappy/src/tools
**
** Made by aliou diallo
** Login <[email protected]>
**
** Started on Sun May 05 09:12:36 2013 aliou diallo
** Last update Sun May 05 09:29:49 2013 aliou diallo
*/
#!/bin/sh
while true
do
eject
done
#!/bin/sh
# https://github.com/Goles/Battery
# https://github.com/erikw/tmux-powerline/blob/master/segments/battery.sh
linux_get_bat ()
{
bf=$(cat $BAT_FULL)
bn=$(cat $BAT_NOW)
BAT=`echo "100 * $bn / $bf" | bc`
if has("win32")
if filereadable("_vimrc.win.vim")
source _vimrc.win.vim
endif
endif
if has("unix")
if system('uname')=~'Darwin'
if filereadable("vimrc.mac.vim")
source vimrc.mac.vim
endif
(* val map_reduce : int list -> int list list = <fun> *)
let map_reduce lst =
let rec partition acc = function
| 0 -> acc
| x -> partition ((x mod 10) :: acc) (x / 10)
in let rec map acc = function
| [] -> List.rev acc
| h :: tl ->
if h > 10 then map ((partition [] h) :: acc) tl
else map ((h :: [] ) :: acc) tl
@aliou
aliou / install.sh
Last active December 15, 2015 19:09
# curl -fsSL https://raw.github.com/gist/5309124 | sh
echo "Renaming current vim files."
mv ~/.vim ~/.vim-bkp 2>/dev/null
mv ~/.vimrc ~/.vimrc-bkp 2>/dev/null
mv ~/.gvimrc ~/.gvimrc-bkp 2>/dev/null
mv ~/.dotvim ~/.dotvim-bkp 2>/dev/null
echo "Downloading files. (The part where you ask Aliou to come)"
git clone https://github.com/aliou/dotvim.git ~/.dotvim
[alias]
boom = !"git push origin master && git push heroku master"
// http://unwieldy.net
var bday = new Date(1992, 11, 17, 07, 27),
ones = ['', 'one', 'two', 'three', 'four', 'five',
'six', 'seven', 'eight', 'nine'],
tens = ['', '', 'twenty', 'thirty', 'forty', 'fifty', 'sixty',
'seventy', 'eighty', 'ninety'];
var days = (new Date() - bday) / 1000 / 60 / 60 / 24,
hours = days % 24 % 365.25;