Skip to content

Instantly share code, notes, and snippets.

View jmeridth's full-sized avatar
:shipit:
coding

Jason Meridth jmeridth

:shipit:
coding
View GitHub Profile
@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:[email protected]/httpAuth/action.html?add2Queue=bt2"
puts "Run CI build for application"
# avoid check of self signed-certificates
@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 / 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 / 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 / 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 / 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_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 / reinstall_rvm_1.9.2
Created November 2, 2010 05:33
rvm packages oneliner install
rvm package install readline && rvm package install iconv && rvm package install zlib && rvm package install openssl && rvm install 1.9.2 --with-readline-dir=$rvm_path/usr --with-iconv-dir=$rvm_path/usr --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr
@jmeridth
jmeridth / zip_tasks.rb
Created December 3, 2010 03:17
rake zip task vs albacore zip task
# BY HAND
def create_zip(filename, root, excludes=/^$/)
root = root + "/" if root[root.length - 1].chr != "/"
Zip::ZipFile.open(filename, Zip::ZipFile::CREATE) do |zip|
Find.find(root) do |path|
next if path =~ excludes
zip_path = path.gsub(root, '')
zip.add(zip_path, path)
end
@jmeridth
jmeridth / assembly_info_error.txt
Created December 8, 2010 16:33
for some reason the assembly generation loop is going one more time than expected
FIXED thanks to quick look by Derick Bailey @derickbailey. generate_assemblyinfo task needed to be a rake task and not assemblyinfo task. easy fix.
### versions.yml
files:
- OneAssemblyInfo: 1.0.0
- TwoAssemblyInfo: 2.0.0
- ThreeAssemblyInfo: 3.0.0
- FourAssemblyInfo: 4.0.0
- FiveAssemblyInfo: 5.0.0