This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRectCenter(rect) { | |
return { | |
x: rect.x + rect.width/2, | |
y: rect.y + rect.height/2 | |
}; | |
} | |
function getScreenForegroundWindow(id) { | |
var center = getRectCenter(slate.screenForRef(id).rect()); | |
return slate.windowUnderPoint(center); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Simple post-receive hook that builds a docker image and pushes it somewhere. In order for it to work | |
# you need to define your docker registry credentials in a .dockerrc file in your home directory: | |
# | |
# export DOCKER_USER=<user> | |
# export DOCKER_PASS=<password> | |
# export DOCKER_EMAIL=<email> | |
# export DOCKER_REGISTRY=<registry, e.g. tutum.co> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browser.addMockModule('inject-latency', function() { | |
angular.module('inject-latency', ['models']) | |
.config(['$provide', function($provide) { | |
$provide.decorator('api', function($delegate) { | |
return $delegate({ | |
transformParams: function(params) { | |
params.latency = true; | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'); | |
var AsyncEventEmitter = require('async-eventemitter'); | |
var propertyPath = require('property-path'); | |
var _ = require('lodash'); | |
var debug = require('debug')('weo:hooks'); | |
/** | |
* Mimics backbone events api with pre and post modifiers | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('chttp', []) | |
.factory('chttp', ['$http', function($http) { | |
/* | |
Allow a url to be passed instead of an object, since its | |
by far the most common use-case | |
*/ | |
function normalize(config) { | |
if('string' === typeof config) | |
return {url: config}; | |
return config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
save = true | |
prefix = /home/andrew/.npm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your settings in the file "User/Preferences.sublime-settings", which | |
// overrides the settings in here. | |
// | |
// Settings may also be placed in file type specific options files, for | |
// example, in Packages/Python/Python.sublime-settings for python files. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["ctrl+q"], "command": "exit" }, | |
{ "keys": ["ctrl+shift+n"], "command": "new_window" }, | |
{ "keys": ["ctrl+shift+w"], "command": "close_window" }, | |
{ "keys": ["ctrl+o"], "command": "prompt_open_file" }, | |
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" }, | |
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} }, | |
{ "keys": ["ctrl+n"], "command": "new_file" }, | |
{ "keys": ["ctrl+s"], "command": "save" }, |