Skip to content

Instantly share code, notes, and snippets.

View slmingol's full-sized avatar
:octocat:
codz

Sam Mingo slmingol

:octocat:
codz
View GitHub Profile
@slmingol
slmingol / repair-dualboot-bootloader.sh
Created April 14, 2024 22:47 — forked from tobikris/repair-dualboot-bootloader.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition
$ mount /dev/mapper/fedora_fedora-var /mnt/var
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition
@Kenny-MWI
Kenny-MWI / slack_tweaks.md
Last active November 7, 2024 12:02
Slack Tweaks

Slack Tweaks

In Fall 2023, Slack introduced an updated client with some unpopular UI changes. The tweaks in this document can be used to revert to the old client or hide the new side bar. These will reset every time you fully close Slack but they are easy to re-apply once you get the hang of it.

(Cross Platform) Open Dev Tools [Preferred Option]

To run any of these scripts, you'll need to open the Dev Tools (or Console). You can do this by typing /slackdevtools in a Slack channel or direct message. These are the same Dev Tools you'd get in Chrome if you hit F12. Along the top are tabs for Elements, Console, Sources, Network, etc. You'll want to paste these scripts into the Console tab at the > prompt.

If Slack disables this command, then you can open Dev Tools by setting a system-wide environment variable and using a keyboard shortcut to open the console. If /slackdevtools worked for you then you can skip these next two sections.

(Mac OS) Enable Dev Mode

@qrkourier
qrkourier / krun
Last active April 15, 2023 21:33
run any command in any container image in any Kubernetes namespace
# krun busybox whoami
krun(){
local NAMESPACE=default
local PRIVILEGED=false
while getopts 'n:pu:' OPT; do
case $OPT in
n) NAMESPACE=$OPTARG
;;
p) PRIVILEGED=true

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
@fungiboletus
fungiboletus / anyconnect.lua
Last active April 9, 2024 14:44
Prefill Cisco AnnyConnect SSO login email using HammerSpoon
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "v", function()
-- Change your email
local email = "[email protected]"
local ciscoName = "Cisco AnyConnect Secure Mobility Client"
local loginWindowName = "login"
if hs.application.launchOrFocus(ciscoName) then
local ciscoApplication = hs.application.get(ciscoName)
local mainWindow = ciscoApplication:mainWindow()
@tobikris
tobikris / repair-dualboot-bootloader.sh
Last active April 14, 2024 22:47 — forked from Tamal/set-chroot.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ # http://dadadom.de/2020/04/11/fix-fedora-uefi-boot-with-encrypted-partitions/
$ udiskctl unlock -b /dev/nvme0n1p6 # unlock root luks partition
$ mount /dev/mapper/fedora_fedora-root /mnt # mount root partition
$ mount /dev/mapper/fedora_fedora-var /mnt/var
$ mount /dev/nvme0n1p5 /mnt/boot # mount boot partition
@slmingol
slmingol / TrueColour.md
Created May 30, 2021 05:32 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@slmingol
slmingol / version-up.sh
Created May 8, 2021 12:42 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
# http://tldp.org/LDP/abs/html/comparison-ops.html
@scottrigby
scottrigby / demo.md
Last active February 3, 2023 20:13
Helm Users! What Flux 2 Can Do For You - KubeCon CLoudNativeCon EU 2021 - Scott Rigby & Kingdon Barrett, Weaveworks

Helm Users! What Flux 2 Can Do For You

This is the gist promised in our our KubeCon EU 2021 talk.

Go to https://github.com/kingdonb/kccnceu2021 for the full experience! 💖🤩

  • Check out the main branch for the full talk experience (warts and all)
  • Check out the present branch for the solutions according to the presenter
  • Check out the terminal branch for risky root shell fun
  • Check out the features branch for additional features as we incorporate them throughout the week based on your suggestions!