Skip to content

Instantly share code, notes, and snippets.

View webframp's full-sized avatar

Sean Escriva webframp

View GitHub Profile
@webframp
webframp / windows.md
Created November 28, 2016 22:12
Minimum Viable Windows

A Mostly usable Windows workstation for macOS or Linux users

Especially starting with Windows 10, it isn't all that bad to work on day to day. It just requires a bit of setup out of the box to make it behave better just like those other platforms, and is sufficiently different so as to be non obvious to experienced Linux or macOS users.

Pick and choose what to do from below that fits your needs.

Note: I use emacs, like emacs keybindings and do a bit of Chef development,

@webframp
webframp / service-checklist.md
Created September 13, 2016 17:52 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@webframp
webframp / gist:06a6eb6ff039146f3d551abfd9f0956e
Last active July 15, 2016 14:13
sfn debug vs batali debug true
C:\src\chef\infra-repo [master ≡ +1 ~4 -1 !]> $env:DEBUG="true"
C:\src\chef\infra-repo [master ≡ +1 ~4 -1 !]> be sfn list
I, [2016-07-15T09:37:50.311312 #54452] INFO -- : Lock aquired for stack update. Requesting stacks from upstream. (#<Thread:0x2464248>)
I, [2016-07-15T09:37:53.843429 #54452] INFO -- : Stack list has been updated from upstream and cached locally
Name Created Updated Status Template Description
...
C:\src\chef\infra-repo [master ≡ +1 ~4 -1 !]> be batali resolve
// -*- mode: javascript -*-
/// SETTINGS
url_remoting_fn = load_url_in_new_buffer;
url_completion_use_history = true;
var click_in_new_buffer_target = OPEN_NEW_BUFFER_BACKGROUND;
// let xkcd-mode put the funny alt text into the page.
xkcd_add_title = true;
// user prefs
@webframp
webframp / graphite_user.py
Created June 18, 2016 18:16
A thing to make a graphite user, from some point in the past
import os,sys
sys.path.append("/opt/graphite/webapp/graphite")
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.contrib.auth.models import User
username = 'root'
password = 'change_me'
def get_user(username):
u = User.objects.get(username__exact=username)
@webframp
webframp / _kitchen
Created June 18, 2016 17:52
sort of functional kitchen completion
#compdef kitchen
#autoload
# kitchen zsh completion
local -a _1st_arguments
_1st_arguments=(
'console:Kitchen console!'
'converge:[(all|<REGEX>)] [opts] Converge one or more instances'
'create:[(all|<REGEX>)] [opts] Create one or more instances'
@webframp
webframp / gist:93e9e59aa48cc2ae694d1e5110d0dbd5
Created May 30, 2016 15:46
sfn-parameters show - multiple matches
C:\src\chef\infra-repo [sfn-w2012 ≡ +0 ~2 -1 !]> be sfn parameters show jbtest.json
[Sfn]: Running parameters action show
ERROR: ArgumentError: Multiple matches detected for item `jbtest.json`. (Matches: stacks/jbtest.json, stacks/jbtest.json)
C:\src\chef\infra-repo [sfn-w2012 ≡ +0 ~2 -1 !]> ls .\stacks\
Directory: C:\src\chef\infra-repo\stacks
Mode LastWriteTime Length Name
@webframp
webframp / direnv.ps1
Last active September 25, 2017 13:57
simplistic direnv for powershell in ~100 loc
function Initialize-Direnv {
if($env:DIRENV_AUTH_FILE){
if(-not (test-path $env:DIRENV_AUTH_FILE)) { return "Auth file unreadable: $env:DIRENV_AUTH_FILE" }
# stole this stuff from https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/SamplePSReadlineProfile.ps1
$global:DIRENV = [System.Collections.ArrayList]@(
$last = ''
$lines = ''
foreach ($line in [System.IO.File]::ReadLines($env:DIRENV_AUTH_FILE))
{
if ($lines)
# Single compute node in a basic network.
# lots of hardcoded stuff so a bad example, but functional
SparkleFormation.new(:azure_compute, :provider => :azure) do
set!('$schema', 'https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#')
content_version '1.0.0.0'
parameters do
sparkle_image_id do
type 'string'
default_value '14.04.2-LTS'
end
@webframp
webframp / Config.ini
Created December 17, 2015 18:17
bug.n config
; bug.n - tiling window management
; @version 9.0.0
Monitor_#1_aView_#2=3
Monitor_#2_aView_#2=3
View_#2_#1_layoutAxis_#1=2.000000
View_#2_#1_layoutMFact=0.650000
View_#2_#3_layoutAxis_#1=2.000000
;;; Layout