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
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 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 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 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 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 <tyler@tylerstroud.com> | |
# 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 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 | |
// include symfony2 bootstrap | |
include 'bootstrap.php.cache'; | |
abstract class BaseTestCase extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase | |
{ | |
protected $client; | |
public function setUp() |
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
<?php | |
namespace Form\Handler; | |
use Symfony\Component\Form\Form; | |
use Symfony\Component\HttpFoundation\Request; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Form\Handler\FormHandlerInterface; | |
/** |
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
<?php | |
// ... | |
private $repository; | |
private $cachedResults = []; | |
public function findAll() | |
{ |
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
<?php | |
/** | |
* Implementation of Vose's Alias Method | |
* | |
* @param array $probabilities An array of probabilities | |
* | |
* @return int | |
*/ | |
public function aliasMethod(array $probabilities) | |
{ |
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 | |
# | |
# /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