Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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