View monitor.rb
gem 'mechanize', '2.7.2' | |
require 'mechanize' | |
require 'pony' | |
def sendmail(to, subject, body) | |
Pony.mail({ | |
:to => to, | |
:via => :smtp, | |
:subject => subject, | |
:body => body, |
View gist:1071044
# Based on: | |
# http://casperfabricius.com/site/2008/09/21/keeping-git-repositories-on-dreamhost-using-ssh/ | |
# https://gist.github.com/108398 | |
DREAMGIT_DOMAIN=user@domain.com | |
GIT_DOMAIN=git_server | |
DH_USER=home/user | |
# set up on the server | |
ssh $DREAMGIT_DOMAIN 'mkdir -p '$GIT_DOMAIN'/'$1'.git && cd '$GIT_DOMAIN'/'$1'.git && git --bare init' |
View mysql_to_sqlite.sh
#!/bin/bash | |
if [ "x$1" == "x" ]; then | |
echo "First: mysqldump -u root -p --compatible=ansi --skip-opt database > dumpfile" | |
echo "Usage: $0 <dumpfile>" | |
exit | |
fi | |
cat $1 | | |
grep -v ' KEY "' | |
View gist:1314898
Cargo: Motorista. | |
Exigências do trabalho: Competência profissional em condução de veículos leves como carros e pesados como ônibus e caminhões, ônibus articulados, bondes, metrô, tratores, escavadoras e pás carregadoras, e tanques pesados atualmente em uso pelos países da OTAN. | |
Habilidades em Rali e de condução extremas são obrigatórios! | |
Experiência na Fórmula-1 é um diferencial. | |
Conhecimento e experiência em reparação de motores de pistão e rotor, transmissões automáticas e manuais, sistemas de ignição, computador de bordo, ABS, ABD, GPS e sistemas de áudio automotivo dos fabricantes conhecidos mundialmente – obrigatória! | |
Experiência em tarefas de pintura e funilaria de automóveis é um diferencial. |
View gist:2495308
# lock icon positions in dock | |
defaults write com.apple.dock contents-immutable -bool true | |
# add recent applications in dock | |
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }' | |
killall Dock | |
# set extension to screenshots | |
defaults write com.apple.screencapture type jpg |
View Preferences.sublime-settings
{ | |
"auto_completecommiton_tab": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme", | |
"font_face": "Meslo LG S Regular for Powerline", | |
"font_size": 17.0, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"open_files_in_new_window": false, | |
"rulers": |
View quiz3.js
// 1. How many times are the following loop bodies repeated? | |
// What is the printout of each loop? (3 points) | |
// a. | |
var i = 1; | |
while (i < 10) | |
if (i % 2 == 0) | |
document.write( i + "<br />"); | |
// Answer: infinity loop. i will be never incremented. |
View gist:4388225
http://www.flotcharts.org/ | |
http://www.highcharts.com/ | |
http://www.jscharts.com/ | |
http://oesmith.github.com/morris.js/ | |
http://raphaeljs.com/ | |
http://g.raphaeljs.com/ | |
http://www.rgraph.net/examples/ | |
http://code.shutterstock.com/rickshaw/ | |
http://xaviershay.github.com/tufte-graph/ |
View gist:4482539
{ | |
// esse é o arquivo de configurações do sublime | |
// ele é organizado em um formato json | |
// mais informações: | |
// http://leonardofaria.net/2012/12/31/configurando-o-sublime-text-2 | |
// http://simplesideias.com.br/configurando-o-sublime-text-2 | |
// configurações visuais | |
"theme": "Soda Light.sublime-theme", |
View ducknorris.zsh-theme
# ducknorris custom theme | |
# FreeAgent puts the powerline style in zsh ! | |
if [ "$POWERLINE_DATE_FORMAT" = "" ]; then | |
POWERLINE_DATE_FORMAT=%D{%Y-%m-%d} | |
fi | |
if [ "$POWERLINE_RIGHT_B" = "" ]; then | |
POWERLINE_RIGHT_B=%D{%H:%M:%S} | |
elif [ "$POWERLINE_RIGHT_B" = "none" ]; then |
OlderNewer