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
// override the $window.open to count usage and prevent | |
// new windows from opening when running karma in watch mode | |
beforeEach(module(function ($provide) { | |
newWindow = { | |
location: {}, | |
focusCalled: false, | |
closeCount: 0, | |
focus: function () { | |
newWindow.focusCalled = 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
afterEach(function () { | |
$httpBackend.verifyNoOutstandingExpectation(); | |
$httpBackend.verifyNoOutstandingRequest(); | |
}); |
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
# list commands | |
le = log --oneline --decorate | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
ls1 = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate | |
lds = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph | |
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative |
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
/* Vertical (column) Flex Container for actions | |
-------------------------------------------------- */ | |
.fc-col { | |
display: flex; | |
flex-direction: column; | |
flex-wrap: nowrap; | |
justify-content: flex-start; | |
align-content: stretch; | |
align-items: stretch; |
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 stringFill2(x, n) { | |
var s = ''; | |
while (n-- > 0) s += x; | |
return s; | |
} |
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
#!/usr/local/bin/node | |
var cp = require('child_process'); | |
module.paths.push('/usr/local/lib/node_modules'); // hacky hacky hacky to get to async | |
var async = require('async'); | |
var getJsFiles = 'git diff --cached --name-only --diff-filter=ACM | grep ".js$"'; | |
cp.exec(getJsFiles, function (err, stdout, stderr) { | |
var failCount = 0; |
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
#!/bin/sh | |
if git-rev-parse --verify HEAD >/dev/null 2>&1; then | |
against=HEAD | |
else | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
jsfiles=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$jsfiles" = "" ]; then |
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
-- From a combination of gists | |
-- Configured as a Keyboard Maestro macro in Mailplane 3 group bound to ⌘⌥^⇧C | |
tell application "Mailplane 3" | |
set theEmailUrl to currentURL | |
set theGmailUrl to my replace_chars(theEmailUrl, "mailplane://dale.manthei%40gmail.com/", "https://mail.google.com/mail/u/0/") | |
set theSubject to currentTitle | |
tell application "OmniFocus" | |
set theTask to theSubject |
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
Show hidden characters
{ | |
"class": "label_control", | |
"parents": [{"class": "status_bar"}], | |
"color": [148, 149, 151], | |
"shadow_color": [200, 200, 200], | |
"shadow_offset": [0, 0], | |
"font.size": 15, | |
"font.bold" : false | |
}, |
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
{ | |
"format_options" : { | |
"indent": { | |
"value": "\t", | |
"MultipleVariableDeclaration": 1, | |
}, | |
"whiteSpace": { | |
"after": { | |
"FunctionReservedWord": 1, | |
} |