Skip to content

Instantly share code, notes, and snippets.

Zate Zate

Block or report user

Report or block Zate

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Zate
Zate / ubuntu76.sh
Last active Jun 28, 2019
Crostini container setup
View ubuntu76.sh
#!/bin/bash
if [ -z "$1" ]
then
echo "No argument supplied"
exit 1
fi
lxc stop penguin --force
lxc delete debian-old
lxc rename penguin debian-old
View .crostini-setup
These scripts set up Crostini on my Pixelbook
View freeze.md

Freezer cgroup FTW

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@Zate
Zate / container.sh
Last active Jul 31, 2018
Writing a script out to automate containers in crostini
View container.sh
#!/bin/bash
run_container.sh --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 https://gist.githubusercontent.com/Zate/b3c8e18cbb2bbac2976d79525d95f893/raw/acbe81fe161ec194ab9eb30f1bf17f1f79919a45/get_go.sh -o get_go.sh && chmod +x get_go.sh && ./get_go.sh'
sleep 1
lxc exec test -- sudo -u zate bash -c 'cd ~ && pwd && curl https://gist.githubusercontent.com/Zate/b3c8e18cbb2bbac2976d79525d95f893/raw/acbe81fe161ec194ab9eb30f1bf17f1f79919a45/get_vscode.sh -o get_vscode.sh && chmod +x get_vscode.sh && ./get_vscode.sh'
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
https://chromium.googlesource.com/chromiumos/containers/cros-container-guest-tools/+/master/
https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/master/project-termina/chromeos-base/termina-lxd-scripts/files/
#this next one looks to be the source and builds for how to make the virtwl packages installed by the debs above.
https://chromium.googlesource.com/chromiumos/containers/cros-container-virtwl/+/master
https://bugs.chromium.org/p/chromium/issues/list?can=2&q=Proj=Containers%20&sort=-modified&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified
sudo apt-get install curl wget vim software-properties-common && sudo apt-add-repository contrib && sudo apt-get update
@Zate
Zate / gnome_chromote.sh
Created Apr 10, 2018 — forked from packetpilot/gnome_chromote.sh
headless ubuntu|debian + gnome, accessible via Chrome Remote Desktop
View gnome_chromote.sh
#!/bin/bash
# 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
Zate / vm_setup.sh
Last active Mar 21, 2018
Setup stretch VM on ChromeOS and launch vscode
View vm_setup.sh
#! /bin/bash
set -euf -o pipefail
curl -Lo /tmp/stretch.tgz http://github.com/lstoll/chromeoshack/releases/download/0.1/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
Zate / get_go.sh
Last active Oct 25, 2019
Shell script to download and install latest golang
View get_go.sh
#! /bin/bash
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69)
# Download latest Golang release for AMD64
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz
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
Zate / get_amis.sh
Created Feb 4, 2018
Script to grab latest Amazon Linux AMI's to include in cloudformation templates.
View get_amis.sh
!/bin/bash
# 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`
View keybase.md

Keybase proof

I hereby claim:

  • I am Zate on github.
  • I am zate (https://keybase.io/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.