Skip to content

Instantly share code, notes, and snippets.

# SED dicas
# http://aurelio.net/sed/sed-dicas.txt
# 20000524 <verde (a) aurelio net>
# aceita várias substituições, separadas por ponto-e-vírgula ou ENTER
sed 's/uqe/que/; s/qeu/que/; s/euq/que/'
# ou
sed 's/uqe/que/
# 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)
# http://wiki.github.com/dchelimsky/rspec/custom-matchers
# http://rspec.rubyforge.org/rspec/1.2.2/classes/Spec/Matchers.html
# pg 252
# http://github.com/joshknowles/rspec-on-rails-matchers/blob/master/lib/spec/rails/matchers/views.rb
Spec::Matchers.define :have_link_to do |href|
match do |response|
extend Webrat::Matchers
have_selector('a', :href => href).matches? response
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
if RUBY_VERSION > "1.8.6"
check_auth_args user, secret if user or secret
#!/bin/bash
echo "Automated VPS Setup for Ubuntu 10.04 LTS (Lucid) - Rails with Nginx"
echo "------------------------------------------------------------------"
echo "------------------------------------------------------------------"
echo "------------------------------------------------------------------"
echo "------------------------------------------------------------------"
echo "------------------------------------------------------------------"
echo "------------------------------------------------------------------"
echo "------------------------------------------------------------------"
#!/bin/sh
# http://www.macosxhints.com/article.php?story=20030620102036392
for X in `ps acx | grep -i $1 | awk {'print $1'}`; do
kill $X;
done
#!/usr/bin/env ruby
#
# Put this script in your PATH and download from onemanga.com like this:
# onemanga_downloader.rb Bleach [chapter number]
#
# You will find the downloaded chapters under $HOME/Documents/OneManga/Bleach
#
# If you run this script without arguments, it will check your local manga downloads
# and check if there are any new chapters
#
//compass-960-plugin 0.9.13
$ninesixty-gutter-width: 20px !default;
$ninesixty-grid-width: 960px !default;
$ninesixty-columns: 12 !default;
@mixin grid-container {
margin-left: auto;
margin-right: auto;
width: $ninesixty-grid-width;
/*
* Release: 1.3.1 2009-04-26
*/
/*
* Copyright (c) Andr?e Hansson (peolanha AT gmail DOT com)
* MIT License - http://www.opensource.org/licenses/mit-license.php
* Idea loosely based on JASH, http://billyreisinger.com/jash/
*
* Website: http://gridder.andreehansson.se/
*