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
$(document).bind("ajax:before", function() { | |
console.log("ajax:before"); | |
}) | |
$(document).bind("ajax:beforeSend", function() { | |
console.log("ajax:beforeSend"); | |
}) | |
$(document).bind("ajax:success", function() { |
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
=begin | |
Jekyll tag to include Markdown text from _includes directory preprocessing with Liquid. | |
Usage: | |
{% markdown <filename> %} | |
Dependency: | |
- kramdown | |
=end | |
module Jekyll | |
class MarkdownTag < Liquid::Tag | |
def initialize(tag_name, text, tokens) |
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
pizzas = ["3 PODERES","CALABRESA EPECIAL","CAMARÃO AO ALHO PORÃ","CATUMARÃO","CHARGE","CHOCOLATE COM BANANA","CHOCOLATE COM MORANGO","FRANGO XADREZ","LINGUIÃA BEBADA","LINGUIÃA MINEIRA","MARCUS ANTONIUS","MARGUERITA DO CHEFF","NERO","PATRICIUS","PEPPERONI ESPECIAL","PRESTÃGIO","ROAST BEEF","ROMEU E JULIETA","SONHO DE VALSA","VEGETARIANA","ABACAXI","ABACAXI DO CHEFF","ADRIÃTICA","ALHO E ÃLEO","ALICHE","ATUM","AVE CESAR","BACON","BANANA","BRASILIENSE","BRUTUS","CALABRESA","CALIFÃRNIA","CALÃGULA","CAMARÃO","CESAR","CHESTER","CINCO QUEIJOS","CLAÃDIA","CLEÃPATRA","COLISEU","ESCAROLA","ESCAROLA DO CHEFF","ESPÃRTACO","FRANGO","CATUPIRY","IBÃRICA","JÃLIOS","LAMPIÃO & MARIA BONITA","LOMBO CANADENSE","MARGUERITA","MEDITERRÃNEA","MILHO","MUSSARELA","NAPOLITANA","OTÃVIO AUGUSTO","PALMITO","PAULISTA","PEITO DE PERU","POMPEIUS","PORTUGUESA","PRESUNTO","QUATRO QUEJOS","ROMA","TIBÃRIUS","TITUS FLAVIUS"] | |
pizzas.sample 2 |
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
# dropbox service | |
DROPBOX_USERS="user1" | |
start() { | |
echo "Starting dropbox..." | |
for dbuser in $DROPBOX_USERS; do | |
start-stop-daemon -b -o -c $dbuser -S -x /home/$dbuser/.dropbox-dist/dropboxd | |
done | |
} | |
stop() { |
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
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
sudo gem install bundler --no-ri --no-rdoc | |
echo "Done." |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
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
mi = <<HEHE | |
<select name="industryChooser" id="industryChooser-lookingProfileForm"><option value="" selected="">-</option><option value="47" class="corp fin">Accounting</option><option value="94" class="man tech tran">Airlines/Aviation</option><option value="120" class="leg org">Alternative Dispute Resolution</option><option value="125" class="hlth">Alternative Medicine</option><option value="127" class="art med">Animation</option><option value="19" class="good">Apparel & Fashion</option><option value="50" class="cons">Architecture & Planning</option><option value="111" class="art med rec">Arts and Crafts</option><option value="53" class="man">Automotive</option><option value="52" class="gov man">Aviation & Aerospace</option><option value="41" class="fin">Banking</option><option value="12" class="gov hlth tech">Biotechnology</option><option value="36" class="med rec">Broadcast Media</option><option value="49" class="cons">Building Materials</option><option value="138" class="corp man">Business Su |
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
<%= form_for [:event, new_comment] do |f| %> | |
<%= f.text_area :comment %> | |
<%= f.submit "Comentar" %> | |
<% 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
#e is the Event.first | |
#I just can't understand whats going on... | |
#first date is Sat, 01 Jan | |
#after saving it becomes Sun, 31 Dec | |
#after re-retrieving the same record its Fri, 31 Dec | |
#WHATS GOING ON HERE?! | |
irb(main):088:0> date = Date.civil(01,01,01) | |
=> Sat, 01 Jan 0001 | |
irb(main):090:0> e.start_at = date |
NewerOlder