Skip to content

Instantly share code, notes, and snippets.

@mattyod
mattyod / json-schema-version.md
Created September 3, 2012 11:11
An example of how a JSON schema version attribute might be used

For example a simple schema might be:

{
  "title": "Example",
  "description": "An example",
  "version": "0.0.1",
  "properties": {
    "things": {
      "type": "array",

"required": true,

Keybase proof

I hereby claim:

  • I am mattyod on github.
  • I am mattyod (https://keybase.io/mattyod) on keybase.
  • I have a public key ASBobkXg9MJEFKl2jLGy2q3c8AopRdhWrE796WQxMylB3Ao

To claim this, I am signing this object:

writeFile.write.args.map(arg => arg.map(file => fs.writeFileSync(`${__dirname}/../fixtures/parse/${file.fileName}.js`, file.code)));
"pack": "bash -c 'node src/$0.js > $0.json && zip $0.zip $0.json && rm -rf $0.json'",
data:text/html, <html style="font-family: sans-serif; background-color: #00171f; color:#fdfffc; padding: 20px; font-size:16px;" contenteditable>
@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
@mattyod
mattyod / jscsrc
Last active July 19, 2016 19:33
JSCS
{
"requireCamelCaseOrUpperCaseIdentifiers" : "ignoreProperties",
"requireParenthesesAroundIIFE" : true,
"requireCapitalizedConstructors" : true,
"disallowEmptyBlocks" : true,
"requireDotNotation" : true,
"requireCurlyBraces" : ["if", "else", "for", "while", "do", "try", "catch"],
"requireSpaceAfterKeywords" : ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
@mattyod
mattyod / forceFailure.js
Created October 18, 2012 12:51
Catch silent failures in Jasmine
window.onerror = function() {
var args = arguments;
describe('Test Suite:', function() {
it('May have skipped tests', function() {
expect(args).toEqual([]);
});
});
};
@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