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 'git' | |
require 'logger' | |
g = Git.open(Dir.pwd) | |
if ARGV.include?("-h") || ARGV.include?("--help") | |
puts <<-EOF | |
USAGE: git bump [options] |
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
set_color() { | |
local HEX_FG=$1 | |
local HEX_BG=$2 | |
local OPACITY=$3 | |
local FG_R=`echo $HEX_FG | sed 's/../0x&,/g' | awk -F "," '{printf("%d",$1 * 257)}'` | |
local FG_G=`echo $HEX_FG | sed 's/../0x&,/g' | awk -F "," '{printf("%d",$2 * 257)}'` | |
local FG_B=`echo $HEX_FG | sed 's/../0x&,/g' | awk -F "," '{printf("%d",$3 * 257)}'` | |
local BG_R=`echo $HEX_BG | sed 's/../0x&,/g' | awk -F "," '{printf("%d",$1 * 257)}'` | |
local BG_G=`echo $HEX_BG | sed 's/../0x&,/g' | awk -F "," '{printf("%d",$2 * 257)}'` |
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
require 'rubygems' | |
require 'mail' | |
require 'pivotal_tracker' | |
require 'git' | |
class Pivotal | |
attr_reader :story, :project |
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
SQL (0.1ms) BEGIN | |
Issue Load (0.1ms) SELECT `issues`.* FROM `issues` WHERE (`issues`.`resolution` IS NULL) AND (`issues`.`description` = '') AND (`issues`.`name` = 'something') ORDER BY start_at DESC LIMIT 1 | |
SQL (0.2ms) SELECT COUNT(*) AS count_id FROM `comments` | |
SQL (18.6ms) INSERT INTO `comments` (`body`, `commentable_id`, `commentable_type`, `created_at`, `updated_at`, `user_id`) VALUES ('Duplicate attempted to open', 3370, 'Issue', '2010-11-03 14:36:12', '2010-11-03 14:36:12', 1) | |
SQL (47.5ms) ROLLBACK |
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
class OperatingSystem < ActiveRecord::Base | |
belongs_to :host | |
def self.search(term) | |
t = OperatingSystem.arel_table | |
match_on = [:name,:version,:service_pack] | |
matches = match_on.map {|m| "IF(#{t[m].matches("%#{term}%").to_sql},operating_systems.#{m.to_s},NULL)" } | |
matching_string = "CONCAT_WS(' ', #{matches.join(",")}) as matched_on" |
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
class Host < ActiveRecord::Base | |
has_one :operating_system | |
attr_accessor :matched_on | |
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
Rails.application.config.session_store :cookie_store, { | |
:domain => '.rails.local', | |
:key => '_sso_session' | |
} | |
Rails.application.config.secret_token = 'the same really long hex string' |
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
Rails.application.config.session_store :cookie_store, { | |
:domain => '.rails.local', | |
:key => '_sso_session', | |
:secret => 'the same really long hex string' | |
} |
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
config.action_controller.session = { | |
:domain => ".rails.local" | |
} |
NewerOlder