Skip to content

Instantly share code, notes, and snippets.

View newtriks's full-sized avatar

Simon Bailey newtriks

View GitHub Profile
'use strict';
module.exports = {
data: [{
'id': 0,
'name': '3-D Man'
}, {
'id': 1,
'name': 'A-Bomb (HAS)'
}, {
@newtriks
newtriks / gist:83205d4b07d73f22cdf68184f644444f
Last active September 10, 2016 14:25 — forked from chrissimpkins/gist:5bf5686bae86b8129bee
Atom Editor Cheat Sheet (Sweetmeat)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@newtriks
newtriks / bower.js
Created July 3, 2014 11:23
Gulp task to run bower install/update and remove dependencies.
var gulp = require('gulp');
var bower = require('bower');
var del = require('del');
var _ = require('lodash');
var deleteDeps = function (deps, cb) {
var path = bower.config.cwd + "/" + bower.config.directory;
_.each(deps, function (dep) {
del(path + "/" + dep, function (e) {});
});
@newtriks
newtriks / actionscript.sublime-build
Created July 17, 2012 18:27
SublimeText2 MXMLC compile and run buildfile
{
"cmd": ["/Users/newtriks/Library/Plugins/sdks/flex_sdk_4.6.0.23201B/bin/mxmlc",
"$file",
"-static-link-runtime-shared-libraries=true"],
"file_regex": "(.*)[(](\\d+)[)]:(?: col: (?:\\d+))? *Error: (.*)",
"selector": "source.actionscript",
"variants": [
{ "cmd": ["open ${file_path}/${file_base_name}.swf"],
"shell": true,
"name": "Run"
package net.fkasoft.wowzamod;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
@newtriks
newtriks / Gruntfile.js
Last active December 25, 2015 16:59
Gruntfile with proxy logic to connect to an API (Rails) running on a separate port over localhost.
// Generated on 2013-10-11 using generator-angular 0.4.0
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest;
// # Globbing
'use strict';
angular.module('directiveExampleApp')
.directive('albums', function() {
return {
templateUrl: 'views/templates/albums.html',
restrict: 'E',
scope: {
title: '@title'
}
'use strict';
angular.module('directiveExampleApp')
.directive('albums', function() {
return {
templateUrl: 'views/templates/albums.html',
restrict: 'E',
scope: {}
};
});
'use strict';
describe('Directive: albums', function() {
beforeEach(module('directiveExampleApp'));
var element, scope;
beforeEach(module('views/templates/albums.html'));
beforeEach(inject(function($rootScope, $compile) {
@newtriks
newtriks / generate_thumbnail.rb
Created April 3, 2013 15:53
Class to generate thumbnails for images in a dir stored in an Amazon S3 bucket.
#!/usr/bin/env ruby
###################################################
#
# Class to generate thumbnails for images in a dir
# stored in an Amazon S3 bucket.
#
# simon@newtriks.com - 10/2012
#
###################################################