Skip to content

Instantly share code, notes, and snippets.

View elee's full-sized avatar

Eric Lee elee

View GitHub Profile
@elee
elee / main.go
Created May 3, 2024 22:46
Dagger With Socket Sharing
package main
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"log"
"os"
@elee
elee / envoy-mysql.yaml
Created February 7, 2023 05:56
envoy mysql example
admin:
address:
socket_address:
protocol: TCP
address: 0.0.0.0
port_value: 9901
stats_sinks:
- name: envoy.stat_sinks.dog_statsd
typed_config:
"@type": type.googleapis.com/envoy.config.metrics.v3.DogStatsdSink
@elee
elee / ENDLESS-JOB.YAML
Created June 3, 2020 00:00
ENDLESS JOB
apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
spec:
containers:
- name: pi
image: perl

Keybase proof

I hereby claim:

  • I am elee on github.
  • I am godisdad (https://keybase.io/godisdad) on keybase.
  • I have a public key ASCfqb8cNE4PGB9acDnMJW1gxssD8pvEsLTymlDj1Y97qwo

To claim this, I am signing this object:

@elee
elee / wipeout.py
Last active August 29, 2015 14:06
wipe out Zk data
from kazoo.client import KazooClient
zk = KazooClient('mmaster-0:2181,mmaster-1:2181,mmaster-2:2181')
zk.start()
@zk.ChildrenWatch('/')
def watch_children(children):
print('new state: {}'.format('\n'.join(children)))
zk.delete('/marathon', recursive=True)
zk.stop()
sudo apt-get install openjdk-7-jdk ; sudo update-alternatives --config java ; ps ax | grep backtype.storm | grep -v grep | awk '{print $1}' | xargs kill -9 ; java -version
@elee
elee / gist:7851416
Created December 7, 2013 23:41
NextBus API Hilarity
$ curl "http://webservices.nextbus.com/service/publicXMLFeed?command=predictions&a=emery&stopId=5300&routeTag=Hollis"
<?xml version="1.0" encoding="utf-8" ?>
<body copyright="All data copyright Emery-Go-Round 2013.">
<predictions agencyTitle="Emery-Go-Round" routeTitle="Hollis" routeTag="Hollis" stopTitle="MacArthur BART Station" stopTag="bart_o" dirTitleBecauseNoPredictions="to Emeryville">
<message text="Nextbus time will not be accurate due to new vehicles on the road with out the Nextbus equipment. Feel free to call the office at 510-451-3862"/>
</predictions>
</body>
$ : I mean, who doesn't want to make an api call that gives you a phone number to call in an attribute called "text" of a message element
@elee
elee / gist:7341776
Created November 6, 2013 18:41
perl spiral quine from perlmonks
#!/usr/bin/perl
$_='
$q ="\ 47"; wh
ile ($ ;=
$z += .5 ){
%c= $r=0;$/ ="";whi le(2
0+ $z>($;+=.05)){$c{int$ _+ 2
6+ 2*($ r+= .0 2) *
s in$ ;}{1 -$_
+1 0+ int $r*c o s
@elee
elee / gist:6320905
Created August 23, 2013 15:53
Steve Ballmer's Resignation Letter (full)
I am writing to let you know that I will retire as CEO of Microsoft within the next 12 months, after a successor is chosen. There is never a perfect time for this type of transition, but now is the right time. My original thoughts on timing would have had my retirement happen in the middle of our transformation to a devices and services company focused on empowering customers in the activities they value most. We need a CEO who will be here longer term for this new direction. You can read the press release on Microsoft News Center.
This is a time of important transformation for Microsoft. Our new Senior Leadership team is amazing. The strategy we have generated is first class. Our new organization, which is centered on functions and engineering areas, is right for the opportunities and challenges ahead.
Microsoft is an amazing place. I love this company. I love the way we helped invent and popularize computing and the PC. I love the bigness and boldness of our bets. I love our people and their talent and our
@elee
elee / gist:4544817
Last active December 11, 2015 04:28
var sinon = require('sinon');
var hottap = require('hotttap');
var foo = function(url) {
var resp = hottap.hottap(url);
return resp;
};
foo('http://somewhere/over/the/rainbow');