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 December 20, 2010 19:49
git jira regex and issue existence pre-receive hook
require 'rubygems'
require 'savon'
require 'grit'
jira_address = "http://host:8080"
jira_username= "user"
jira_password = "password"
repo = Grit::Repo.new(".")
while (input = STDIN.read) != ''
@jmeridth
jmeridth / wcf_handle_bad_proxy_call.cs
Created December 29, 2010 16:19
wcf finally block to ensure channel is aborted
//example:
Service<IProxyInterface>.Use(service => service.MyAwesomeMethodCall());
//code:
public static class Service<T>
{
public static ChannelFactory<T> _channelFactory = new ChannelFactory<T>("");
public static void Use(Action<T> block)
{
@jmeridth
jmeridth / BootStrapper.cs
Created January 6, 2011 16:41
bootstrapping structuremap and log4net
using System;
using System.IO;
using log4net;
using log4net.Config;
using StructureMap;
namespace Common.Infrastructure
{
public static class BootStrapper
{
@jmeridth
jmeridth / gist:797123
Created January 26, 2011 18:02
get_min_max_count.rb
get '/:min/:max/:count' do |min, max, count|
defaults = {"count" => 10, "min" => 1, "max" => 100}
%w(count min max).each do |i|
default = defaults[i]
value = eval(i)
value = default if value.length > 5
value = Integer(value) rescue default
eval "#{i} = #{value}"
end
@jmeridth
jmeridth / gist:800658
Created January 28, 2011 18:01
force_team_city_build.rb
# figure out your teamcity build url via help from http://bit.ly/dAFVO3
# make sure you install curl.exe from http://bit.ly/dT7Ove
url="http://user:password@host/httpAuth/action.html?add2Queue=bt#
system("C:\\curl.exe --insecure #{url} > NUL")
@jmeridth
jmeridth / gist:833943
Created February 18, 2011 16:37
uritempalte_querystring_error.txt
The UriTemplate '/blah/search?{key}={value}' is not valid; each portion of the query string must be of the form 'name' or of the form 'name=value', where name is a simple literal. See the documentation for UriTemplate for more details.
@jmeridth
jmeridth / .gitignore
Created March 29, 2011 20:55
gitignore file for C# project
~
build/
[Bb]in
[Dd]ebug*/
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult
[Bb]uild[Ll]og.*
*.swp
@jmeridth
jmeridth / gitsetup.txt
Last active September 25, 2015 11:58
the commands I run just after installing Git (autocrlf false)
git config --global user.name username
git config --global user.email myemailaddress@work.com
git config --global core.whitespace cr-at-eol
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
git config --global push.default tracking
git config --global branch.autosetuprebase always
git config --global help.autocorrect 1
git config --global core.autocrlf false
#!/bin/bash
if [[ "$#" == 0 ]]; then
echo "Missing SHA1 arguments"
echo "usage: sh ./generate_marketing_zip.sh 389fc55 8dcdc7b b2048e0 304a791"
exit 1
fi
git archive -o ZipPrefix-`date +%Y%m%d`.zip HEAD $(git show --pretty="format:" --name-only $*)
echo "zip created successfully"
CCTray 1.6
http://sourceforge.net/projects/ccnet/files/CruiseControl.NET%20Releases/CruiseControl.NET%201.6/CruiseControl.NET-CCTray-1.6.7981.1-Setup.exe/download
Custom HTTP URL
<TeamCity server>/guestAuth/app/cctray-standalone/cctray/projects.xml