Skip to content

Instantly share code, notes, and snippets.

View dragon788's full-sized avatar

dragon788 dragon788

View GitHub Profile
@dragon788
dragon788 / guix-on-chromeos-notes.md
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
dragon788 / shortcuts.md
Created June 29, 2021 18:12
Git.io routes I use for easier curl/wget grabbing

Git.io routes I use for easier curl/wget grabbing

getcrouton https://github.com/dnschneid/crouton/raw/master/installer/crouton
crouton https://github.com/dnschneid/crouton
@dragon788
dragon788 / fetch_tools.md
Last active March 30, 2021 15:57
Handy tool snippets
VERSION=`curl  "https://api.github.com/repos/cli/cli/releases/latest" | \
grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-`; \
curl -sSL https://github.com/cli/cli/releases/download/v${VERSION}/gh_${VERSION}_linux_amd64.tar.gz | \
sudo tar xzfC - /usr/local --strip-components=1
@dragon788
dragon788 / notes.md
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 fix-grub.sh script from the chromefy repo and the lab folder. There is a short URL for it, curl -L goo.gl/HdjwAZ | 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
dragon788 / gist:68e6e4192fbf8bc5f4aa2eef0c8eb783
Last active February 1, 2022 22:54
Te-Smart TESmart Shell Script CLI interface
#!/bin/bash
echo_docs() {
cat <<'EOD'
EOD
}
# use case to echo `network` `port` `autoselect` or `LED` sections or if no arg output all of them
set_network () {
@dragon788
dragon788 / !scdrand-yubikey-nitro-compile-and-installation.md
Last active May 9, 2021 10:58
Script to use scdrand to generate entropy from smartcard

Using scdrand to utilize a smartcard as a hardware RNG

Copy/download the quick build steps file and execute it with sh quick-build-steps.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
dragon788 / gitlab-local.sh
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
dragon788 / crostini-libvirt-vagrant.md
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 https://vagrantup.com/whatever/vagrant-version.deb
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
dragon788 / reset-libvirt-qemu-kvm-tablet-input.sh
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'/>
</input>
EOF
)
sleep 2
virsh attach-device --domain macOS-Simple-KVM --live --conf
@dragon788
dragon788 / !readme.md
Last active February 27, 2020 18:24
Clear Linux basic setup

Setting up Clear Linux with i3 and Yubikey bits

See [bootstrap.sh] for quickest swupd package bundle installation.

If you are tricksy you can curl the raw [bootstrap.sh] file and examine it and then chmod +x bootstrap.sh 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.