Skip to content

Instantly share code, notes, and snippets.

View samv's full-sized avatar

Sam Vilain samv

View GitHub Profile
@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 / 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 / git-wcpush
Last active August 29, 2015 14:24
'git wcpush'
#!/bin/bash
remote=$1
ssh_target=$(git config remote.$remote.url)
echo "remote $remote, ssh is $ssh_target"
cdup="$(git rev-parse --show-cdup)"
if [ -n "$cdup" ]
then
@samv
samv / output.txt
Last active August 29, 2015 14:20
Remove 'unknown' json fields
JsonRecord(unknown_json_keys={'foo': 'bar'})
JsonRecord()
@samv
samv / start-ssh-agent
Created February 19, 2015 19:36
Script to reattach a shell to SSH
#!/bin/sh
# this script knows how to look in /tmp/ssh-* for SSH agent sockets.
# These are created by the SSH agent, or for hosts you connected to
# with 'ssh -A' (or you set 'ForwardAgent yes' in your .ssh/config).
# the upshot is that if *any* of your current ssh connections have an
# agent connection, then you can run this script and it will set your
# environment variables up in the shell you are currently working in.
@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 / gist:34c5013278bf5e36d9f9
Created May 22, 2014 21:13
Error building atom
Usage: gyp_main.py [options ...] [build_file ...]
gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack at ChildProcess.onCpExit (/home/samv/oss/atom/build/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.11.0-20-generic
gyp ERR! command "node" "/home/samv/oss/atom/build/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
@samv
samv / README.rst
Last active August 29, 2015 14:01
System info for System76 Pangolin Performance (panp9)