Skip to content

Instantly share code, notes, and snippets.

View jmeridth's full-sized avatar
:shipit:
pushing buttons on my keyboard

Jason Meridth jmeridth

:shipit:
pushing buttons on my keyboard
View GitHub Profile
@jmeridth
jmeridth / git_pre-receive.rb
Created October 29, 2010 21:55
git enforced commit message (windows)
require 'rubygems'
require 'soap/wsdlDriver'
require 'grit'
jira_address = "http://host:8080"
jira_username= "username"
jira_password = "password"
repo = Grit::Repo.new(".")
while (input = STDIN.read) != ''
@jmeridth
jmeridth / PS-ExectionPolicy.txt
Created September 23, 2010 18:02
powershell permissions issue, needed to set Get-ExecutionPolicy
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
File C:\Users\jasonmeridth\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signin
g" for more details.
At line:1 char:2
+ . <<<< 'C:\Users\jasonmeridth\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'
+ CategoryInfo : NotSpecified: (:) [], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
@jmeridth
jmeridth / git-post.txt
Created September 23, 2010 17:55
couldn't get posh git prompts to show
PS C:\Users\jasonmeridth> cd .\WindowsPowerShell
PS C:\Users\jasonmeridth\WindowsPowerShell> ls
Directory: C:\Users\jasonmeridth\WindowsPowerShell
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 9/23/2010 12:08 PM 5082 GitPrompt.ps1
@jmeridth
jmeridth / WindowsInstallList.txt
Created September 1, 2010 15:30
Windows Install List
Windows 7 OS
Microsoft Security Essentials
Virtual CloneDrive (to mount ISOs)
http://static.slysoft.com/SetupVirtualCloneDrive.exe
Notepad++
Visual Studio 2008 w/ SP1
Visual Studio 2010 Ultimate
ReSharper
Console2
msysgit
@jmeridth
jmeridth / move_prod_tag_to_where_staging_tag_is.txt
Created August 26, 2010 18:30
move git prod tag to where staging is
git fetch --tags
COMMIT=`git rev-parse staging`
git tag -fa -m "production" production $COMMIT
git push origin tag production
@jmeridth
jmeridth / update.rb
Created August 24, 2010 02:28
update githook
#!/usr/bin/env ruby
# Git update hook
# Policy enforcement
# Do not validate merge commits
# Commit message must be in format:
#
# 'T1234
# awesome commit message'
#
@jmeridth
jmeridth / post-receive.rb
Created August 24, 2010 02:22
teamcity post_receive git hook
#!/usr/bin/env ruby
branches_to_build = ["master","develop","release1"]
while (input = STDIN.read) != ''
rev_old, rev_new, ref = input.split(" ")
if ref =~ /#{branches_to_build.join("|")}#/
# figure out your teamcity build url via help from http://bit.ly/dAFVO3
url="https://username:password@teamcitydomain.com/httpAuth/action.html?add2Queue=bt2"
puts "Run CI build for application"
# avoid check of self signed-certificates
@jmeridth
jmeridth / .gitconfig
Created August 19, 2010 13:21
.gitconfig
[user]
name = armmer
email = um...no
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
@jmeridth
jmeridth / number_of_one_bits.py
Created July 23, 2010 16:38
get the number of one bits in a number (python)
def num_of_one_bits(num):
total = 0
bits = ""
while(num > 0):
bits += str(num&1)
total += num&1
num>>=1
return total,bits
number = input("Please give an integer: ")
@jmeridth
jmeridth / deploy.rb
Created June 21, 2010 19:08
capistrano deploy.rb
set :user, "username_on_slice"
set :domain, "mydomain.com"
set :application, "my_app_name"
default_run_options[:pty] = true
set :repository, "git@git.mydomain.com:my_app_name.git"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable: