Skip to content

Instantly share code, notes, and snippets.

@aliou
aliou / .gitignore
Created April 27, 2012 15:59
sinatra template app
tmp/*
@aliou
aliou / chat.rb
Created May 10, 2012 17:47 — forked from rkh/chat.rb
Simple Chat Application using the Sinatra Streaming API
# coding: utf-8
require 'sinatra'
set server: 'thin', connections: []
get '/' do
halt erb(:login) unless params[:user]
erb :chat, locals: { user: params[:user].gsub(/\W/, '') }
end
get '/stream', provides: 'text/event-stream' do
@aliou
aliou / gitsetup.sh
Created June 2, 2012 08:37
git config
echo "Set your name & email to be added to your commits, and your github authentification."
echo -n "Please enter your name: "
read git_name
echo -n "Please enter your email: "
read git_email
echo -n "Please enter your github username: "
read github_username
echo -n "Please paste your github token: "
open https://github.com/settings/admin
read github_token
@aliou
aliou / readability.js
Created June 8, 2012 14:31
Mirror of the old readability
var dbg = function(s) {
if(typeof console !== 'undefined') {
console.log("Readability: " + s);
}
};
/*
* Readability. An Arc90 Lab Experiment.
* Website: http://lab.arc90.com/experiments/readability
* Source: http://code.google.com/p/arc90labs-readability

testing.

#!/bin/bash
for f in "$@"; do
[[ "$f" != *.flac ]] && continue
album="$(metaflac --show-tag=album "$f" | sed 's/[^=]*=//')"
artist="$(metaflac --show-tag=artist "$f" | sed 's/[^=]*=//')"
date="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')"
title="$(metaflac --show-tag=title "$f" | sed 's/[^=]*=//')"
tracknumber="$(metaflac --show-tag=tracknumber "$f" | sed 's/[^=]*=//')"
CCCOLOR="\033[34m"
LINKCOLOR="\033[34;1m"
SRCCOLOR="\033[33m"
BINCOLOR="\033[37;1m"
MAKECOLOR="\033[32;1m"
ENDCOLOR="\033[0m"
<?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>
@aliou
aliou / url_encode.c
Created November 24, 2012 16:12
url_encode
/*
** main.c for osef in /exam//rendu/ex_5
**
** Made by aliou diallo
** Login <[email protected]>
**
** Started on Sat Nov 24 11:08:38 2012 aliou diallo
** Last update Sat Nov 24 11:34:57 2012 aliou diallo
*/
@aliou
aliou / hidenp_exam_02.c
Created November 24, 2012 18:21
hidenp
/*
** hidenp.c for hidenp in /exam//rendu/ex_5
**
** Made by aliou diallo
** Login <[email protected]>
**
** Started on Sat Oct 13 10:25:30 2012 aliou diallo
** Last update Sat Oct 13 11:06:32 2012 aliou diallo
*/