This file contains hidden or 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 | |
# Merges the current branch into the specified branch after checking out that branch. | |
# Usage: | |
# git merge-into [branch] | |
# [branch] defaults to "master" if not specified | |
# "sprint" is my convenience library for handling external processes. |
This file contains hidden or 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
require 'fileutils' | |
include FileUtils | |
require 'pathname' | |
namespace :paperclip do | |
desc "Remove Paperclip attachment directories with no entity" | |
task :gc => :environment do | |
current_trash = ((Pathname.new trash) + (Pathname.new Time.now.strftime("%Y-%m-%d.%H:%M:%S"))).cleanpath | |
# This algorithm assumes that the attachments have a :path starting with "#{IMAGES_ROOT}/[class name]/:attachment/:id/" | |
# This matches my setup, but may not match yours. |
This file contains hidden or 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
#!/bin/ruby | |
require 'fileutils' | |
files = Dir['*.sql'] | |
files.each do |file| | |
p file | |
typestring = `file #{file}` | |
if !typestring.include? "ASCII" | |
output = `iconv -f UCS-2 -t UTF-8 #{file}` | |
File.open(file, "w") do |f| |
This file contains hidden or 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
//---- SASS ---- | |
// common code | |
=column_size(!size, !padding=1%) | |
width = !size - !padding | |
padding: | |
right = !padding | |
=equal_width_columns(!count) |
This file contains hidden or 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
tell application "Terminal" | |
activate | |
do script with command "cd ~/my/development/directory" | |
do script with command "cd ~/my/development/directory && mate ." | |
do script with command "cd ~/my/development/directory && script/server" | |
do script with command "cd ~/my/development/directory && script/console" | |
do script with command "cd ~/my/development/directory && autotest" | |
end tell |
NewerOlder