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
property phpref : "/usr/bin/env php -l " | |
on phpErrLine(php_msg, bbfref) | |
set errIndicator to " in " & (POSIX path of bbfref) & " on line " | |
set off to (offset of errIndicator in php_msg) + (length of errIndicator) | |
get text off thru -1 of php_msg | |
return first paragraph of result as integer | |
end phpErrLine | |
on phpErrMsg for bbfref out of php_msg |
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
### Nginx upstart script | |
### source: http://serverfault.com/a/391737/70451 | |
### /etc/init/nginx.conf | |
description "nginx http daemon" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/usr/local/sbin/nginx |
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 callSliced(fn, a, b) { | |
var args = [a]; // 1st argument to slice | |
if (b) args.push(b); // 2nd argument to slice, if any | |
return function apply() { | |
return fn.apply(fn, Array.prototype.slice.apply(arguments, args)); | |
}; | |
} |
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
// fn - function to call | |
// signature - array of arguments to use to call fn, if an array value is `undefined` | |
// then use the curried/partial function parameter | |
function partial(fn, signature) { | |
var slice = Array.prototype.slice; | |
return function apply() { | |
var args = slice.call(arguments); | |
return fn.apply(fn, signature.map(function fillIn(arg) { | |
return arg === undefined ? args.shift() : arg; |
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
# dev env ONLY | |
add_header 'Access-Control-Allow-Origin' *; | |
add_header 'Access-Control-Allow-Credentials' 'true'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | |
add_header 'Access-Control-Allow-Headers' *; |
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
events {} | |
http { | |
server { | |
listen 80; | |
server_name reachclient.dev.mr.tv3cloud.com; | |
root MRGIT/ReachClient/Web/builds/private; | |
index Landing.html; | |
# for source map access |
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
class TypeScriptLexer(RegexLexer): | |
""" | |
For `TypeScript <http://typescriptlang.org/>`_ source code. | |
.. versionadded:: 1.6 | |
""" | |
name = 'TypeScript' | |
aliases = ['ts'] | |
filenames = ['*.ts'] |
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 -eu | |
# config | |
# | |
email=REDACTED | |
token=$(security find-generic-password -ws 'Cloudflare API key' -a $email) | |
domain=REDACTED | |
subdomain=REDACTED | |
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
git checkout \ | |
$(git show -s --pretty='%T' \ | |
$(git show-ref -d \ | |
$(git describe --abbrev=0) |\ # grab the most recent tag | |
tail -n1 |\ | |
awk '{print $1}'\ # dereference the commit hash it refers to | |
)\ # ... show the tree-hash it points at | |
) -- test # check that version's "test/" directory out into cwd | |
make test # if this fails, you should bump major, | |
# otherwise bump minor or patch. |
OlderNewer