This file contains hidden or 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
const predef = require("./tools/predef"); | |
const WMA = require("./tools/WMA"); | |
class weightedMovingAverage { | |
init() { | |
this.wma = WMA(this.props.period); | |
} | |
map(d) { | |
return this.wma(d.value() - this.props.offset); |
This file contains hidden or 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 | |
# Launches chrome in app mode using the first argument to this command as the url. | |
if [ -z "$1" ]; then | |
echo "You must specify a full URL." | |
exit 1; | |
elif [[ ! $1 =~ ^https?:\/\/ ]]; then | |
echo "Url must begin with \"http://\" or \"https://\"" | |
exit 1; | |
fi |
This file contains hidden or 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
<?php | |
namespace App\Response; | |
use Symfony\Component\HttpFoundation\HeaderBag; | |
use Symfony\Component\HttpFoundation\Response; | |
class TransparentImagePixelResponse extends Response | |
{ | |
/** |
This file contains hidden or 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 | |
# | |
# Author: Tyler Stroud <[email protected]> | |
# Date: 2017-10-25 | |
# | |
# This script will build a changelog containing commit messages for all commits since the most recent tag. | |
# It will prepend a new entry using today's date and the specified tagname followed by the commit messages | |
# to CHANGELOG.md | |
# | |
# Usage: |
This file contains hidden or 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
<?php | |
// ... | |
private $repository; | |
private $cachedResults = []; | |
public function findAll() | |
{ |
This file contains hidden or 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
server { | |
listen 80; | |
server_name ~(?<parentjob>[^_]+)_(?<childjob>[^.]+)\.mydomain\.dev; | |
location / { | |
root /var/lib/jenkins/workspace/$parentjob/$childjob/web; | |
return 200 $childjob; | |
try_files $uri /app.php$is_args$args; | |
} |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am tystr on github. | |
* I am tylerstroud (https://keybase.io/tylerstroud) on keybase. | |
* I have a public key whose fingerprint is 51CB 684A 14D0 7C2D 3E41 0964 2D84 6E4B 7781 B996 | |
To claim this, I am signing this object: |
This file contains hidden or 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 get_hosts_for_role(role, puppetmaster="puppetmaster.mydomain.net"): | |
""" Query the puppetmaster for hosts of nodes whose server_role fact matches the given role """ | |
return yaml.load(local('ssh -T {0} \'curl -s -k -H "Accept: yaml" https://localhost:8140/production/facts_search/search?facts.server_role={1}\' | awk \'!/baseami/\''.format(puppetmaster, role), capture=True) |
This file contains hidden or 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 | |
# This script assumes that you have the deployer ssh key in your home directory | |
# The ./public directory is deployed into the $DEPLOY_TO directory on the remote servers | |
RSYNC=/usr/bin/rsync | |
BRUNCH=/usr/local/bin/brunch | |
PRODUCTION_HOSTNAMES=("host1" "host2") | |
DEPLOY_TO=/var/www/application/current | |
DEPLOYER_SSH_KEY=$HOME/.ssh/id_rsa-deployer | |
LOGFILE=deploy.log |
This file contains hidden or 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 | |
# | |
# /etc/rc.d/init.d/mms-agent | |
# | |
# 10Gen Mongod montiroing service | |
# must edit the settings.py first and edit this file with the location of agent.py | |
# | |
# description: 10Gen monitoring service - need ot fix pid so we can shut it down | |
# chkconfig: - 90 10 |
NewerOlder