Skip to content

Instantly share code, notes, and snippets.

Tom Marshall tommarshall

  • Wokingham, UK
Block or report user

Report or block tommarshall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tommarshall
tommarshall / gist:9376724
Created Mar 5, 2014
git checkout ambiguous reference example
View gist:9376724
$ git checkout v1.5.1
warning: refname 'v1.5.1' is ambiguous.
Switched to branch 'v1.5.1'
$ git --version
git version 1.8.3.4 (Apple Git-47)
View Keeping password out of nightwatch test specs
// tests/update-contact.js
auth_creds = require('./auth_creds.json');
module.exports = {
setUp : function(browser) {
browser
.url("http://example.com")
.waitForElementVisible("body", 1000)
@tommarshall
tommarshall / simple_form.rb
Created Aug 22, 2013 — forked from clyfe/simple_form.rb
Bootstrap3 compatible simple_form initializer (with consistent Bootstrap 3 classes)
View simple_form.rb
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class
# https://github.com/plataformatec/simple_form/issues/316
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
@tommarshall
tommarshall / Gettext.tmLanguage
Created Jul 23, 2013
Textmate's gettext syntax highlighting, with an updated regex which does show blank lines as block red. https://github.com/textmate/gettext.tmbundle/blob/master/Syntaxes/Gettext.tmLanguage
View Gettext.tmLanguage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>
TODO: Command for copy original to untranslated, label as fuzzy, remove fuzzy, next fuzzy etc
Create meta scope for each entry
</string>
<key>fileTypes</key>
@tommarshall
tommarshall / nationalInsurance.js
Created Jul 16, 2013
JavaScript utility function for calculating UK national insurance contribution (2013).
View nationalInsurance.js
/* =============================================================================
# UK National Insurance 2013 calculator utility function
#
# If you’re employed
# You pay Class 1 National Insurance contributions. The rates are:
#
# 12% on your yearly earnings between £7748 and £41444
# 2% on any yearly earnings over £7748
#
# 12% on your weekly earnings between £149 and £797
You can’t perform that action at this time.