Skip to content

Instantly share code, notes, and snippets.

@eldondev
eldondev / git-merge.png
Last active August 29, 2015 14:17
Imagers
git-merge.png
@eldondev
eldondev / talk.slide
Created February 25, 2015 06:57
Lightning talk on go version of inetd for docker containers
Lightning Talk: inetd in Go for Docker
Reincarnating a 1980s tech with today's tools.
Eldon
docker.inetd@eldondev.com
* Disclaimer:
This is a lightning talk.
- It has not been reviewed.
- There will probably be lies, damn lies, and a demo.
@eldondev
eldondev / Dockerfile
Created February 24, 2015 20:42
busybox http responder with nc
FROM busybox
COPY response.sh .
CMD nc -lp 8000 -e sh response.sh
package main
import (
"fmt"
"github.com/fsouza/go-dockerclient"
"io"
"net"
"os"
"os/signal"
"strconv"
@eldondev
eldondev / gist:04fc3214fde21932e60e
Created February 1, 2015 18:13
Setting cpu flags with the new gentoo arch
echo CPU_FLAGS_X86=\"`grep -of <(sed -n -e '/^#/d' -e 's/^/ /' -e's/-.*//p' /usr/portage/profiles/desc/cpu_flags_x86.desc) /proc/cpuinfo |sort |uniq |xargs echo`\"
@eldondev
eldondev / Dockerfile
Last active August 29, 2015 14:12
The gist that shall not be spoken of.
FROM stage3
RUN mkdir /build
ADD openssh-6.7p1.tar.gz /build
COPY patch /build/patch
WORKDIR /build/openssh-6.7p1
RUN patch -p1 -l <../patch
RUN ./configure
RUN make
RUN make install
COPY go /sbin/
@eldondev
eldondev / throughput.txt
Created November 28, 2014 22:51
Bringing linux pipes into the 21st century
Throughput may seem like a funny thing to measure on a unix pipe. For many, the PV utility may seem like a toy for bored sysadmins to watch their database dumps get backed up. But the truth is, that unix pipes remain one of my most frequently used tools over the course of the day. Why?
* On *nix systems, they are almost always there.
* They are frequently the first tool that experienced people turn to when diagnosing an issue with a system. For example:
* Web service misbehaving? Try to curl it.
* Error in a log file? Grep it!
* Need to fix a config file? Sed it!
* Need to find out how big some set of data is, an average, etc? wc + bc are your friends.
* The parts they contain are
* many (I will give you $0x1 if you can name all the coreutils) and
* composable (we can send sed to grep to sed to awk to ...)
@eldondev
eldondev / Untitled1.py
Last active August 29, 2015 14:09
Playing with amazon ec2 spot instance pricing, ipython notebook, and matplotlib
# coding: utf-8
# In[23]:
get_ipython().magic('pylab')
import boto.ec2
from pandas import DataFrame
pre_data = {}
for region in boto.ec2.regions():
@eldondev
eldondev / README.md
Last active August 29, 2015 14:08
A funky/stupid "web proxy" written in go with leveldb

I was interested in writing a little something that I could put in from of wget -m that would ensure that wget would not re-fetch files, even if those files had disappeared from the local host

@eldondev
eldondev / a.outer
Last active August 29, 2015 14:01
whammo