This file contains 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
gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
This file contains 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
body{padding:0;margin:0;font:13px Arial,Helvetica,Garuda,sans-serif;*font-size:small;*font:x-small;} | |
h1,h2,h3,h4,h5,h6,ul,li,em,strong,pre,code{padding:0;margin:0;line-height:1em;font-size:100%;font-weight:normal;font-style: normal;} | |
table{font-size:inherit;font:100%;} | |
ul{list-style:none;} | |
img{border:0;} | |
p{margin:1em 0;} |
This file contains 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
require "socket" | |
local_ip = UDPSocket.open {|s| s.connect("64.233.187.99", 1); s.addr.last} |
This file contains 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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
export HISTCONTROL=ignoredups | |
# ... and ignore same sucessive entries. |
This file contains 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
vacuumdb --full --analyze --username postgres --dbname [DBNAME] --host [HOSTNAME] | |
pg_dump [DBNAME] -Ft -v -U postgres -f tmp/[DBNAME].tar --host [HOSTNAME] | |
dropdb [DBNAME] --username postgres --host [HOSTNAME] | |
createdb --encoding UTF8 [DBNAME] --username postgres --host [HOSTNAME] --template template0 | |
pg_restore tmp/[DBNAME].tar | psql --dbname [DBNAME] --username postgres --host [HOSTNAME] | |
vacuumdb --full --analyze --username postgres --dbname [DBNAME] --host [HOSTNAME] |
This file contains 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
<%= f.select :state, [ ["Acre", "AC"], | |
["Alagoas", "AL"], | |
["Amapá", "AP"], | |
["Amazonas", "AM"], | |
["Bahia", "BA"], | |
["Ceará", "CE"], | |
["Distrito Federal", "DF"], | |
["Espírito Santo", "ES"], | |
["Goiás", "GO"], | |
["Maranhão", "MA"], |
This file contains 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
all_exceptions = [] | |
ObjectSpace.each_object(Class) do |k| | |
all_exceptions << k if k.ancestors.include?(Exception) | |
end |
This file contains 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
server_name .px2.com.br ; | |
#rewrite ^(.*)\.px2\.com\.br$ http://www.$1.com.br/ permanent; | |
if ($host ~* "^(.*)\.px2\.com\.br$"){ | |
set $subd $1; | |
rewrite ^(.*)$ http://$subd.pixelquadrado.com.br$1 permanent; | |
break; | |
} | |
if ($host = 'px2.com.br' ) { | |
rewrite ^/(.*)$ http://www.pixelquadrado.com.br/$1 permanent; | |
} |
This file contains 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
spawn-fcgi -a 127.0.0.1 -p 53217 -P /var/run/fastcgi-php.pid -- /usr/bin/php-cgi |
This file contains 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
# Put this file on config/initializer | |
# This will create an empty whitelist of attributes available for mass assignment for | |
# all models in your app. As such, your models will need to explicitly whitelist | |
# accessible parameters by using an attr_accessible declaration. This technique is best | |
# applied at the start of a new project. However, for an existing project with a thorough | |
# set of functional tests, it should be straightforward and relatively quick to insert this | |
# initializer, run your tests, and expose each attribute (via attr_accessible) as dictated | |
# by your failing tests. |
OlderNewer