This gist is part of a blog post. Check it out at here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################### 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Songs</title> | |
<style> | |
line.link { | |
stroke:#eee; | |
} | |
text { | |
fill:#888; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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> |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode 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, |
OlderNewer