Skip to content

Instantly share code, notes, and snippets.

View andrewvmail's full-sized avatar

momoterraw andrewvmail

View GitHub Profile
@andrewvmail
andrewvmail / minikube-sierra.md
Created April 10, 2018 00:57 — forked from inadarei/minikube-sierra.md
Minikube Setup: Docker for Mac / Sierra

Prerequisite: latest Docker for Mac on MacOS Sierra

$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
@andrewvmail
andrewvmail / javascript-for-vim-refactoring.js
Created April 18, 2018 08:59 — forked from derwiki/javascript-for-vim-refactoring.js
Moving faster with Vim (5-minute lightning talk presentation). I wasn't inspired to learn effective command of Vim until I saw some people flying around faster than I thought was possible. The goal of this presentation is to call out how slow "normal" text editing is, and how many keystrokes can be reduced by using increasingly more terse Vim co…
$(function() {
// good opportunity to combine into a single statement
// qq w cw <esc> A, <esc> 0 j q
var a = 10;
var b = 20;
var c = 30;
var d = 40;
var e = 50;
// opportunity to simplify syntax
@andrewvmail
andrewvmail / docker-machine.md
Created May 9, 2018 08:01
docker-machine helpers

Stop all machine: docker-machine ls | while read i; do awk '{print $1;system("docker-machine stop " $1)}'; done

find and replace in a folder good for changing ips (kamailio config changing ips)

find ./ -type f -exec sed -i -e 's/AAAA/BBBB/g' {} \;

wireshark a remote server (kamailio troubleshooting)
ssh root@ipaddr 'tcpdump -i eth0 -w - -p -n port not 22' | wireshark -k -i -

@andrewvmail
andrewvmail / rancher.md
Last active May 10, 2018 20:24 — forked from lmmendes/Rancher.md
1.6

make net=host container inside network have access to rancher internal dns

cp /etc/resolv.conf ~/resolv.tmp
sed -i.bak '1 i\nameserver 169.254.169.250' ~/resolv.tmp
cp -f ~/resolv.tmp /etc/resolv.conf 

get username from sip message (doesnt work in node)
/(?&lt;=username\=").+?[^"]*/gm.exec('"Digest realm="ctel.com", nonce="kboOfK9Jtzcv5GVQXKMmgUgw8BXYm1ij", username="4321", uri="sip:192.168.99.100", response="a037be4a6af51934697aeccb39b77c6f", cnonce="XIn9X38CyKd~yEQA", nc=00000008, qop=auth')

@andrewvmail
andrewvmail / Price Breakdown.md
Created May 20, 2018 16:54 — forked from justjanne/Price Breakdown.md
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price

listen to 9090 and dump raw on screen
nc -lv 9090