Skip to content

Instantly share code, notes, and snippets.

View dweomer's full-sized avatar
🤠
/nerdface

Jacob Blain Christen dweomer

🤠
/nerdface
View GitHub Profile
@dweomer
dweomer / loopback.alias.plist
Created July 1, 2018 01:01
macOS loopback alias 127.0.1.1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>loopback.alias</string>
<key>ProgramArguments</key>
<array>
<string>/sbin/ifconfig</string>
<string>lo0</string>
@dweomer
dweomer / docker-root.sh
Created June 7, 2018 19:20
docker identity container
docker run --rm -v /:/host --net=host --pid=host --ipc=host --privileged -it alpine chroot /host
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
sudo apt-get update
sudo apt-get install -y docker-ce
@dweomer
dweomer / main.go
Created April 27, 2018 16:54
2018-04-26 - Golang Phoenix - Package Madness! - https://www.meetup.com/Golang-Phoenix/events/249838312/
package main
// https://www.meetup.com/Golang-Phoenix/events/249838312/
// I was assigned the 'gopkg.in/src-d/go-git.v4' package. Below is a simple program that will take a Git URL,
// clone the repo, and scan SemVer-compliant tags then output the most recent, as per SemVer, version.
import (
"fmt"
"io/ioutil"
"os"
@dweomer
dweomer / passwords.sh
Created May 17, 2017 20:35
random passwords
#!/bin/sh
curl 'https://www.random.org/passwords/?num=10&len=20&format=plain&rnd=new'
@dweomer
dweomer / keybase.md
Created July 8, 2016 00:15
keybase.md

Keybase proof

I hereby claim:

  • I am dweomer on github.
  • I am dweomer (https://keybase.io/dweomer) on keybase.
  • I have a public key ASCctZsc0vugGtNcl7K7y1BVNkcKP3TuK55XTBoplQBAggo

To claim this, I am signing this object:

#!/usr/bin/env bash
#
# Copyright 2012 Zemian Deng
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@dweomer
dweomer / 00fun.txt
Created November 15, 2015 08:29 — forked from tobert/00fun.txt
Docker w/ link-local API
This is a silly example for dinking around with the Docker API on a link-local dummy interface.
for b in $(git branch -r --merged origin/master | awk '{print $1}' | egrep -v '^stash')
do
echo -n "$b: " | egrep --color=always "$b" && git log -1 -s $b
done
#/bin/bash
STALE_SINCE=${STALE_SINCE:-"3 months"}
git for-each-ref --sort=-committerdate refs/remotes/origin --format='%(refname:short) %(committerdate:relative)' | \
while read REF RELDATE
do
if [ -z "$(git log -1 --since="${STALE_SINCE}" -s ${REF})" ]; then
echo $(echo ${REF} | grep --color=tty "${REF}"): ${RELDATE}
fi