Skip to content

Instantly share code, notes, and snippets.

h2. Story
h3. User
h3. Goal
@tomyan
tomyan / Dockerfile
Last active November 14, 2018 14:14
FROM datadog/agent:latest
ADD hello.yaml /etc/datadog-agent/conf.d/hello.yaml
ADD hello.py /etc/datadog-agent/checks.d/hello.py
@tomyan
tomyan / gist:2588931d44a1e850badd
Last active November 10, 2015 11:48
delete wedged ecs service (where elb and role are delete with stack)
#!/bin/bash
set -o pipefail
CLUSTER=$1
SERVICE=$2
echo getting service info
DETAILS=$(aws ecs describe-services --cluster $CLUSTER --services $SERVICE)
@tomyan
tomyan / test.js
Created July 20, 2013 14:21
Demonstrates that data buffered on socket even when paused.
var server = require('net').createServer(function (socket) {
socket.pause();
function buffered () {
return (socket._readableState.buffer[0] || '').toString();
}
console.log(1, buffered());
@tomyan
tomyan / Example use in Makefile
Last active December 16, 2015 01:49
run and colour output of gcc/ld
build/%.o: src/%.[cs]
@mkdir -p `dirname $@`
@build-scripts/build $< $(CC) $(CFLAGS) -c $< -o $@
target/%: build/root_tasks/%.o $(OBJECTS)
@mkdir -p target
@build-scripts/build "linking $@" $(LD) $(LDFLAGS) -o $@ $^
@tomyan
tomyan / nobot.js
Created November 1, 2011 22:50
irc client library interface
var circus = require('../lib/circus');
var channel = process.argv[2];
if (! channel) {
console.log('channel reqired');
process.exit(1);
}
var client = new circus.Client;
@tomyan
tomyan / 0.4.x.js
Created October 25, 2011 20:54
demonstrates connections not accepted until child starts
var net = require('net'),
net_binding = process.binding('net'),
child_process = require('child_process'),
http = require('http'),
server;
if (process.argv[2]) { // child
server = http.createServer(function (req, res) {
.vimrc
======
colorscheme evening
set number
set tabstop=4
set shiftwidth=4
set expandtab
" Switch syntax highlighting on, when the terminal has colors
start
socket(): Address family not supported by protocol
child (12084) Started
200 0
Child (12084) said
Child (12084) said Child starts
Child (12084) said managed to mmap 2147479552 bytes of 2147479552
Child (12084) died signal=11
Child cleanup complete
Jan 17 12:21:28 pal varnishd[12518]: Pushing vcls failed: CLI communication error (hdr)
Jan 17 12:21:28 pal varnishd[12518]: Child (12521) died signal=11
Jan 17 12:21:28 pal varnishd[12518]: Child (-1) said
Jan 17 12:21:28 pal varnishd[12518]: Child (-1) said Child starts