Skip to content

Instantly share code, notes, and snippets.

View thevirtualforge's full-sized avatar

The Virtual Forge thevirtualforge

View GitHub Profile
@thevirtualforge
thevirtualforge / .editorconfig
Created February 28, 2016 19:02
Standard .editorconfig file to help enforce code standards
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@thevirtualforge
thevirtualforge / .jsbeautifyrc
Last active March 8, 2017 21:50
JS-Beautify config to aid enforcement of VF Javascript style guidelines
{
"indent_size": 4,
"indent_char": " ",
"eol": "\n",
"indent_level": 0,
"indent_with_tabs": false,
"preserve_newlines": true,
"max_preserve_newlines": 10,
"jslint_happy": false,
"space_after_anon_function": false,
@thevirtualforge
thevirtualforge / js_cheat_sheet.md
Last active February 28, 2016 19:09
VF Javascript cheatsheet

General

@thevirtualforge
thevirtualforge / gulpfile.js
Created February 11, 2016 12:09 — forked from Falconerd/gulpfile.js
Gulp + Watchify + Babelify + BrowserSync
/**
* This gulpfile will copy static libraries and a index.html file as well as
* merge, babelify and uglify the rest of the javascript project.
*
* TODO:
* - Separate media, libs and src with different watchers.
* - Media and libs should only be copied to dist if they are different sizes.
*
* The expected project is to be laid out as such:
*
@thevirtualforge
thevirtualforge / build.sh
Created February 5, 2016 15:57
Appcelerator Titanium build script. Uses Jason Kneen's tich (https://github.com/jasonkneen/TiCh) to switch tiapp.xml "profiles" on the fly (requires profiles named "ios" & "android").
#!/bin/bash
command -v tich >/dev/null 2>&1 || { echo >&2 "I require tich but it's not installed. Please run '[sudo] npm install -g tich'. Aborting."; exit 1; }
command -v appc >/dev/null 2>&1 || { echo >&2 "I require appc but it's not installed. Please run '[sudo] npm install -g appcelerator'. Aborting."; exit 1; }
HELP="Usage: ./build.sh ios|android prod|test|device|emu|help [device-id]"
# Exit if no args passed and display help message
if [ $# -eq 0 ]; then
echo >&2 $HELP
exit 2