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/bash | |
# Checkout vendor repo | |
echo "Cloning brianreavis/selectize.js github repo into tmp_vendor" | |
git clone https://github.com/brianreavis/selectize.js.git tmp_vendor | |
# Copy files | |
echo "Copying selectize.js" | |
mkdir -p app/assets/javascripts/vendor/selectize/ | |
cp tmp_vendor/dist/js/standalone/selectize.js app/assets/javascripts/vendor/selectize/selectize.js |
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 'rubygems' | |
require 'twitter' | |
auth = Twitter::HTTPAuth.new 'planeta_spfc', 'xxxxxxxxxxx' | |
base = Twitter::Base.new auth | |
base.followers.select { |f| !f.following }.each do |f| | |
begin | |
base.friendship_create f.id | |
rescue |
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
!!! XML | |
!!! | |
%html | |
%head | |
%title | |
= javascript_include_merged :base | |
= stylesheet_link_merged :base | |
%body= yield |
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
# Quick Markdown to HTML Conversion Script | |
# http://blog.rubyhead.com/2010/05/05/quick-markdown-to-html-conversion-script | |
require 'rubygems' | |
require 'bluecloth' | |
source_file = $*[0] | |
output_file = $*[1] | |
content = File.read(source_file) |
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
# Autotest specs with Watchr | |
# http://bjhess.com/blog/2010/2/23/setting_up_watchr_and_rails/ | |
# Run me with: | |
# $ watchr specs.watchr | |
ENV["WATCHR"] = "1" | |
system 'clear' | |
def growl(message) |
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
# Time stamp file names for backups or archives | |
# http://www.24hourapps.com/2009/02/linux-tips-8-time-stamp-file-names-for.html | |
# When doing simply backups (non-incremental) it is useful to be able to automatically | |
# time stamp or date stamp file names. This makes archives much easier to navigate when | |
# it comes time to retrieve a backup. | |
# The command for doing this is quite simple. To just create a file with a time stamped file name, | |
# use the following command: |
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
# Find recently modified files | |
# http://www.24hourapps.com/2009/02/linux-tips-9-find-recently-modified.html | |
# Back when I was developing at a company where no version control systems were used and CSV | |
# was the pain it still is now, going without a system at all was preferable than trying to | |
# get a working CSV system. However as expected I often find my self unable to find some code | |
# that has been overridden by a college and would find it difficult to locate the files he had | |
# changed. | |
# Luckily find, the Linux command, is quite powerful and can show you a list of all recently |
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
# Execute a ruby script from Gist | |
ruby -e "$(curl http://gist.github.com/raw/323731/install_homebrew.rb)" |
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 "openssl" | |
require "net/smtp" | |
Net::SMTP.class_eval do | |
private | |
def do_start(helodomain, user, secret, authtype) | |
raise IOError, 'SMTP session already started' if @started | |
#check_auth_args user, secret, authtype if user or secret | |
check_auth_args user, secret, authtype # Mudei esta linha, incluindo o authtype |
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
# Copy directory from remote server using SCP | |
scp -r username@host:/var/www . |