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
com | |
foursquare | |
foo | |
client [fsthriftclient for 'foo'] | |
server | |
bin [main method(s) and concrete bag] | |
concrete [implementation of services used in 'endpoint' or 'rpc'] | |
endpoint | |
json | |
frontend [self-hosted/internal web pages] |
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
### Keybase proof | |
I hereby claim: | |
* I am dt on github. | |
* I am davidtaylor (https://keybase.io/davidtaylor) on keybase. | |
* I have a public key whose fingerprint is C1C7 28C0 61A1 AF42 37E5 3469 769C 56D5 F1B4 6954 | |
To claim this, I am signing this object: |
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
# Copyright 2014 Foursquare Labs Inc. All Rights Reserved. | |
from pants.backend.core.tasks.task import Task | |
class Tagger(Task): | |
@classmethod | |
def product_types(cls): | |
return ['tagged_build_graph'] | |
def execute(self): |
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
[05:29] ~/code/fs/2 $ rm -rf .pants.d .local_artifact_cache/[^I]* | |
[05:29] ~/code/fs/2 $ time ./fs --pants-binary=../../pants/dist/pants.pex compile ads-api | |
Writing log files to disk in /tmp/davidt/goals | |
Begin: 2014-10-31 05:29:56.130135 | |
Running: ../../pants/dist/pants.pex goal compile --compile-scala-missing-deps=fatal src/jvm/com/foursquare/ads/server/bin:foursquare.ads | |
Writing log files to disk in /tmp/davidt/goals | |
05:29:57 00:00 [main] | |
(To run a reporting server: ./pants goal server) | |
05:29:58 00:01 [bootstrap] |
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
# def slow_identity_func(i): | |
# import time | |
# time.sleep(i[0]) | |
# return i[1] | |
# def test_multiproc_map_timeout(self): | |
# context = create_context() | |
# msg = 'subproc_map result still not ready...' | |
# counting_log = MockLogger(count_messages_matching=set([msg])) | |
# context._log = counting_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
light <- hardware.pin8; | |
light.configure(ANALOG_IN); | |
function check() { | |
agent.send("lvl", light.read()); | |
imp.wakeup(10, check); | |
} | |
check(); |
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
brew_light <- 55000; | |
brewing <- false; | |
slack_url <- "https://hooks.slack.com/services/BLAHBLAHBLAH"; | |
function slack(msg) { | |
local body = "{\"text\": \""+msg+"\", \"username\": \"Coffeebot\", \"icon_emoji\": \":coffee:\"}"; | |
local request = http.post(slack_url, {}, body); | |
local resp = request.sendsync(); | |
server.log("Slack says ("+resp.statuscode + "): " + resp.body) | |
} |
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 ProductiveJUnitRun(JUnitRun): | |
@classmethod | |
def product_types(cls): | |
return ['junit_tests_ran'] | |
task(name='junit', | |
action=ProductiveJUnitRun, | |
dependencies=['bootstrap', 'compile']).install('test', replace=True).with_description('Test compiled code.') |
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
# coding=utf-8 | |
# Copyright 2013 Foursquare Labs Inc. All Rights Reserved. | |
from __future__ import absolute_import | |
import os | |
import subprocess | |
from pants.backend.core.tasks.task import Task | |
from pants.backend.python.targets.python_binary import PythonBinary |
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 | |
set -e | |
if [ ! -d .pvenvs/onchange ]; then | |
mkdir -p .pvenvs | |
python2.7 -m virtualenv --quiet .pvenvs/onchange | |
if [ $(uname) = 'Darwin' ]; then | |
.pvenvs/onchange/bin/pip install --quiet MacFSEvents | |
else |
OlderNewer