Skip to content

Instantly share code, notes, and snippets.

Zate Zate

View GitHub Profile
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
Zate /
Last active Mar 21, 2018
Setup stretch VM on ChromeOS and launch vscode
#! /bin/bash
set -euf -o pipefail
curl -Lo /tmp/stretch.tgz
lxc image import /tmp/stretch.tgz --alias stretch
lxc launch stretch stretch
lxc exec stretch -- useradd -u 1000 -s "/bin/bash" -m "zate"
groups="audio cdrom dialout floppy plugdev sudo users video"
for group in ${groups}; do
Zate /
Last active Mar 23, 2019
Shell script to download and install latest golang
#! /bin/bash
# [](
# Download latest Golang release for AMD64
set -euf -o pipefail
# Install pre-reqs
sudo apt-get install python3 git -y
o=$(python3 -c $'import os\nprint(os.get_blocking(0))\nos.set_blocking(0, True)')
Zate /
Created Feb 4, 2018
Script to grab latest Amazon Linux AMI's to include in cloudformation templates.
# runs through each region and grabs the latest Amazon Linux AMI to be used for standard EC2 Instances.
# use this to make sure the right AMI ID's are in the cloudformation templates.
tabs 4
echo -e "\tAWSRegionToAMI:"
for region in `aws ec2 describe-regions --output text | cut -f3`

Keybase proof

I hereby claim:

  • I am Zate on github.
  • I am zate ( on keybase.
  • I have a public key whose fingerprint is 8B05 F610 C703 3D3B 0656 9180 D047 B6BC C2AD D4D3

To claim this, I am signing this object:

You can’t perform that action at this time.