View gist:1037052
<html> | |
<head> | |
<title>Gerador de CPF, CNPJ e NIT Válidos</title> | |
<script language="javascript"> | |
function gera_random(n) { | |
var ranNum = Math.round(Math.random()*n); | |
return ranNum; | |
} | |
function mod(dividendo,divisor) { |
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 .gitconfig
[user] | |
name = Matt Di Pasquale | |
email = my@fake-email.com | |
[alias] | |
br = branch | |
ci = commit -am | |
co = checkout | |
df = diff | |
lg = log | |
ll = log -p |
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 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 error_messages_helper.rb
module ErrorMessagesHelper | |
# Render error messages for the given objects. The :message and :header_message options are allowed. | |
def error_messages_for(*objects) | |
options = objects.extract_options! | |
options[:header_message] ||= t(:"errors.template.header", model: t(:"activerecord.models.#{objects.compact.first.class.name.downcase}"), count: objects.compact.first.errors.messages.size) | |
options[:message] ||= t(:"errors.template.body") | |
messages = objects.compact.map { |o| o.errors.full_messages }.flatten | |
unless messages.empty? | |
content_tag(:div, id: "error_explanation") do | |
list_items = messages.map { |msg| content_tag(:li, msg) } |
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