Skip to content

Instantly share code, notes, and snippets.

Avatar

Zate Zate

View GitHub Profile
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
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
wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo dpkg --install chrome-remote-desktop_current_amd64.deb
sudo apt install --assume-yes --fix-broken
sudo tasksel install ubuntu-desktop
@Zate
Zate / iam.tf
Created May 12, 2020
terraform Service Specific Credential with IAM user
View iam.tf
locals {
ssc = jsondecode(data.local_file.ssc-output.content)
}
resource "aws_iam_user" "repo" {
name = "${var.origin}-${var.env}-codecommit-user"
path = "/${var.app}/${var.env}/"
@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
You can’t perform that action at this time.