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
#!/usr/bin/env ruby | |
require Dir | |
unless ARGV[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
blog_root = "/Users/jrk/proj/blog" |
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
# Store rake tasks specific to [company] | |
namespace :[company] do | |
# Migrate [Company]'s data into the new CRM | |
namespace :migrate do | |
require 'progressbar' | |
desc "Run all [company] migration tasks" | |
task :all => [:config, :users, :comments, :accounts] |
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
#!/usr/bin/env ruby | |
# | |
# newpost.rb new-post-title | |
# | |
# Author: Mark Nichols, 8/2011 | |
# | |
# This script automates the process of creating a new Octopress posting. | |
# 1. The Octopress rake new_post task is called passing in the posting name | |
# 2. The Octopress rake isolate taks is called to sequester all other postings in the _stash | |
# 3. The new file is opened in TextMate |
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
color_0 = ffff ffff ffff | |
color_1 = 4949 4848 3e3e | |
color_2 = 6666 d9d9 efef | |
color_3 = 6b6b c7c7 2b2b | |
color_4 = fdfd 9797 1f1f | |
color_5 = f9f9 2626 7272 | |
color_6 = 94bc 5925 ffff | |
color_7 = 7575 7171 5e5e | |
color_8 = e6e6 dbdb 7474 | |
color_9 = a6a6 e2e2 2e2e |
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
// jQuery Deparam - v0.1.0 - 6/14/2011 | |
// http://benalman.com/ | |
// Copyright (c) 2011 Ben Alman; Licensed MIT, GPL | |
(function($) { | |
// Creating an internal undef value is safer than using undefined, in case it | |
// was ever overwritten. | |
var undef; | |
// A handy reference. | |
var decode = decodeURIComponent; |
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
for f in `find . -regex '.*\.html\.erb'`; do echo "Converting $f" && html2haml $f > "${f%.erb}.haml" && rm $f; done |
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
;;; | |
;;; Blog post at http://wp.me/p12FcK-3 | |
;;; | |
;;; Loom: http://github.com/jkk/loom | |
;;; GraphViz: http://graphviz.org | |
;;; Ubigraph: http://ubietylab.net/ubigraph/ | |
;;; | |
(ns user | |
(:use [clojure.string :only [lower-case split-lines join]] |
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
#switch default editor for pry to sublime text | |
Pry.config.editor = "vim" | |
#format prompt to be <Rails version>@<ruby version>(<object>)> | |
Pry.config.prompt = proc do |obj, level, _| | |
prompt = "\e[1;30m" | |
prompt << "#{Rails.version} @ " if defined?(Rails) | |
prompt << "#{RUBY_VERSION}" | |
"#{prompt} (#{obj})>\e[0m" | |
end |
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
html, body, .container, .content { | |
height: 100%; | |
} | |
.container, .content { | |
position: relative; | |
} | |
.proper-content { | |
padding-top: 40px; /* >= navbar height */ |
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
# requires BSD sed | |
namespace :whitespace do | |
desc 'Removes trailing whitespace' | |
task :cleanup do | |
sh %{for f in `find . -type f | grep -v .git | grep -v ./vendor | grep -v ./tmp | egrep ".(rb|js|haml|html|css|sass)"`; | |
do sed -i '' 's/ *$//g' "$f"; | |
done}, {:verbose => false} | |
puts "Task cleanup done" | |
end |
OlderNewer