Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'rubygems'
require 'active_support'
require 'yaml'
require 'fileutils'
require 'pathname'
RootPath = Pathname.new('/Volumes/space/github_mirror')
GithubInfo = YAML.load_file(RootPath.join('the_parts_horror.yml'))
begin
require 'flog'
require 'flay'
require 'reek/rake_task'
namespace :quality do
desc "Analyze for code complexity"
task :flog do
flog = Flog.new :methods => true
flog.flog ['app', 'lib']
--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn-?[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
--regex-clojure=/\([ \t]*definline[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/i,inline/
--regex-clojure=/\([ \t]*defmulti[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/a,multimethod definition/
--regex-clojure=/\([ \t]*defmethod[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/b,multimethod instance/
--regex-clojure=/\([ \t]*defonce[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/c,definition (once)/
#!/usr/bin/env ruby
require 'rubygems'
require 'active_support'
require 'yaml'
require 'fileutils'
require 'pathname'
RootPath = Pathname.new('/Volumes/space/github_mirror')
GithubInfo = YAML.load_file(RootPath.join('the_parts_horror.yml'))
require 'pp'
require 'irb/completion'
IRB.conf[:AUTO_INDENT] = true
IRB.conf[:VERBOSE] = true
begin
require 'rubygems'
require 'wirble'
---
:benchmark: false
:verbose: true
:update_sources: true
gem: --no-rdoc --no-ri
install: --env-shebang
:sources:
- http://gems.rubyforge.org
- http://gems.github.com
:backtrace: false
#!/usr/bin/env ruby
require 'fileutils'
require 'pp'
include FileUtils
FileUtils.mkdir_p('images') unless File.exist?('images')
FileUtils.rm_rf('dribbble.html') if File.exist?('dribbble.html')
FileUtils.rm_rf('dribbble.rss') if File.exist?('dribbble.rss')
FileUtils.rm_rf('download_me.txt') if File.exist?('download_me.txt')
@spicycode
spicycode / README.md
Created June 21, 2011 01:59
Yelly the Yellingist Formatter there ever was

YELLY!!!!! THE YELLINGIST FORMATTER EVER!!!!!

Yelly likes to yell. To make the magic happen for simple cases just invoke him ala:

bundle exec rspec --require=yelly_the_yellingist_formatter.rb --format=YellyTheYellingistFormatter spec/models/your_file_here_spec.rb

In closing, >:O

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@spicycode
spicycode / extract.sh
Created October 28, 2011 00:53
extract.sh
function extract {
echo Extracting $1 ...
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) rar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;