For best results, use hub and git bash completion (included with git under contrib/completion
).
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
defaults write com.macromates.textmate OakDefaultLanguage E00B62AC-6B1C-11D9-9B1F-000D93589AF6 |
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
// Create a simple top to bottom linear gradient with a background-color backup | |
// The first argument, $color will be output as background-color: $color | |
// | |
// This yields a gradient that is 5% brighter on the top and 5% darker on the bottom | |
// | |
// +gradient-bg(#777) | |
// | |
// This yeilds a gradient where the bright and dark colors are shifted 10% from the original color. | |
// If you don't specify a third argument it will assign this value for the darkness too, keeping the gradient even. | |
// |
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
=gradient-bg($color, $top: 5, $bottom: $top) | |
@if $top < 0 and $bottom < 0 | |
$color1: darken($color, abs($top)) | |
$color2: lighten($color, abs($bottom)) | |
+linear-gradient(color-stops($color1, $color2)) | |
@else | |
$color1: lighten($color, abs($top)) | |
$color2: darken($color, abs($bottom)) | |
+linear-gradient(color-stops($color1, $color2)) | |
background-color: $color |
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 | |
# Daemon script for running ifs_notify | |
# The script can start, stop and check status of ifs_notify | |
pwd = Dir.getwd | |
file = pwd + "/ifs_notify" | |
pidfile = "../var/ifs_notify.pid" | |
# Starting ifs_notify |
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
var date = new Date(); | |
var offset = date.getTimezoneOffset(); | |
$.cookie('tzoffset', offset, { path: '/' }) | |
/** | |
* Add age-based class name | |
*/ | |
$this.find('p.date .timestamp').each(function() { | |
var el = $(this), |
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
use Warden::Manager do |config| | |
config.default_strategies :basic | |
config.failure_app = ErrorsController.action(:unauthenticated) | |
end | |
Warden::Strategies.add :basic, HttpAuthBasicStrategy do |config| | |
config.realm = "Welcome!" | |
config.callback do |env, username, password| | |
return username if username == 'rob' | |
false |
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 | |
status = DATA.flock(File::LOCK_EX | File::LOCK_NB) | |
if status == 0 | |
puts "we have the lock..." | |
sleep | |
else |
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 | |
# Daemon script for running ifs_notify | |
# The script can start, stop and check status of ifs_notify | |
pwd = Dir.getwd | |
file = pwd + "/ifs_notify" | |
pidfile = "../var/ifs_notify.pid" | |
# Starting ifs_notify |
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
if ENV['RAILS_ENV'] && !defined?(RAILS_ENV) | |
Object.const_set("RAILS_ENV", ENV['RAILS_ENV']) | |
end | |
# Require any additional compass plugins here. | |
require 'grid-coordinates' | |
require 'compass-fancybox-plugin' | |
require 'susy' | |
project_type = :rails |