export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| set -e | |
| trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG | |
| trap 'echo FAILED COMMAND: $previous_command' EXIT | |
| #------------------------------------------------------------------------------------------- | |
| # This script will download packages for, configure, build and install a GCC cross-compiler. | |
| # Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running. | |
| # If you get an error and need to resume the script from some point in the middle, | |
| # just delete/comment the preceding lines before running it again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install Arch Linux with full encrypted btrfs subvolume inside luks | |
| # Hardware: BIOS system, Intel GPU, Nvidia Optimus, Toshiba SSD, Wifi | |
| # Please adjust for your needs. | |
| # filename: install-arch-linux-on-btrfs-subvolume-inside-luks.txt | |
| # The official guide: https://wiki.archlinux.org/index.php/Installation_Guide | |
| # Download the archiso image from https://www.archlinux.org/download/ | |
| # Copy to a usb-drive | |
| dd bs=4M if=archlinux.iso of=/dev/sdx status=progress oflag=sync # on linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # set prefix to control-f | |
| set -g prefix C-f | |
| #unbind system defined prefix | |
| unbind C-b | |
| # helps in faster key repetition | |
| set -sg escape-time 0 | |
| # start session number from 1 rather than 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # vim: set ts=4: | |
| # | |
| # Any copyright is dedicated to the Public Domain. | |
| # http://creativecommons.org/publicdomain/zero/1.0/ | |
| # | |
| set -eu | |
| APK_KEY_URI='https://alpinelinux.org/keys/[email protected]' | |
| APK_KEY_SHA1='3af08548ef78cfdedcf349880c2c6a1a48763a0e' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # On slow systems, checking the cached .zcompdump file to see if it must be | |
| # regenerated adds a noticable delay to zsh startup. This little hack restricts | |
| # it to once a day. It should be pasted into your own completion file. | |
| # | |
| # The globbing is a little complicated here: | |
| # - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct. | |
| # - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error) | |
| # - '.' matches "regular files" | |
| # - 'mh+24' matches files (or directories or whatever) that are older than 24 hours. | |
| autoload -Uz compinit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EXE = shell | |
| SRC = . | |
| LDFLAGS = -ldflags="-s -w" | |
| windows: | |
| GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC) | |
| macos: | |
| GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
| <fontconfig> | |
| <dir>~/.fonts</dir> | |
| <match> | |
| <test name="family"> | |
| <string>sans-serif</string> | |
| </test> | |
| <edit binding="strong" mode="prepend" name="family"> | |
| <string>Lucida Grande</string> | |
| </edit> |