Skip to content

Instantly share code, notes, and snippets.

@hartmantis
hartmantis / windows_bootstrap.ps1
Last active August 14, 2021 02:42
Windows gaming PC bootstrap script
# There are some steps that can't be done in PowerShell:
#
# Before:
# * Install Windows
# * Run Windows Update and reboot as needed
# * Install WinGet via your desired method (Maybe it's included with AppInstaller by now?)
#
# After:
# * Run the Logitech app and change the touchpad scroll direction
# * Run 1Password and sign in
@hartmantis
hartmantis / macos_bootstrap.sh
Last active February 9, 2023 06:22
macOS bootstrap script
#!/bin/bash
#
# Provisioning script for a new macOS Big Sur machine.
# To bootstrap a brand new box:
# * Build a bootable USB installer drive:
# - Partition a USB flash drive as appropriate
# - On an existing macOS box, search the App Store for "Big Sur"
# - Download macOS and wait for the installer screen to pop up
# - Build the install media:
# sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume
@hartmantis
hartmantis / ignition.cfg
Last active July 25, 2020 02:45
Testing CoreOS Ignition
{
"ignition": {
"version": "3.0.0"
},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJYbBdotWTaTn0B/5pOQR1pyJaA4cWEOrAaXQiOBhopOyGv7D6btqVCwNzJxkCQjn8sGqt3UV7+S2GqMkaLU0Thj09/lgAylayR1HnYk1ButAtAEj7G5A15ZnP0wHIKh64dD+p/fI69NAIRZKgdBygS27qxU5JF0oJlnX7dFv1MKBVFRmaPIl3/g3bM54Cg6KWRdy1QkpxCE7XacN0B+7khR8/Iox8eke/zj39D/Qrw34kwCmrhHouqmzOCm5UNNlb+Ea9FzcZjyLPhpLqd2bi2aLne6qpA9b3LvRuXZi8u5Bb/B4jgDtIcrOvLlx+/KIS9KWzClRr08S1NtAm+Ev5"
@hartmantis
hartmantis / arraytest1_attributes_default.rb
Created January 20, 2016 21:03
Chef array attributes
default['arraytest'] = %w(thing1 thing2 thing3)
@hartmantis
hartmantis / .kitchen.yml
Created December 22, 2015 18:56
Chef DK / DMG Test
---
driver:
name: vagrant
provisioner:
name: chef_zero
platforms:
- name: macosx-10.10
ssh:
A simple `ls` command.
Auditd:
type=SYSCALL msg=audit(1443472662.093:768): arch=c000003e syscall=59 success=yes exit=0 a0=100f788 a1=ef0688 a2=fe0808 a3=7fff2f4cc550 items=2 ppid=18368 pid=19531 auid=900 uid=900 gid=900 euid=900 suid=900 fsuid=900 egid=900 sgid=900 fsgid=900 ses=5 tty=pts1 comm="ls" exe="/bin/ls" key=(null)
type=EXECVE msg=audit(1443472662.093:768): argc=2 a0="ls" a1="--color=auto"
type=CWD msg=audit(1443472662.093:768): cwd="/home/vagrant"
type=PATH msg=audit(1443472662.093:768): item=0 name="/bin/ls" inode=1308212 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
type=PATH msg=audit(1443472662.093:768): item=1 name=(null) inode=2093204 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
</code>
@hartmantis
hartmantis / keybase.md
Created August 13, 2014 19:58
keybase.md

Keybase proof

I hereby claim:

  • I am roboticcheese on github.
  • I am roboticcheese (https://keybase.io/roboticcheese) on keybase.
  • I have a public key whose fingerprint is 8079 F045 1CD2 1B5D 0AA4 96DC 68B6 627A 5469 DC49

To claim this, I am signing this object:

@hartmantis
hartmantis / docker_defaults
Created April 29, 2014 03:07
Docker + Nginx Proxying
# Docker Upstart and SysVinit configuration file
# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
DOCKER_OPTS="-D -H 127.0.0.1:8081 -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock"
# If you need Docker to use an HTTP proxy, it can also be specified here.
$ cat CHANGELOG.md
hello-world CHANGELOG
=====================
v0.1.0 (2013-01-16)
-------------------
- Initial release
$ bake 0.2.0 --changelog
$ rake acceptance
/usr/local/Cellar/ruby/1.9.3-p194/bin/ruby -S bundle exec cucumber --color --format progress --strict --tags ~@wip
/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/community-zero-2.0.1/lib/community_zero/server.rb:33: warning: already initialized constant DEFAULT_OPTIONS
............F...F-....F-...............................F-..................F-...................................................................................
(::) failed steps (::)
expected "ERROR Cli: Stove experienced an error!\nERROR Cli: RuntimeError\nERROR Cli: can't modify frozen String\nERROR Cli: /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rubygems/version.rb:191:in `strip!'\n/usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rubygems/version.rb:191:in `initialize'\n/Users/jhartman/GitHubRepos/stove/lib/stove/actions/bump.rb:11:in `new'\n/Users/jhartman/GitHubRepos/stove/lib/stove/actions/bump.rb:11:in `block in <class:Bump>'\n/Users/jhartman/GitHubRepos/stove/lib/stove/validator.rb:55:in `instance_