Skip to content

Instantly share code, notes, and snippets.

View bcatubig's full-sized avatar

Brandon Catubig bcatubig

View GitHub Profile
@labbots
labbots / Ubuntu 18.04 setup.md
Created June 10, 2019 11:12
Ubuntu 18.04 Manual partitioning setup with LUKS encryption and LVM - https://labbots.com/ubuntu-18-04-installation-with-luks-and-lvm

Ubuntu 18.04 installation with LUKS and LVM

Installation Process

Pre-installation from live OS

This setup of Ubuntu with LUKS and LVM is tested on Ubuntu 18.04.

Boot Ubuntu from a Live OS and select the option to try Ubuntu without installing. Follow the steps I've outlined below. Let's assume you're installing to /dev/nvme0n1.

  1. Partition the drive with your tool of choice: I used gparted to set mine up.
# Install these packages (use your favorite AUR tool here)
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables
# Get libvirt going
sudo systemctl enable libvirtd.service
sudo usermod -a -G libvirt $(whoami)
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/
sudo virsh net-autostart default
@veggiemonk
veggiemonk / CKAD.md
Last active March 8, 2024 10:22
CKAD exam preparation
@tknerr
tknerr / ci_jobs.groovy
Created October 6, 2017 10:00
JobDSL example for setting up master / release branch builds + PR builds via bitbucket-branch-source-plugin (using the generated JobDSL)
// define the bitbucket project + repos we want to build
def bitbucket_project = 'awesome'
def bitbucket_repos = ['foo','bar','baz']
// create a pipeline job for each of the repos and for each feature branch.
for (bitbucket_repo in bitbucket_repos)
{
multibranchPipelineJob("${bitbucket_repo}-ci") {
// configure the branch / PR sources
branchSources {
@alexellis
alexellis / k8s-pi.md
Last active April 11, 2024 14:17
K8s on Raspbian
@heppu
heppu / ARCH_INSTALL.MD
Last active February 27, 2022 17:01
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@martinusso
martinusso / the-programmers-idea.md
Last active June 16, 2023 17:02
The Programmers Idea

Numbers

Text

  • Reverse a String – Enter a string and the program will reverse it and print it out.
  • Pig Latin – Pig Latin is a game of alterations played on the English language game. To create the Pig Latin form of an English word the initial consonant sound is transposed to the end of the word and an ay is affixed (Ex.: "banana" would yield anana-bay). Read Wikipedia for more information on rules.
  • Count Vowels – Enter a string and the program counts the number of vowels in the text. For added complexity have it report a sum of each vowel found.
  • Check if Palindrome – Checks if the string entered by the user is a palindrome. That is that it reads the same forwards as backwards like “racecar”
  • Count Words in a String – Counts the number of individual words in a string. For added complexity read these strings in from a text file and generate a summary.
@bcatubig
bcatubig / check_memory.sh
Last active October 31, 2022 14:29
Linux Memory Check Script in Bash. Works with Nagios and Icinga/Icinga 2
#!/bin/bash
#13:16 $ ./check_memory.sh
#OK - Used: 197/3953 (4%);|'Memory Used'=197MB;3360;3755;4053
#Swap Usage: 0/3905 (0%);|'Swap Used'=0MB;3319;3709;4005
MEMTOTAL=$(free | awk '/Mem/ {printf("%d",$2/1024)}')
SWAPTOTAL=$(free | awk '/Swap/ {printf("%d", $2 / 1024)}')
# Get the memory usage in %