Skip to content

Instantly share code, notes, and snippets.


dragon788 dragon788

View GitHub Profile
dragon788 /
Created October 16, 2021 01:03
Guix on ChromeOS to avoid Chromebrew and enable Homebrew?

If you are installing Guix as an unprivileged user, it is still possible to run guix-daemon provided you pass --disable-chroot. However, build processes will not be isolated from one another, and not from the rest of the system.

dragon788 /
Created June 29, 2021 18:12 routes I use for easier curl/wget grabbing
View routes I use for easier curl/wget grabbing

dragon788 /
Last active March 30, 2021 15:57
Handy tool snippets
VERSION=`curl  "" | \
grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-`; \
curl -sSL${VERSION}/gh_${VERSION}_linux_amd64.tar.gz | \
sudo tar xzfC - /usr/local --strip-components=1
dragon788 /
Created October 4, 2020 14:08
Chromefy / Project Croissant 🥐 notes

Creating the image isn't hard, the trouble is the stupid installer never seems to work properly according to their directions on most system that I've tried (primarily Chromebooks, so YMMV). The only surefire method that has worked for me every single time is using dd from the Ctrl+Alt+F2 shell (or one in a logged in account, but then that account gets copied over to the target system) or dd or the 'python-awesome-dd' script from a Linux LiveUSB. If you use dd you probably need to run the script from the chromefy repo and the lab folder. There is a short URL for it, curl -L | bash -s /dev/sda to grab the file and run it assuming you are in a root shell.

You MUST be in Developer Mode if you are attempting to Chromefy an existing ChromeOS device. Then after the Dev Mode changeover wipes the device you should access the system shell (aka VTY) using Ctrl+Alt+F2 (usually the Forward key depending on the age of the device but may also be Refresh or something else, and you m

dragon788 / gist:68e6e4192fbf8bc5f4aa2eef0c8eb783
Last active February 1, 2022 22:54
Te-Smart TESmart Shell Script CLI interface
View gist:68e6e4192fbf8bc5f4aa2eef0c8eb783
echo_docs() {
cat <<'EOD'
# use case to echo `network` `port` `autoselect` or `LED` sections or if no arg output all of them
set_network () {
dragon788 / !
Last active May 9, 2021 10:58
Script to use scdrand to generate entropy from smartcard
View !

Using scdrand to utilize a smartcard as a hardware RNG

Copy/download the quick build steps file and execute it with sh and if you are on Debian and have Docker it should fetch the Dockerfile here which when run with the docker build in the script clones scdtools and installs scdrand (and scdtotp) on your host system.

After you've installed it you can run sudo scdrand to get try and add some entropy to the kernel pool.

dragon788 /
Last active October 15, 2021 14:11
Updated gitlab-runner supporting docker in docker
#!/usr/bin/env bash
set -euo pipefail
usage () {
echo "Usage: $(basename $0) {up|down|[job stage]}"
echo "[job stage] - defaults to "build" and supports multiple comma delimited jobs"
echo "$(basename $0) test,build"
dragon788 /
Last active June 17, 2020 01:32
Crostini libvirt tips and tricks

libvirt tweaks for Crostini

Important bits

sudo apt install virt-manager # includes libvirt/virsh/etc

curl -L
sudo dpkg -i vagrant*.deb

For the vagrant-libvirt plugin you may need to use an alternate ruby/vagrant path in the call to install the plugin.

dragon788 /
Created March 18, 2020 04:08
Sometimes the mouse cursor stops responding or two finger scrolling doesn't work, this quick reset fixes that
virsh detach-device --domain macOS-Simple-KVM --live --conf
ig <( cat << 'EOF'
<input type='tablet' bus='usb'>
<alias name='input3'/>
<address type='usb' bus='0' port='2'/>
sleep 2
virsh attach-device --domain macOS-Simple-KVM --live --conf
dragon788 / !
Last active February 27, 2020 18:24
Clear Linux basic setup
View !

Setting up Clear Linux with i3 and Yubikey bits

See [] for quickest swupd package bundle installation.

If you are tricksy you can curl the raw [] file and examine it and then chmod +x and run it yourself.

The bootstrap currently doesn't automatically force you into i3, but if you log out and select your user from the login screen and click the ⚙️ icon and select i3 from the list, then enter your password if you didn't already and login.