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
if (navigator.appVersion.indexOf("Linux") < 0) { | |
document.addEventListener("keydown", function(e) { | |
// return if no modifiers. | |
// if (!e.shiftKey || !e.ctrlKey) { | |
// return; | |
// } | |
if (!e.metaKey || !e.shiftKey) { | |
return; | |
} | |
// Only send if we are interested. |
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
sumTry match { | |
case SqlError(error) => { | |
Console.println("Handled Sql Failure: " + error) | |
} | |
case Error(s) => { | |
Console.println("BasicError" + 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
#!/bin/bash | |
set -e | |
set -x | |
ignorePid=$BASHPID | |
echo my pid: $ignorePid | |
pids=`findProcs $1 | grep -v "$ignorePid"` | |
set +x |
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 | |
mandatory=${1?missing arg1} | |
optionalWDefault=${2:-somecrap} | |
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
select prior_sale_date, | |
CASE | |
WHEN prior_sale_date != '0' | |
then | |
to_date(prior_sale_date:: text,'YYYYMMDD') | |
ELSE | |
NULL | |
END AS date_formatted | |
from flc12021 |
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
{ | |
"caret_extra_width": 2, | |
"draw_white_space": "all", | |
"findreplace_small": false, | |
"font_size": 20.0, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
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
#NVM | |
source $(brew --prefix nvm)/nvm.sh | |
#Node installs will be lost upon upgrading nvm. Add the following above | |
#the source line to move install location and prevent this: | |
export NVM_DIR=~/.nvm |
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
def run_seq(cmd): | |
"""Run `cmd` and yield its output lazily""" | |
p = subprocess.Popen( | |
cmd, shell=True, | |
stdin=subprocess.PIPE, | |
stdout=subprocess.PIPE, | |
stderr=subprocess.STDOUT) | |
# make STDIN and STDOUT non-blocking | |
fcntl.fcntl(p.stdin, fcntl.F_SETFL, os.O_NONBLOCK) |
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
#shamelessly copied from | |
#http://tech.small-improvements.com/2013/09/10/angularjs-performance-with-large-lists/ | |
#https://gist.github.com/rkgarg/7232175 | |
app = require '../../app.coffee' | |
directiveName = 'postRepeat' | |
app.directive directiveName, [ '$log', | |
($log) -> | |
postRepeat = {} | |
scope: |