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 | |
# encoding: utf-8 | |
COLORS_ENABLED = TRUE | |
VALID_TASKS = { | |
"TODO" => /TODO[\s,:]+(\S.*)$/, | |
"FIXME" => /FIX ?ME[\s,:]+(\S.*)$/, | |
"CHANGED" => /CHANGED[\s,:]+(\S.*)$/, | |
"NOTE" => /NOTE[\s,:]+(\S.*)$/ |
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
class String | |
def humanize | |
self.split(/[-_]/).map {|w| w.capitalize }.join(' ') | |
end | |
end |
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 | |
# Version (0.79) | |
# Created by Artem Titoulenko ([email protected]) | |
# clock in application. I'm tired of counting. | |
# C.rb -- Time keeping script. | |
# Call with no params to clock in/out | |
# Params: | |
# ? : are you clocked in? check | |
# log : peek at the work log |
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
" -OS-Check--------------------------------------------------------------------- | |
function! MySys() | |
if has("win32") | |
return "win32" | |
elseif has("mac") || has("macunix") | |
return "mac" | |
elseif has("unix") | |
return "unix" | |
else | |
return "unix" |
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 bash | |
# This is an RVM Project .rvmrc file, used to automatically load the ruby | |
# development environment upon cd'ing into the directory | |
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional. | |
environment_id="ruby-1.9.2-p136" | |
# | |
# First we attempt to load the desired environment directly from the environment |
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 | |
# NOTES: | |
# - This script only works on OS X. | |
# - This script was only tested with ruby 1.9.2 using | |
# the aaronh-chronic gem. If the chronic gem is used | |
# instead, this script will not work (unless the chronic | |
# gem was updated to work with ruby 1.9.2). | |
require 'rubygems' |
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
/*********************************************************************** | |
* Little script to make all the files under a certain directory safe. * | |
* Works only on Mac OS X. Tested on 10.5 and 10.6 * | |
* * | |
* Written by bojo (Bo Johansson) in a comment on Mac OS X Hint: * | |
* http://hints.macworld.com/article.php?story=20071029151619619 * | |
***********************************************************************/ | |
/* Compile by | |
* gcc -O2 -Wall removexattr.c -o removexattr |
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 | |
# This Script is a wrapper for the mate command. | |
# IT'S NOT A SUBSTITUTE! | |
# If you want to pipe to Textmate from the terminal, | |
# use the mate command instead. | |
# Also, its slower than the mate command, so if you don't | |
# mind typing a couple extra characters, but do mind one extra | |
# second of waiting at most, then use the mate command. |
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 | |
# check if a command exists | |
def command_exists?(command) | |
system("which #{command} > /dev/null 2>/dev/null") | |
$?.exitstatus == 0 | |
end | |
def usage | |
usage = "Usage: extract [-vz] <file> [<file> <file> ..]\n\n" |
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
<?php | |
/** | |
* Toggle the formatting of unix permissions between: | |
* - 0644 OR 755 | |
* - -rw-r--r-- | |
* | |
* @param string|int $permissions : The permissions string or int that needs to be formatted. | |
* @param string $is_dir : if true, the first char of the long permissions format will be 'd'. ie: drw-r--r-- | |
* @return string: The formatted permissions. |