Skip to content

Instantly share code, notes, and snippets.

View pubkey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkOccjEJTX/p50UjAubU9sLTj9UVP1mb2M+xn8AwCfHOJ0whJMNIiQClQ86nEZtXrsdl+tY+poTOm8hnZf7PCmHWUsKyNaS/3HQtTGf6enriRVUMbyd2n1lznQ9/hPjpIBw8AGsPWo3DJGGGa0SbaQjHtJDASc9kiZteKp2tPMPr4XbANpzltHwW4CXl9ryeb5GNqBGINaZB0rlyVn250g+7zAfKjqZfrAmFUGGex5J/RBcV1vgJi7sGDyJcVpueDO1SMWW0ekLxpcoxvKXRgV/wdrdQALeag+tphmhDxJmSXaDhzppLUkG3mVmLIPfe3nMv/FH375vWB47L1+djcB zate75@penguin
View gist:104a4d7dfa0b98c96a08624e2bf8aecc
fio --time_based --name=4k_benchmark --size=10G --runtime=30 --filename=/opt/splunk/test --ioengine=libaio --randrepeat=0 --iodepth=128 --direct=1 --invalidate=1 --verify=0 --verify_fatal=0 --numjobs=4 --rw=randread --blocksize=4k --group_reporting
4k_benchmark: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
Zate / gist:ddbbd9b61c7787124f953a383ce4dedd
Last active Sep 11, 2020
Headless ubuntu System with Google Remote Desktop
View gist:ddbbd9b61c7787124f953a383ce4dedd
# updates etc
sudo apt update
sudo apt upgrade -y
# install pre-reqs
sudo apt install tasksel -y
# get the file
sudo dpkg --install chrome-remote-desktop_current_amd64.deb
sudo apt install --assume-yes --fix-broken
sudo tasksel install ubuntu-desktop
Zate /
Created May 12, 2020
terraform Service Specific Credential with IAM user
locals {
ssc = jsondecode(data.local_file.ssc-output.content)
resource "aws_iam_user" "repo" {
name = "${var.origin}-${var.env}-codecommit-user"
path = "/${}/${var.env}/"
Zate /
Last active Jun 28, 2019
Crostini container setup
if [ -z "$1" ]
echo "No argument supplied"
exit 1
lxc stop penguin --force
lxc delete debian-old
lxc rename penguin debian-old
View .crostini-setup
These scripts set up Crostini on my Pixelbook

Freezer cgroup FTW

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

Zate /
Last active Jul 31, 2018
Writing a script out to automate containers in crostini
#!/bin/bash --container_name test --user zate
sleep 3
lxc exec test -- sh -c "apt-get update && sleep 1 && apt-get upgrade -y && sleep 1 && apt-get install wget curl -y"
sleep 1
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl -o && chmod +x && ./'
sleep 1
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl -o && chmod +x && ./'
sleep 1
View stuff_for_crostini.txt
Some links I want to save around trying to look at building a xenial or bionic image for crostini / lxc on ChromeOS
#this next one looks to be the source and builds for how to make the virtwl packages installed by the debs above.
sudo apt-get install curl wget vim software-properties-common && sudo apt-add-repository contrib && sudo apt-get update
Zate /
Created Apr 10, 2018 — forked from packetpilot/
headless ubuntu|debian + gnome, accessible via Chrome Remote Desktop
# gnome and chrome and chrome remote desktop access
# chrome itself is not required, but is included here.
# other desktops can be used w/ light script changes.
# tested on:
# - ubuntu xenial GCE instance
# - debian stretch crostini container on a Pixelbook (eve)
# running ChromeOS v67.0.3383.0 (dev channel)
# _without_ being in developer mode