Skip to content

Instantly share code, notes, and snippets.

@aliou
aliou / roar.sh
Created August 19, 2011 08:00 — forked from lsegal/sane_lion_defaults.sh
Resets some defaults in Lion, namely clearing the Launchpad, showing the user Library folder and some other stuff.
#################################### Keyboard ####################################
# Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
#################################### Trackpad ####################################
# Enable tap to click on a Magic Trackpad
defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
@aliou
aliou / about.md
Last active October 1, 2015 00:28 — forked from jasonrudolph/about.md

Programming Achievements: How to Level Up as a Developer

This gist is part of a blog post. Check it out at here.

@aliou
aliou / ChromeReload.vim
Created April 12, 2012 18:31 — forked from brettbuddin/docksend.vim
Reload Google Chrome from Vim
function! ChromeReload()
let applescript = "-e \"tell application \\\"Google Chrome\\\" to tell the active tab of its first window \r
\reload \r
\end tell \r
\tell application \\\"Google Chrome\\\" to activate\""
silent exec "!osascript " . applescript
endfunction
command! ChromeReload call ChromeReload()
@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 / index.html
Created November 30, 2012 06:27 — forked from tmcw/index.html
A Song Chain
<!DOCTYPE html>
<html>
<head>
<title>Songs</title>
<style>
line.link {
stroke:#eee;
}
text {
fill:#888;
@aliou
aliou / keylogger.c
Created December 12, 2012 14:06 — forked from frasten/keylogger.c
/* Compilare con:
* gcc keys.c -lX11 -o keylogger
*/
#include <X11/Xlib.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <X11/keysym.h>
@aliou
aliou / readme.md
Last active December 10, 2015 00:59 — forked from NorthIsUp/fuel.py

Nike fuel data

The config file is located at ~/.config/nike/config is formated like a regular yaml file:

access_token: xxxxxxx
deviceId: xxxxxxx
@aliou
aliou / README.md
Last active December 10, 2015 14:59 — forked from mbostock/.block
Calendar view.

This example demonstrates loading of CSV data, which is then quantized into a diverging color scale. The values are visualized as colored cells per day. Days are arranged into columns by week, then grouped by month and years. Colors by Cynthia Brewer. Layout inspired by Rick Wicklin and Robert Allison. Dow Jones historical data copyright Yahoo! Finance or independent data provider; fair use for educational purposes.

@aliou
aliou / mandrillapp_invalid_sender_characters.rb
Last active September 2, 2015 08:35 — forked from hmnhf/mandrillapp_invalid_sender_characters.rb
Mandrillapp invalid sender characters
# I was encountering this exception
# Net::SMTPServerBusy: 401 4.1.7 Bad sender address syntax
# First I searched to see if there's any documentation around this issue,
# didn't find anything, so I wrote this snippet to find those invalid characters
require 'mail'
Mail.defaults do
delivery_method :smtp, {
:port => 25,
@aliou
aliou / index.md
Last active September 8, 2015 12:46 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one