Debian Jessie buildkite agent when networking is up.
/etc/systemd/system/buildkite-agent.service
// Has the advantage of not needing a temp buffer. | |
#define BINARY_8_FORMAT \ | |
"%d%d%d%d%d%d%d%d" | |
#define BINARY_8_PARAMS(byte) \ | |
(byte & 0x80 ? 1 : 0), \ | |
(byte & 0x40 ? 1 : 0), \ | |
(byte & 0x20 ? 1 : 0), \ | |
(byte & 0x10 ? 1 : 0), \ | |
(byte & 0x08 ? 1 : 0), \ |
package :foo do | |
enum :test, {foo: 1, bar: 2, end: 99} | |
struct :hsv do | |
float :h | |
float :s | |
float :v | |
end | |
struct :example do |
/* | |
Router. | |
Unlike larger projects (crossroads-min.js ~6.8kb, davis-min.js ~10kb, ...) | |
this router <1kb is intended to do one thing well; route. No events, | |
listeners, loggers, history or any other bullshit just a way to execute | |
callbacks by path. | |
@example | |
// document.location.pathname #=> /posts/media/2 |
#!/bin/sh | |
go test -test.bench . 2> /dev/null | |
go test -tags debug -test.bench . 2> /dev/null |
#include "flags.h" | |
#define isopt(text) strncmp(text, "--", 2) == 0 | |
#define isneg(text) strncmp(text, "--no-", 4) == 0 | |
flags_t *flags_parse(int argc, char *argv[]) { | |
int n; | |
char *option, *value; | |
flags_t *flags = NULL, *flag; |
// code for http://gowithconfidence.tumblr.com/post/31797884887/limit-buffers | |
package main | |
import ( | |
"bytes" | |
"errors" | |
"fmt" | |
"io" | |
"sync" |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <mosquitto.h> | |
int main (int argc, char *argv[]) | |
{ | |
bool matches = false; | |
mosquitto_topic_matches_sub(argv[1], argv[2], &matches); | |
printf("matches: %d\n", matches); |
package persona | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
) | |
type Auth struct { |
templates: | |
cd web/templates && haml-coffee -i . -n this.nd.templates -o ../js/nd-templates.js | |
css: | |
cd web/css && recess nd.less --compile > ../../public/nd.css | |
app: | |
cd web/app && coffee -cj ../js/nd.js nd.coffee | |
js: |