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
## DEPENDENCIES (BUILD ON INSTANCE) ########################################### | |
/usr/local/bin/jt: | |
cat target/jt.tar.gz \ | |
|(cd /usr/local && tar xzvf -) | |
/usr/local/bin/tclsh8.5: | |
cat target/tcl8.5.19-src.tar.gz \ | |
|(cd target && tar xzvf - && cd tcl8.5.19/unix && ./configure && make && make install) |
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
.PHONY: all clean | |
all: demo/main.js | |
clean: | |
rm -rf build | |
rm -f demo/main.js | |
build/%.js: src/%.js | |
mkdir -p build |
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 { is } = require('immutable'); | |
/* | |
* const { List } = require('immutable'); | |
* const { input, formula } = require('cell'); | |
* | |
* var a = input(100); | |
* var b = input(200); | |
* var c = formula((x, y) => List([x, y]))(a, b); | |
* var d = formula((x, y) => x + y)(a, b); |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
//have to load this one differently so that you get it on the load of the JS. | |
window.ados = {}; | |
window.ados.events = {} | |
</script> | |
<script type="text/javascript" src="ados.js"></script> |
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
#!/usr/bin/env bash | |
aws autoscaling describe-auto-scaling-groups \ | |
|jt AutoScalingGroups \ | |
[ Tags [ Key % ] [ Value % ] ] \ | |
[ Tags [ Key % ] [ Value % ] ] \ | |
|awk -F ' ' "\$1 == \"AhApplication\" && \$2 == \"$AH_APP\" && \$3 == \"AhEnvironment\" {print \$4}" \ | |
|sort |
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
import csv | |
class FieldTests(object): | |
def __init__(self,csvfile): | |
self.reader = csv.DictReader(csvfile) | |
self.rows = [] | |
for row in self.reader: | |
self.rows.append(row) | |
self.Fieldname = 'name/__text' |
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
(require '[clojure.java.io :as io]) | |
(deftask demo [] | |
(let [tmp (tmp-dir!) ; Anonymous, boot-managed temp directory. | |
prev-fs (atom nil)] ; Atom where the previous fileset is stored. | |
(with-pre-wrap [fs] | |
(let [diff (fileset-diff @prev-fs (reset! prev-fs fs)) ; Fileset containing only changed files. | |
inputs (->> (input-files diff) ; Sequence of [String, java.io.File] | |
(by-ext [".c"]) ; pairs, the classpath path and File | |
(map (juxt tmp-path tmp-file)))] ; for files with given extensions. |
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
local last_balanced = "lastBalanced" | |
local orphans_key = "orphanAds" | |
local last_balanced_ttl = 60 * 20 | |
for i = 1, #ARGV do | |
local ad_id = ARGV[i] | |
local ad_key = last_balanced .. ":" .. ad_id | |
if redis.call("EXISTS", ad_key) ~= 1 then | |
redis.call("SADD", orphans_key, ad_id) |
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
<html> | |
<head> | |
<script> | |
/* Load adOS.js */ | |
(function() { | |
var d = document; | |
var protocol = d.location.protocol == "https:" ? "https" : "http"; | |
var z = d.createElement("script"); | |
z.type = "text/javascript"; | |
z.src = protocol + "://static.adzerk.net/ados.js"; |
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
/****************************************************************************** | |
* | |
* Adzerk header bidding boilerplate. | |
* | |
*****************************************************************************/ | |
window.adospb = (function() { | |
window.pbjs = window.pbjs || {}; |