This file contains hidden or 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
| function rebasei { | |
| branch_name="$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1 /')" | |
| echo "Currently on $branch_name" | |
| git checkout master | |
| git pull origin master | |
| git checkout $branch_name | |
| git rebase -i master | |
| } | |
| function finishrebase { |
This file contains hidden or 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
| # REBASE | |
| #!/bin/bash | |
| if [ $# -eq 1 ] | |
| then | |
| git checkout master && git pull origin master && git checkout $1 && git rebase -i master | |
| else | |
| echo 'Please provide a feature branch: ./rebase.sh feature1324' | |
| fi |
This file contains hidden or 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 Employee | |
| attr_reader :name | |
| attr_accessor :sickDaysUsed | |
| attr_accessor :vacationDaysUsed | |
| def initialize(name) | |
| @name = name | |
| @sickDaysUsed = 0 | |
| @vacationDaysUsed = 0 | |
| end | |
| def addSickDaysUsed(sickDaysUsed) |
This file contains hidden or 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 ‘ruby.visitor’ | |
| describe EmployeePaycheckVisitor do | |
| before do | |
| @visitor = EmployeePaycheckVisitor.new | |
| end | |
| it “should generate hourly report for hourly employee” do | |
| @jason = HourlyEmployee.new(“Jason”, 55.00) | |
| @jason.addHoursWorked(120) | |
| @jason.addSickDaysUsed(1) | |
| @jason.addVacationDaysUsed(2) |
This file contains hidden or 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
| using System; | |
| using System.Text; | |
| namespace visitor.pattern | |
| { | |
| public abstract class Employee | |
| { | |
| protected int totalSickDaysUsed; | |
| protected int totalVacationDaysUsed; | |
| public abstract void accept(EmployeePaycheckVisitor visitor); | |
| public void addSickDaysUsed(int numberOfDays) |
This file contains hidden or 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
| using NUnit.Framework; | |
| using NUnit.Framework.SyntaxHelpers; | |
| namespace visitor.pattern.specs | |
| { | |
| [TestFixture] | |
| public class when_calculating_a_hourly_employees_wages | |
| { | |
| private HourlyEmployee jacob; | |
| private EmployeePaycheckVisitor employeePaycheckVisitor; | |
| [Test] |
This file contains hidden or 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
| Host github.com | |
| HostName github.com | |
| User git | |
| IdentityFile ~/.ssh/id_rsa | |
| Host github-blah | |
| HostName github.com | |
| User git | |
| IdentityFile ~/.ssh/id_rsa_blah |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| #!/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" |
This file contains hidden or 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
| 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 |