Skip to content

Instantly share code, notes, and snippets.

Vagrant.configure("2") do |config|
#provider blocks
config.vm.provider :virtualbox do |config, override|
override.vm.box = "opscode-ubuntu-12.04"
override.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box"
config.vm.network :private_network, ip: "192.168.56.10"
config.customize ["modifyvm", :id, "--memory", 512]
end
@mattyod
mattyod / launch-selenium
Last active December 30, 2015 00:09
launch selenium
java -jar /usr/local/opt/selenium-server-standalone/selenium-server-standalone-2.37.0.jar -p 4444
@mattyod
mattyod / unused.js
Created July 15, 2013 12:22
Unused variables.
renderList: function (model /*, res, options*/) {
// do something with model but not res or options
}
@mattyod
mattyod / postcodes
Created July 9, 2013 13:24
UK post code regex
With Santander UK
(GIR( ?)0AA)|(^(?![QVX])[A-Z]((?![IJZ])[A-Z]?)[0-9][0-9]?[A-HJKSTUW]?)( ?)[0-9](?![CIKMOV])[A-Z]{2}$
Without Santander UK
(^(?![QVX])[A-Z]((?![IJZ])[A-Z]?)[0-9][0-9]?[A-HJKSTUW]?)( ?)[0-9](?![CIKMOV])[A-Z]{2}$
@mattyod
mattyod / fireGet
Created June 9, 2013 22:18
Fire a GET request.
new Image().src = 1;
@mattyod
mattyod / functionalFolly
Created May 19, 2013 21:54
Functional folly
var x, // Give me a value for it to be twoo
method = function (callback) {
callback();
};
var twoo = function () {
console.log('twoo');
};
var fawlse = function () {
@mattyod
mattyod / arguments
Created April 17, 2013 20:55
f'kin with arguments
function args() {
if (!arguments['0']['2']) {
arguments['0']['2'] = arguments['0']['1'];
}
return arguments;
}
function wrap() {
@mattyod
mattyod / default.jade
Created March 22, 2013 14:42
Quick and dirty Jade template example for drmarkpowell
doctype html
head
link(rel='stylesheet', href='css/screen.css')
html
body
article
header
h1 My Schema
span.container {
each property, name in properties
@mattyod
mattyod / gist:4266995
Last active March 29, 2017 12:39
Sublime key bindings
[
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+v"], "command": "paste_and_indent" }
{ "keys": ["super+shift+r"], "command": "refresh_folder_list" }
]
@mattyod
mattyod / user-settings
Last active March 8, 2017 22:31
Sublime Text user settings
{
"show_full_path": true,
"rulers": [80],
"ensure_newline_at_eof_on_save": true,
"translate_tabs_to_spaces": true,
"draw_minimap_border": true,
"draw_white_space": "all",
"scroll_past_end": true,
"tab_size": 2,
"trim_trailing_white_space_on_save": true