Skip to content

Instantly share code, notes, and snippets.

View samv's full-sized avatar

Sam Vilain samv

View GitHub Profile
@samv
samv / eyoung.eml
Created February 7, 2011 22:29
Latest from Count Erik J. Young III
Received: from 178.103.20.196 by rms-eu004.v300.gmx.net with HTTP
Date: Mon, 07 Feb 2011 21:54:15 +0000
From: "Erik Young" <3745@gmx.com>
Subject: Protocol Protocol Protocol
To: xp-droi@europarl.europa.eu,zhaimei@chinadaily.com.cn,zhxinyan@chinadaily.com.cn,zoe@endclub.com,zedenka.rakocevic@cb-cg.org,wakeel@da.gov.kw,wdsmp.press@disney.co.uk,webteam@howardmarks.co.uk,webmaster@mod.go.th,woking@waterfalls.co.uk,werner.wenning.ww@bayer-ag.de,webmaster@stlucia.gov.lc,webmaster@uh.cu,webmaster@virginradio.fr,westminster_office@mingcampbell.org.uk,westbyfleet@waterfalls.co.uk,v.farmer@xtra.co.nz,valeria.m.cafe@jpmchase.com,visaenquiries.bangkok@fco.gov.uk,vuk.vujnovic@gov.me,uzkoremb@koremb.uz,ufficio.dipartimentodipolizia@pa.sm,ukbapublicenquiries@ukba.gsi.gov.uk,unisbkk.unescap@un.org,ufficioculturale.bangkok@esteri.it,tarja.kangaskorte@formin.fi,thai.bern@thenet.ch,tony.pieri@legalcomplaints.org.uk,trade.kualalumpur@fco.gov.uk,treaties@mfa.go.th,tzl@dvb.no,sar@mod.gov.il,sar@moag.gov.il,sam.vilain@catalyst.net.
@samv
samv / shell.py
Created August 13, 2012 19:38
A proposal for a SQLAlchemy Shell
"""
The SQLAlchemy Shell.
This is just a wrapper for code.InteractiveConsole with some useful
defaults for using SQLAlchemy
"""
import os
import sys
from code import InteractiveConsole
@samv
samv / crds.md
Last active September 13, 2019 19:51
CRDs Ideas

data resource-focused CRDs and Operators

A lot of operators focus on the service being deployed, such as the service or technology, and its scale. Why not focus on the state resources that they provide?

Schema-first design

Applications have schemas for the data that they are consuming and producing. Building schema first declares these data dependencies explicitly. The Schema

@samv
samv / reply.txt
Created April 24, 2018 20:49
Reply to a spanish Google Voicer
He sido suscriptor de Google Voice durante 5 años y esto sucede ocasionalmente.
Ambos teléfonos suenan y ninguna persona hizo la llamada.
Creo que es un servicio de match making de Google.
O eso o los ordenadores de Google se han vuelto autoconscientes y nos están jodiendo.
@samv
samv / soap-request-2.xml
Last active May 24, 2016 05:35
ONVIF Response from Dahua IPC-HFW1200
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ><SOAP-ENV:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">DG671R1pCZQXyMiFl04yxSY3dHg=</wsse:Password>
<wsse:Nonce>YSB2YWx1ZSBvZiA1MzY=</wsse:Nonce>
<wsu:Created>2016-05-24T05:29:58Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
@samv
samv / yelpreview.txt
Last active April 5, 2016 17:30
Letter from a Dentist going out of business to patents: Screw The Perverted Incentives of Insurance Funded Dentistry! Screw some guy on Yelp 5 years ago! Screw free speed, the constitution and HIPPA! Screw it all, I'm starting a website
Dear Patients,
October 5, 2014
After nearly a decade of practice in the office I set up from scratch,
I have made the difficult decision to close my doors. This letter
will set forth the steps I have taken to ensure your continuity of
care, as well as steps for you to take. Additionally, because I care
deeply about you as patients, I will also share with you a high-level
overview of the series of events that led us to this point. It is my
@samv
samv / pr-blame.sh
Created January 3, 2016 04:00
Git Blame script that resolves revision numbers to GitHub PR #'s, remote tags, remote or local branches
#!/bin/bash
#
# call with '-i' to initialize the repo
self=$(basename "$0")
TEMP="$(getopt n:w:i "$@")"
eval set -- $TEMP
REFS="refs/pr/*"
WIDTH=10
@samv
samv / fedextrackingupdate.txt
Last active December 12, 2015 00:39
update email from Fedex. Note the use of ISO-8601 style in "Estimated Delivery": no suffix like "Z" or "-8" to indicate the time zone. Also, the "Tracking results as of ..." text is in GMT, but doesn't say that :-). Dates in the log appear to be local time (PST). Lack of alignment due to the bad use of hard tabs in the email. There is a log line…
-----------------------------------------------------------------------
This tracking update has been requested by:
Name: Anonymous
E-mail: sam@vilain.net
Tracking number 5244371XXXXXXXX
Ship date Jan 29, 2013
Destination SAN FRANCISCO, CA
Estimated delivery 2013-01-31T00:00:00
Signed for by
@samv
samv / gist:3941248
Created October 23, 2012 20:15
functions and columns are equivalent
svilain=# create table f (foo int);
CREATE TABLE
svilain=# create or replace function bar(f) returns int language sql as $$ select $1.foo + 10 $$;
CREATE FUNCTION
svilain=# insert into f values (1), (2);
INSERT 0 2
svilain=# select f.foo, f.bar from f;
foo | bar
-----+-----
1 | 11
@samv
samv / x.txt
Created July 25, 2012 16:30
Reply to David
Hey David, they're quite specific with the sharkfest requirements
that the entry speed of 40min/mile is a pool time so I think you
should be fine without having a timed open water run. I've
uploaded the recent open water swims that I've done to RunKeeper
(using my Timex Global Trainer, under my swim cap), and they
show that my speed in choppy open water, wearing a wetsuit is
about 120s/100y (even though I *can* swim as fast as 90s/100y on
a sprint in a pool, even long course, that's not far off my
"easy" pace).