Skip to content

Instantly share code, notes, and snippets.

View shizonic's full-sized avatar
💭
[ -n "$problems" ] && solve || chill

shizonic shizonic

💭
[ -n "$problems" ] && solve || chill
View GitHub Profile
@shizonic
shizonic / apk-chroot-installation-demo.sh
Created June 24, 2019 04:33 — forked from jirutka/apk-chroot-installation-demo.sh
This is a demo script used at Alpine Linux booth at LinuxDays 2017 to demonstrate how is apk-tools and Alpine Linux awesome. Recorded output: https://asciinema.org/a/141360
#!/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'
@shizonic
shizonic / tmux.conf
Created June 26, 2019 08:01 — forked from rajanand02/tmux.conf
Tmux configurations with status bar theme
# 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
@shizonic
shizonic / install-arch-linux-on-btrfs-subvolume-inside-luks
Created June 30, 2019 03:45 — forked from ansulev/install-arch-linux-on-btrfs-subvolume-inside-luks
Install Arch Linux with full encrypted btrfs subvolume inside luks
# 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
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFr+bRIBCACUyk/cKlW7G1iR8YPl9b6z0D5N8LCL4T9edEvGd/8M0AY1I0lR
sZfOMUBlcziBLsxrnIKD57JwTpMiBpyh0Z9RoE4CnZhg74g18I5Wa0OtXv4n2jDJ
cmIAIzYvSuCQJjxFOWYd/FI4j0jkG1NG6PWMX7OJUD/gP0tkSvEGtiW+B7UIpoLn
3Rq2dY1DG8gf23/TtWrqxtmXYN7yJbVuT/uTmLFIKprNbh4qNa/hinL4MjjGpsJx
U5q8eUld2jxZGHJlrdY/vJ9G1iqrai3XDTGSU1s9lEPvPdjumXyFXLuygNsoQWci
66gQum69Yyxg445pV5AyFBQONYmsPmzvgPtXABEBAAG0JVRvYmlhcyBNZXJ6IDx0
b2JpYXMubWVyekBoZi1pY3QuaW5mbz6JAU4EEwEIADgWIQS193b5+QOrHZ4RWpF2
L+ThEse1RQUCWv5t6gIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRB2L+Th
#!/bin/sh -e
#
# Get latest version of a package.
[ "$1" ] || exit 1
curl -s "https://repology.org/badge/latest-versions/$1.svg" |
while read -r line; do
case $line in
*"latest packaged version"*) v=$((v+=1)) ;;
@shizonic
shizonic / build_cross_gcc
Created September 18, 2019 09:41 — forked from preshing/build_cross_gcc
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /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.
@shizonic
shizonic / .fonts.conf
Created October 3, 2019 11:47 — forked from odony/.fonts.conf
Updated version of the fonts.conf file mentioned in http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/ in order to get rid of most of the fontconfig warnings (mostly the "Having multiple values in <test> isn't supported and may not work as expected")
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@shizonic
shizonic / debian-stretch-fde.md
Created October 5, 2019 07:00 — forked from ppmathis/debian-stretch-fde.md
Guide which explains an installation of Debian Stretch with full disk encryption (including "/boot" partition, containing initramfs+kernel) by using Debian Jessie Live.

Debian Stretch - Full Disk Encryption

This documents guides you through the process to install Debian Stretch with Full Disk Encryption. The following requirements exist:

  • Mainboard with UEFI-Support
  • Debian Stretch Live CD booted from UEFI
  • Two unformatted, unpartitioned HDDs/SSDs for Software RAID1 with mdmadm

After following this guide, you will end up with a setup like this:

  • Redundant GRUB Standalone EFI installation on both disks
@shizonic
shizonic / gnome-tracker-disable.md
Created October 13, 2019 06:03 — forked from vancluever/gnome-tracker-disable.md
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@shizonic
shizonic / piping.go
Created October 15, 2019 04:16 — forked from kylelemons/piping.go
piping exec.Cmd in golang (example sorts all regular files under a directory by their extension)
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion