Skip to content

Instantly share code, notes, and snippets.

@flores
flores / keybase.md
Created October 2, 2014 22:27
keybase verification

Keybase proof

I hereby claim:

  • I am flores on github.
  • I am lo (https://keybase.io/lo) on keybase.
  • I have a public key whose fingerprint is 734F 15D8 6BBC 81BA 4A32 7EFB CA89 C74C 9D17 7F14

To claim this, I am signing this object:

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.12 (GNU/Linux)
hQEMA6aR1BAqao5YAQf+NXnXXosSRA+23VURiSUqSF8jGzsXZiMaFpXdbLBXH7sH
vWQj6TJfxLN3zdT6XjWl31Fiep+xYm9obdcjLK4W6Fp4USqlP3l9omWKuDNfg5uL
lDHjgvj2x9YA/VikGSUHivYA23dHcNo8wjX/a2D7G9yo65fuedbHqMiaFJcddDTQ
ku4baYVGiBoACuDjkophVZoc4OUyMn9u3WsjYCSmpha5F462lABfEyG2KPspAC+Q
RjDYB4NXsRvz9g6KHYwIp2aVcxV5g9O56sFP/Uy368/RE5Wn3hyMHVMpmKWM4cR9
QXJeTomo4hM9TFWdBG4DoFtUFoYHzabbAlQ7u8FjJdJPAYC4tengKZuNp/vGwdgc
AfbTJHk1lZr0BQMmEGGDNaqM9H2gsfVwxtDA9CQtoKHy8OlDO1I1eMvO3cW4wp0S
@flores
flores / gist:1623381
Created January 16, 2012 22:28
sample haproxy.cfg
global
log 127.0.0.1 local0 notice
maxconn 50000
daemon
stats socket /tmp/proxystats level admin
defaults
log global
mode http
option httplog
option dontlognull
@flores
flores / hastebin.sh
Created September 8, 2012 00:39
hastebin shell client
#!/bin/bash
server='hastebin.com';
usage="$0 pastes into $server
usage: $0 something
example: '$0 pie' or 'ps aufx |$0'"
if [ -z $1 ]; then
str=`cat /dev/stdin`;
@flores
flores / contact.haml
Created November 26, 2011 21:40
Sinatra + Sanitize + AWS SES Contact form, example
%form{ :action => "/", :method => "post"}
%label{:for => "name"} name:
%input{:type => "text", :name => "name""}
%label{:for => "mail"} email:
%input{:type => "text", :name => "mail"}
%label{:for => "subject"} subject:
%input{:type => "text", :name => "subject"}
%label{:for => "body"} message:
%textarea{:name => "body"}
%input{:type => "submit", :value => "send", :value => "send"}
@flores
flores / gist:1387621
Created November 23, 2011 01:05
npm list = "UNMET DEPENDENCY". k, npm install module. same module now becomes "extraneous"
shark@0.0.1 /var/lib/jenkins/workspace/shark
├─┬ express@2.4.6
│ ├─┬ connect@1.8.0
│ │ └── UNMET DEPENDENCY formidable 1.0.x
│ ├── mime@1.2.4
│ └── qs@0.3.2
├── hiredis@0.1.12
├─┬ optimist@0.2.6
│ └── wordwrap@0.0.2
├── redis@0.6.7
minimal:~# cat /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additonal system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
@flores
flores / gist:904958
Created April 6, 2011 01:29
haproxyctl "enable/disable all EXCEPT <server>"
l:~/haproxyctl# ./haproxyctl "show health"
# pxname svname status weight
http FRONTEND OPEN
sinatra sinatra_downoi DOWN 1
sinatra sinatra_rindica DOWN 1
sinatra sinatra_guinea UP 1
sinatra BACKEND UP 1
ei guinea UP 1
ei BACKEND UP 1
drop guinea UP 1
@flores
flores / gist:3131636
Created July 17, 2012 19:57
Jenkins fails to load project after reboot. Fucking a.
Jul 17, 2012 7:55:50 PM jenkins.InitReactorRunner$1 onTaskFailed
SEVERE: Failed Loading job <project/job name>
java.lang.NullPointerException
at hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:431)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:292)
at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:466)
at hudson.model.Items.load(Items.java:115)
at jenkins.model.Jenkins$17.run(Jenkins.java:2492)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
@flores
flores / gist:7712771
Created November 29, 2013 22:26
rssi variance using fitbit (bluetooth le device)
bdaddr E5:AD:88:65:A3:21 (Random)
RSSI: -70
bdaddr E5:AD:88:65:A3:21 (Random)
RSSI: -70
bdaddr E5:AD:88:65:A3:21 (Random)
RSSI: -66
bdaddr E5:AD:88:65:A3:21 (Random)
RSSI: -66
bdaddr E5:AD:88:65:A3:21 (Random)
RSSI: -75