Skip to content

Instantly share code, notes, and snippets.

View mxinden's full-sized avatar

Max Inden mxinden

View GitHub Profile
@thetechnick
thetechnick / ignition.json
Last active June 22, 2023 17:46
Hetzner Cloud terraform coreos install
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {
},
"systemd": {},
"networkd": {},
"passwd": {
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active June 14, 2024 05:57
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@sieste
sieste / arch-linux-encrypted-kernel-downgrade
Created November 14, 2016 22:35
Minimal instructions for kernel downgrade on arch linux with full system encryption using dm-crypt and luks
# Kernel downgrade on ARCH Linux with encrypted file-system
#
# assumes you followed https://gist.github.com/mattiaslundberg/8620837 to set up your system
#
# Credits:
# https://stephentanner.com/restoring-grub-for-an-encrypted-lvm.html
# https://wiki.archlinux.org/index.php/Kernel_Panics
# Boot into archiso live USB
@lexaurin
lexaurin / jessie-mongodb-3-3-x.sh
Last active August 27, 2016 20:44 — forked from hpherzog/jessie-mongodb-3-0-x.sh
Install mongodb version 3.3.x on debian jessie
#!/bin/sh
apt-key adv --keyserver keyserver.ubuntu.com --recv A15703C6
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.3 main" | tee /etc/apt/sources.list.d/mongodb-org-3.3.list
apt-get update
#apt-get install -y mongodb-org
apt-get install -y mongodb-org-unstable
@dublx
dublx / retry.sh
Last active April 3, 2023 10:38
Bash - retry command N times
#!/bin/bash
set -euo pipefail
function myFunction() {
myCommand
return $?
}
retry=0
maxRetries=5
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite