Skip to content

Instantly share code, notes, and snippets.

View thomasgroch's full-sized avatar

Thomas Letsch Groch thomasgroch

View GitHub Profile
@ViBiOh
ViBiOh / bootstrap
Last active February 22, 2022 17:05
Dotfiles
#!/usr/bin/env bash
set -o nounset -o pipefail -o errexit
main() {
local INSTALL_PATH="${HOME}/code"
local GITHUB_USER="ViBiOh"
local DOTFILES_NAME="dotfiles"
local DOTFILES_BRANCH="main"
local ARCHIVE_FILENAME="${INSTALL_PATH}/dotfiles.zip"
@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Starttoaster
Starttoaster / 1. Parameter Explanations
Last active April 7, 2021 07:59
Cloudflare API Calls (Ignore !'s. Used for emphasis/easy spotting)
*X-Auth-Email:* This is the email you use to log into your Cloudflare account. Found in "My Profile"
*X-Auth-Key:* This is found in the Cloudflare website under "My Profile > API Keys > Global API Key".
[See this link on finding the Global API Key](https://support.cloudflare.com/hc/en-us/articles/200167836-Where-do-I-find-my-CloudFlare-API-key-)
*Zone Identifier:* This is an ID specific to your domain. Found in the Cloudflare website on your domain's "Overview" page written as "Zone ID"
*Identifier:* This is an ID specific to a singular DNS record under your domain. This one is a little tricker to find.
It would appear that you need to find this by making an API call, which Gets info about all DNS records on your domain and outputs an "id" attribute.
@wantonbe
wantonbe / 1-準備.md
Last active March 10, 2020 22:26
Dockerハンズオン

mkdir docker-handson && cd docker-handson mkdir src laravel

@rdimitrov
rdimitrov / openfaas-on-arm-vms.md
Last active May 6, 2020 00:10
Serverless virtual ARM cluster with OpenFaaS

Serverless virtual ARM cluster with OpenFaaS

1. Introduction

The idea is inspired by the following blog post (https://blog.alexellis.io/your-serverless-raspberry-pi-cluster/) where the OpenFaaS framework is deployed on a set of Raspberry Pi boards configured in a cluster.

The main concept is the same, but instead of using physical boards, we'll have a set of VM nodes. The goal is to have OpenFaaS running in a virtual cluster with QEMU as a hypervisor.

Pros:

  • No additional costs for hardware (Raspberry Pi boards, Ethernet dongles, SD cards, cables, etc)
@haccer
haccer / keybase.py
Created July 13, 2018 21:13
Extract emails from PGP keys
#!/usr/bin/env python
import requests, base64, re, sys
r = requests.get("https://keybase.io/" + sys.argv[1] + "/key.asc")
body = r.text.split("\n\n")
key = body[1].split("-----")
for email in re.findall(r' <(.*?)>', str(base64.b64decode(key[0]))):
print(email)
@rudolfratusinski
rudolfratusinski / parallels_tools_ubuntu_new_kernel_fix.md
Last active November 23, 2022 20:01
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

#!/usr/bin/env bash
# Install by running:
# /usr/bin/env bash <(curl -fsSL https://gist.githubusercontent.com/hedlund/42ded191f15f6c80a95456d70022d2f9/raw)
if [[ "$(uname -s)" != "Darwin" ]]; then
echo "Not running on Mac OS X. Aborting!"
exit 1
fi
@unhammer
unhammer / signal
Last active February 21, 2022 20:04
Launch Signal if not running, otherwise toggle hidden/shown state. Put signal.desktop in ~/.config/autostart/.
#!/bin/bash
run () {
signal-desktop &
disown
}
show () {
local -r id="$1"
idx="$(printf "0x%08x" "${id}")"
@emersion
emersion / arch-install.sh
Last active January 6, 2021 08:13
Arch Linux installation
# Arch Linux installation
# - EFI with systemd-boot
# - LUKS encryption
# - BTRFS with two subvolumes: @root and @home
# - Intel/AMD ucode
# See https://wiki.archlinux.org/index.php/Installation_guide
# Connect to the Internet
ls /sys/firmware/efi/efivars # Check EFI
timedatectl set-ntp true