Skip to content

Instantly share code, notes, and snippets.

@franz-josef-kaiser
franz-josef-kaiser / crash.log
Created Oct 22, 2020
crash log for Terraform GitLab provider; crash happend while trying to import user
View crash.log
2020/10/22 10:57:35 [INFO] Terraform version: 0.13.4
2020/10/22 10:57:35 [INFO] Go runtime version: go1.14.7
2020/10/22 10:57:35 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.0.0/versions/0.13.4/terraform", "import", "-input=true", "gitlab_user.foo-bar", "1234567"}
2020/10/22 10:57:35 [DEBUG] Attempting to open CLI config file: /path/to/.terraformrc
2020/10/22 10:57:35 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/10/22 10:57:35 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/10/22 10:57:35 [DEBUG] ignoring non-existing provider search directory /path/to/.terraform.d/plugins
2020/10/22 10:57:35 [DEBUG] ignoring non-existing provider search directory /path/to/Library/Application Support/io.terraform/plugins
2020/10/22 10:57:35 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2020/10/22 10:57:35 [INFO] CLI command args: []string{"import", "-input=true", "gitlab_user.foo-bar", "1234567"}
@franz-josef-kaiser
franz-josef-kaiser / README.md
Last active Sep 30, 2020
Bash installer for different OS
View README.md

Bash Installer

If you are collaborating with others, chances that not everyone's on the same OS are good. If you want to avoid "running on my machine" kind of problems, just share an installer script for your favorite binaries installers/ upgrader/ uninstallers. This is one way to do it.

This is a simple installer script that selects different installation methods based on the OS you are running this on.

How to

Just replace @TODO with whatever you are installing. Make sure to adjust the different installation methods some project/ program offers.

Linux currently is running a Git clone installer that symlinks into some $PATH supporting place. This does not clone the complete repo, but just the last commit!

Uninstallation

Git

@franz-josef-kaiser
franz-josef-kaiser / docker.sh
Created May 9, 2020
Run Volumio hifi audiophile in a docker container on MacOS
View docker.sh
#!/usr/bin/env bash
mkdir music data
set MUSIC_DIR=./music
set VOLUMIO_DATA_DIR=./data
docker run \
--rm \
-d \
--name volumio \
-e DISPLAY=unix$DISPLAY \
-e HOST=http://192.168.1.1:3000 \ # Your local network IP
@franz-josef-kaiser
franz-josef-kaiser / .bash_profile
Last active Jan 6, 2021
QNAP Entware opkg command not found
View .bash_profile
# .bash_profile
# /share/CACHEDEV1_DATA/.qpkg/container-station/bin location of `docker`/ `docker-compose` binaries
# /opt/bin location where `opkg` binary is installed to.
export PATH=\
/bin:\
/sbin:\
/usr/bin:\
/usr/sbin:\
/usr/bin/X11:\
@franz-josef-kaiser
franz-josef-kaiser / netgear_genie_no_registration.md
Last active Sep 12, 2018
One line tutorial on how to avoid registering a Netgear account.
View netgear_genie_no_registration.md

How to avoid registering a Netgear account just to log in to the admin management UI.

Open start_repeater.html: http://www.mywifiext.net/start_repeater.htm

Works for AP / repeater Netgear Genie EX3700 for e.g.

In case you are doing a factory reset (button on the hardware), make sure to clear all site data from storage: Chrome Developer Tools > Application Tab > Clear Storage > Press button on the bottom "Clear site data". Else you will have endless redirects as the JavaScript is slightly fucked up.

@franz-josef-kaiser
franz-josef-kaiser / FlowMeterDIY.ino
Created May 29, 2017
Copy of a FlowMeter logging code. A FlowMeter is used in for example Espresso Machines and is a liquid flow rate sensor.
View FlowMeterDIY.ino
/*
Liquid flow rate sensor -DIYhacking.com Arvind Sanjeev
Measure the liquid/water flow rate using this code.
Connect Vcc and Gnd of sensor to arduino, and the
signal line to arduino digital pin 2.
Source: @link https://diyhacking.com/projects/FlowMeterDIY.ino
*/
@franz-josef-kaiser
franz-josef-kaiser / composer.json
Created Feb 11, 2017
Composer bootstrapped Drupal scaffold.
View composer.json
{
"name" : "vendor/project",
"description" : "Much awesome. So wow.",
"type" : "project",
"license" : "MIT",
"authors" : [
{
"name" : "Firstname Lastname",
"email" : "user@example.com",
"role" : "Developer"
@franz-josef-kaiser
franz-josef-kaiser / sshfs.sh
Last active Mar 24, 2021
Example of SSHFS remote filesystem mounting. Useful in case one needs to access files created on a remote server on a regular basis
View sshfs.sh
#!/usr/bin/env bash
sshfs \
user@example.com:/home/user/project /local/folder/to/project \
-o ServerAliveInterval=15 \
-o ServerAliveCountMax=20 \
-o reconnect \
-o defer_permissions \
-o negative_vncache \
-o volname=vendorname \
View keybase.md

Keybase proof

I hereby claim:

  • I am franz-josef-kaiser on github.
  • I am wecodemore (https://keybase.io/wecodemore) on keybase.
  • I have a public key whose fingerprint is 28BE F577 7D40 8B11 E67A 0998 0254 B1D9 3645 9541

To claim this, I am signing this object:

@franz-josef-kaiser
franz-josef-kaiser / terminal.md
Last active Sep 17, 2016
Useful terminal commands
View terminal.md

OS X

Printer

Adding and Removing a Printer

This is done via the lpadmin command. To add a printer, use this format:

lpadmin -p Printer_Name -L "Printer Location" -E -v lpd://x.x.x.x 
 -P /Library/Printers/PPDs/Contents/Resources/en.lproj/Printer_Driver.gz