Skip to content

Instantly share code, notes, and snippets.

View JoeChapman's full-sized avatar
🎯
Focusing

JoeChapman JoeChapman

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am joechapman on github.
  • I am joechapman (https://keybase.io/joechapman) on keybase.
  • I have a public key whose fingerprint is 24FB 6F32 E4B7 563D 4A23 E326 BA46 BF23 000C 73AE

To claim this, I am signing this object:

Step 1: remove all history
rm -rf .git
Step 2: reconstruct the Git repo with only the current content
git init
git add .
git commit -m "Initial commit"
@JoeChapman
JoeChapman / npmrc_proxy.txt
Created November 26, 2012 14:43
Add a proxy to npmrc
proxy=http://proxy[domain]:[port]
https_proxy=http://proxy[domain]:[port]
var spy = spyOn(obj, "method").andCallFake(function () {
return true;
});
@JoeChapman
JoeChapman / spy-andReturn.js
Created November 22, 2012 11:52
Jasmine andReturn
spy.andReturn(false);
@JoeChapman
JoeChapman / unbind-backbone-events.js
Created November 21, 2012 10:30
Unbinding Backbone events after running test suite
//.....rest of code here
afterEach(function () {
Backbone.Events.off();
});
//...rest of code here
@JoeChapman
JoeChapman / simple-command-prompt-alias.sh
Created November 10, 2012 21:37
Simple alias at command prompt
$ git config –-global alias.st status
@JoeChapman
JoeChapman / .gitconfig-alias.gitconfig
Created November 10, 2012 21:29
Simple GIT alias in .gitconfig
[alias]
st = status
ci = commit
br = branch
co = checkout
@JoeChapman
JoeChapman / mockObject.js
Created September 26, 2012 20:24
Mocking an object
mockObject = {
render: function () {},
remove: function () {}
}
@JoeChapman
JoeChapman / basicSpyCalledWith.js
Created September 26, 2012 20:15
Jasmines spy basics called with
expect(spyTrigger).toHaveBeenCalledWith("eventName", [args]);