Skip to content

Instantly share code, notes, and snippets.

View freireag's full-sized avatar

Thiago Freire freireag

View GitHub Profile
@freireag
freireag / .vimrc
Created October 11, 2011 13:34 — forked from j0k3r/.vimrc
.vimrc
"--------------------------------------------------------------------
"
" NiLuJe's ViM Configuration File
"
" Highly inspired from Ciaran McCreesh's config
"
" (http://ciaranm.org/vimrc)
"
" $Id$
"
#!/usr/bin/env ruby -w
# Create a default gitignore file in the passed directory
#
# AUTHOR: Daniel Lopes
# September 10, 2009
#
# USAGE:
# git-ignore . "aditional_file1 aditional_file2"
require 'pathname'
server "shawshank", :app
namespace :list do
task :labs do
run "ls -l /var/www/labs.freireag.com/public"
end
task :topchart do
run "ls -l /var/www/labs.freireag.com/public/topchart_app"
end
# SUPER DARING APP TEMPLATE 1.0
# Originally By Peter Cooper
# Modified by Jason Seifer
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/Source/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
@freireag
freireag / ldap.yml
Created December 13, 2008 04:41 — forked from azisaka/ldap.yml
development:
host: 192.168.0.1
port: 389
base: dc=gaiz,dc=com,dc=br
bind_dn: cn=admin,dc=gaiz,dc=com,dc=br
password: gaiz
test:
host: 127.0.0.1
port: 389
require 'test_helper'
class ProductTest < ActiveSupport::TestCase
context "given an existing product" do
fixtures :all
should_have_db_columns :id, :name, :description, :price, :quantity
should_have_db_column :name, :type => "string", :null => false
should_have_db_column :price, :type => "decimal", :null => false, :scale => 2
should_have_db_column :quantity, :type => "integer", :default => 0, :null => false
# Copyright (c) 2008 Thiago Freire
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
http://wordpress.org/extend/themes/clockworksimple
http://wordpress.org/extend/themes/clockworkmint
http://wordpress.org/extend/themes/wheat-lite
http://wordpress.org/extend/themes/emptiness
http://wordpress.org/extend/themes/thematic
http://wordpress.org/extend/themes/defusion
http://wordpress.org/extend/themes/greymonger-theme
http://wordpress.org/extend/themes/elegance
http://wordpress.org/extend/themes/greyville
http://wordpress.org/extend/themes/8some
require 'benchmark'
def quicksort(entry, method)
return entry if entry.size <= 1
pivot = identify_pivot(entry, method)
left, right = entry.partition {|e| e < pivot}
quicksort(left, method) + [pivot] + quicksort(right, method)
end
def identify_pivot(entry, method)