Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
set -o pipefail
if [[ ! -e ~/go ]];then
wget -O /tmp/go.tgz https://redirector.gvt1.com/edgedl/go/go1.9.2.linux-amd64.tar.gz
cd ~ && tar xvzf /tmp/go.tgz
fi
#!/bin/sh
echo "IN: $(cat $1)"
echo "NOMAD_TASK_DIR: '${NOMAD_TASK_DIR}'"
echo "NOMAD_ALLOC_DIR: '${NOMAD_ALLOC_DIR}'"
@BSick7
BSick7 / merge-bump.sh
Last active February 5, 2016 23:39
auto-merge PR, clean-up, tag release
#!/bin/bash
branch=$1
part=$2
dist="dist"
if [ -z "${branch}" ]; then
echo "Branch must be specified."
exit 1
fi
if [ -z "${part}" ]; then
import StressTest = require('./StressTest');
class MediaParser extends StressTest {
data: string;
prepare (ready?: () => any): boolean {
this.data = "1.23456789E10";
return false;
}
import StressTest = require('./StressTest');
function stringToTracker(str: string): path2d.IParseTracker {
var buffer = new TextEncoder().encode(str);
return {
data: buffer,
offset: 0
};
}
import StressTest = require('./StressTest');
function stringToTracker (str: string): path2d.IParseTracker {
var buffer = new TextEncoder().encode(str);
return {
data: buffer,
offset: 0
};
}
module path2d {
export class MediaParser {
private str: string;
private len: number;
private index: number = 0;
constructor (str: string) {
this.str = str;
this.len = str.length;
}
namespace path2d {
export function parseNumber(tracker: IParseTracker): number {
var start = tracker.offset;
var data = tracker.data;
var len = data.length;
//NaN
if (isNaN(data, tracker.offset)) {
tracker.offset += 3;
return NaN;
}
@BSick7
BSick7 / findDOTypes
Last active August 29, 2015 14:10
Find all Dependency Object Types in a namespace
function findDOTypes(namespace, list) {
list = list || [];
for (var i = 0, keys = Object.keys(namespace); i < keys.length; i++) {
var key = keys[i];
var cur = namespace[key];
if (typeof cur === "function") {
if (Nullstone.DoesInheritFrom(cur, Fayde.DependencyObject))
list.push(cur);
} else if (typeof cur === "object") {
findDOTypes(cur, list);