Skip to content

Instantly share code, notes, and snippets.

@gasserk
gasserk / 18AoC-D3-in.txt
Created December 17, 2018 04:53
My AoC D3 in
#1 @ 146,196: 19x14
#2 @ 641,817: 27x28
#3 @ 604,922: 11x17
#4 @ 323,671: 19x17
#5 @ 885,701: 18x27
#6 @ 636,818: 18x14
#7 @ 165,289: 22x12
#8 @ 431,568: 16x23
#9 @ 490,861: 24x25
#10 @ 529,203: 10x21
@gasserk
gasserk / keybase.md
Created February 19, 2018 02:25
keybase.md

Keybase proof

I hereby claim:

  • I am gasserk on github.
  • I am gasserk (https://keybase.io/gasserk) on keybase.
  • I have a public key ASDH9TgPHPe0Ij3m7_-CVxtTyddjAValgaznQYG1CUbkYgo

To claim this, I am signing this object:

@gasserk
gasserk / user_data.sh
Created August 10, 2016 20:31
User_data for custom account and ssh key
#Replace {{myaccount}} with e.g. your id
#TODO: Replace {{myaccount}} with appropriate shell variable and references
#This has been tested in RHEL7, AWS-Linux, Ubuntu 14.04
#!/bin/bash -xe
cat << EOF > /etc/sudoers.d/{{myaccount}}
# User rules for {{myaccount}}
{{myaccount}} ALL=(ALL) NOPASSWD:ALL
EOF
@gasserk
gasserk / packer_headless_stage_1.log
Created October 20, 2015 23:33
Packer - headless-stage-1 errors behind proxy
2015/10/20 19:25:12 [INFO] Packer version: 0.8.6 f8f7b7a34c1be06058f5aca23a51247db12cdbc5+CHANGES
2015/10/20 19:25:12 Packer Target OS/Arch: linux amd64
2015/10/20 19:25:12 Built with Go Version: go1.5
2015/10/20 19:25:12 [DEBUG] Discovered plugin: amazon-chroot = /usr/local/packer-packer_0.8.6/packer-builder-amazon-chroot
2015/10/20 19:25:12 [DEBUG] Discovered plugin: amazon-ebs = /usr/local/packer-packer_0.8.6/packer-builder-amazon-ebs
2015/10/20 19:25:12 [DEBUG] Discovered plugin: amazon-instance = /usr/local/packer-packer_0.8.6/packer-builder-amazon-instance
2015/10/20 19:25:12 [DEBUG] Discovered plugin: digitalocean = /usr/local/packer-packer_0.8.6/packer-builder-digitalocean
2015/10/20 19:25:12 [DEBUG] Discovered plugin: docker = /usr/local/packer-packer_0.8.6/packer-builder-docker
2015/10/20 19:25:12 [DEBUG] Discovered plugin: file = /usr/local/packer-packer_0.8.6/packer-builder-file
2015/10/20 19:25:12 [DEBUG] Discovered plugin: googlecompute = /usr/local/packer-packer_0.8.6/packer-builder-googlecomp
@gasserk
gasserk / purge-creds.sh
Last active October 5, 2015 01:50
Purging credentials with vagrant-proxyconf
#Note: keep vagrant-proxyconf plugin installed, just set vars to empty string
#Note: leave HTTP_PROXY and HTTPS_PROXY environment variables set as these are needed to satisfy 'vagrant box update' run as
# subcommand of 'vagrant up'
HTTP_PROXY_USER="" HTTP_PROXY_PWRD="" HTTP_PROXY_HOST="" HTTP_PROXY_PORT="" vagrant up/ssh/halt/status
@gasserk
gasserk / shrinkme.sh
Last active October 5, 2015 01:13
Compact Vagrant box
#!/bin/bash
#
# Make a Linux-based VM Box as Small as Possible
apt-get clean
su -c "cat /dev/null > ~/.bash_history && history -c" - vagrant
cat /dev/null > ~/.bash_history && history -c
dd if=/dev/zero of=/EMPTY bs=1M
@gasserk
gasserk / IzCheckScripts.sh
Last active September 19, 2015 15:11
Izanamee Spot-check Scripts (as Bash/Zsh Aliases for Mac OS X Host and Izanamee Guests)
#!/bin/bash
#
# Spot-check Izanamee host pre-requisites
#
alias checkHostIzEnv='git --version && vagrant -v && VBoxManage -v ; top -l 1 | grep ^PhysMem ; df -h'
#
# Spot-check Izanamee headless guest provisioning baseline
#
# Note: You may need to remove the line continuations ("\") in Bash shell versions < 4.0
@gasserk
gasserk / SecureDatumRESTAPI.go
Created August 4, 2015 14:35
Simple (and flawed) example of Crypto and REST in Go
package main
import (
"fmt"
"net/http"
"regexp"
"code.google.com/p/gorest"
"crypto/aes"