Skip to content

Instantly share code, notes, and snippets.

View jacqui's full-sized avatar

Jacqui Lough jacqui

View GitHub Profile
@bleything
bleything / homedir.rake
Created January 2, 2013 00:32
Stick this in your homedir repo. Run rake. Watch in amazement as it symlinks everything.
require 'find'
BLACKLIST = %w[
.git
.gitignore
Rakefile
]
task :default do
Find.find('.') do |path|
# In development mode, optionally perform a RubyProf profile of any request.
# Simply pass perform_profile=true in your params.
def perform_profile
return yield unless params[:perform_profile]
require 'ruby-prof'
RubyProf.start
yield
result = RubyProf.stop
printer = RubyProf::FlatPrinter.new(result)
File.open("#{Rails.root}/tmp/profile.txt", 'w+') do |f|
require 'rubygems'
fetcher = Gem::SpecFetcher.fetcher
my_dep = 'activesupport'
# 1st arg = all (true to get all versions, false to get latest)
# 2nd arg = prerelase (true to get pre-release gems, false to get stable)
all_gems = fetcher.list(false, false)
if Rails.env.development?
around_filter :perform_profile
end
# In development mode, optionally perform a RubyProf profile of any request.
# Simply pass perform_profile=true in your params.
def perform_profile
return yield unless params[:perform_profile]
require 'ruby-prof'
RubyProf.start
@mbbx6spp
mbbx6spp / .vimrc
Created August 31, 2010 20:57
Start configuration for vim for new shell accounts. this starter config depends on the following Vim plugins: rails, pathogen, vimchat, sessionman, bufexplorer, fuzzy finder, NERDTree, gist. Primary development languages: Erlang, Haskell, Ruby, Zsh scrip
" Author: Susan Potter
" Using ~/.vim/supo as placeholder initialization VimScripts location.
" Didn't want to use ~/.vim/init in case init had or starts to have special meaning for Vim plugins or loading.
source $HOME/.vim/supo/global.vim
source $HOME/.vim/supo/functions.vim
@malev
malev / README.md
Last active August 29, 2015 14:08
Convert CSV files into HTML

CSV to HTML (cli)

Just run:

$ ruby csvtohtml.rb data.csv > table.html

You can customize the table's id, table's classes, header's classes and field's classes. You can also use linux pipes and it's only one small file long with NO dependencies.

Pseudo installation (not needed)