Skip to content

Instantly share code, notes, and snippets.

View stevegt's full-sized avatar

Steve Traugott stevegt

View GitHub Profile
@stevegt
stevegt / windows10qemu.sh
Last active June 19, 2020 10:41 — forked from Manouchehri/windows10qemu.sh
Running Windows 10 in a UEFI enabled QEMU environment with KVM.
# Installing
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 2048 -cdrom ~/Downloads/Win10_English_x64.iso -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -drive file=~/Downloads/virtio-win-0.1.105.iso,index=1,media=cdrom
# Running
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 4096 -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -usbdevice tablet -rtc base=utc
@stevegt
stevegt / mcp.dot
Last active October 9, 2016 23:24
mcp process graph
digraph G {
create -> edit;
edit -> "anyone can add name as reviewer"
-> "anyone can set freeze and release dates"
-> freeze;
freeze -> review;
review -> release [label=yes];
review -> edit [label=no];
release -> obsolete;
obsolete -> create [label="yes"];
@stevegt
stevegt / global.csv
Last active February 19, 2017 15:14 — forked from tomgp/global.csv
Convolution: smoothing noisy data
year annual_mean
1880 -0.31
1881 -0.22
1882 -0.28
1883 -0.3
1884 -0.33
1885 -0.32
1886 -0.29
1887 -0.35
1888 -0.28
keywords: docker build slow delay wait seconds
How to speed up docker build times when using gcloud or gcr:
gcloud components install docker-credential-gcr
docker-credential-gcr configure-docker
docker-credential-gcr gcr-login
docker-credential-gcr config --token-source="store,gcloud"
# or probably just need
docker-credential-gcr config --token-source="store"
@stevegt
stevegt / .block
Last active January 13, 2019 01:50 — forked from piwodlaiwo/.block
World Map with Graticule Labels
license: mit
@stevegt
stevegt / .block
Last active January 13, 2019 02:16 — forked from venkat/.block
US map shipping animation
license: gpl-3.0
height: 600
border: no
@stevegt
stevegt / auto.sshfs
Created September 5, 2019 01:00 — forked from lordtangent/auto.sshfs
universal sshfs Automount
#!/bin/bash
# /etc/auto.sshfs automount script
# This file must be executable to work! ( chmod 755 )
key="${1/%:/}"
user="${key/@*/}"
t="${key/*@/}"
server="${t/:*/}"
tp="${t/*:/}"
port="${tp/\/*/}"
@stevegt
stevegt / Makefile
Last active January 17, 2020 02:04
the hack
# these are hostnames
kirk: d4-0
scotty: d4-2
spock: d4-1 vim
# could also use pattern-matching for hostnames
%.dev.example.com: d4-2
# d4-x are image names, where x is the image version
d4-0: docker-18.09.7 nfs-client
d4-1: d4-0 consul-1.6.0 jq
@stevegt
stevegt / gist:abc6b627b0a57b78f9f83f2c9e2d1692
Created July 10, 2020 00:25
playing with Go "cannot take the address of" temporary variable
// b := []byte("lksajflkd sajfsasdjkf lkfjsalkjf salkfjsa lkfj lalkjasfd lkj")
// this works, but we should be able to not have to do this in so many steps
// bBlob := Blob(b)
// pBlob := &bBlob
// this doesn't work
// cannot take the address of Blob(b)
// pBlob := &Blob(b)
// we're asking Go to do something like this, getting the address of a temporary variable
#!/bin/bash -e
# usage: gist-from-file {filename} [optional description goes here]
file="$1"
shift
desc="$@"
# gist-paste is from the ubuntu 'gist' package
cat $file | gist-paste --skip-empty -o -f $file -d "$desc"