Skip to content

Instantly share code, notes, and snippets.

@elubow
elubow / pet-snippet.toml
Created May 14, 2017 02:32
description
[[snippets]]
description = "nsq_tail a topic on a specific lookup host"
command = "nsq_tail --lookupd-http-address=nsq-lookup-001:4161 --topic topic_name"
[[snippets]]
description = "git reset file.txt back to master"
command = "git checkout HEAD -- file.txt"
[[snippets]]
description = "Install knife-ec2 while dealing with Mac nokogiri issues"
@elubow
elubow / pet-snippet.toml
Created March 30, 2017 05:40
description
[[snippets]]
description = "nsq_tail a topic on a specific lookup host"
command = "nsq_tail --lookupd-http-address=nsq-lookup-001:4161 --topic topic_name"
[[snippets]]
description = "git reset file.txt back to master"
command = "git checkout HEAD -- file.txt"
[[snippets]]
description = "Install knife-ec2 while dealing with Mac nokogiri issues"
@elubow
elubow / pet-snippet.toml
Created March 30, 2017 05:38
description
[[snippets]]
description = "nsq_tail a topic on a specific lookup host"
command = "nsq_tail --lookupd-http-address=nsq-lookup-001:4161 --topic topic_name"
[[snippets]]
description = "git reset file.txt back to master"
command = "git checkout HEAD -- file.txt"
[[snippets]]
description = "Install knife-ec2 while dealing with Mac nokogiri issues"
@elubow
elubow / pet-snippet.toml
Created March 23, 2017 14:47
description
[[snippets]]
description = "nsq_tail a topic on a specific lookup host"
command = "nsq_tail --lookupd-http-address=nsq-lookup-001:4161 --topic topic_name"
[[snippets]]
description = "git reset file.txt back to master"
command = "git checkout HEAD -- file.txt"
[[snippets]]
description = "Install knife-ec2 while dealing with Mac nokogiri issues"
import (
"fmt"
"errors"
"os"
"time"
"fiftyonedegrees"
)
type userAgentData struct {
@elubow
elubow / pet-snippet.toml
Created March 19, 2017 17:41
description
[[snippets]]
description = "nsq_tail a topic on a specific lookup host"
command = "nsq_tail --lookupd-http-address=nsq-lookup-001:4161 --topic topic_name"
[[snippets]]
description = "git reset file.txt back to master"
command = "git checkout HEAD -- file.txt"
@elubow
elubow / pet-snippet.toml
Created March 14, 2017 20:33
description
[[snippets]]
description = "nsq_tail a topic on a specific lookup host"
command = "nsq_tail --lookupd-http-address=nsq-lookup-001:4161 --topic topic_name"
@elubow
elubow / check_aggregate_nsq_depths.py
Created November 26, 2014 17:37
Check Aggregate NSQ Depths in Nagios
#!/usr/bin/env python2.7
import sys
import logging
import functools
import time
import tornado.options
import tornado.ioloop
import nsq_data
@elubow
elubow / keybase.md
Created October 29, 2014 17:06
Keybase

Keybase proof

I hereby claim:

  • I am elubow on github.
  • I am elubow (https://keybase.io/elubow) on keybase.
  • I have a public key whose fingerprint is CFEC 78CB 0701 57AB AF5C D569 6932 03C1 F066 DB8A

To claim this, I am signing this object:

@elubow
elubow / jingle_bells.cc
Created December 7, 2013 16:07
Using a Piezo Element and Arduino, you can play jingle bells using this code sample.
int speakerPin = 5;
int length = 26;
char notes[] = "eeeeeeegcde fffffeeeeddedg";
int beats[] = { 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2};
int tempo = 300;
void playTone(int tone, int duration) {
for (long i = 0; i < duration * 1000L; i += tone * 2) {
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);