Skip to content

Instantly share code, notes, and snippets.

View jawi's full-sized avatar

Jan Willem Janssen jawi

View GitHub Profile
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
http://invisible-island.net/xterm/
XTerm Control Sequences
Edward Moy
University of California, Berkeley
Revised by
@Fornoth
Fornoth / Notes.md
Last active September 27, 2023 17:52
Makes a device show up in spotify connect devices list, but nothing else yet

#Python Script Setup

To get the python script running, run either pip install flask or pip install -r requirements.txt if you used git clone to clone the gist

#libspotify_embedded_shared.so notes

##Using the library (still in progress) There's a compile.sh that compiles a program that calls SpInit(), but doesn't get any farther because it needs more than just the API version number (which is 4)

##Spotify appkey

@jbeda
jbeda / gist:2cae7dd22a453c3caa94
Last active November 7, 2020 18:26
URLs for kubernetes release artifacts
$ gsutil ls -R gs://kubernetes-release/release/v0.5.4 | sed 's|gs://kubernetes-release|https://storage.googleapis.com/kubernetes-release|; /^.*:$/d; /^$/d'
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-darwin-386.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-darwin-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-386.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-arm.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-salt.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-server-linux-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/bin/darwin/386/kubecfg
@yeokm1
yeokm1 / Read-only FS on Arch Linux ARM.md
Last active June 5, 2024 18:56
Set up Arch Linux ARM on Raspberry Pi to boot from and use a read-only file-system

Read-only FS on Arch Linux ARM

Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.

Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.

Login with default username: alarm, password: alarm

#Optionally enable root over SSH. The rest of these instructions assume u are in root.
@jezen
jezen / Io Example Problems
Created December 15, 2013 13:17
The example problems have gone missing from the Io language website, so here’s a backup.
#Sample code
#Hello world
"Hello world!" print
#Factorial
factorial := method(n, if(n == 1, 1, n * factorial(n - 1)))
99 bottles of beer
@jtriley
jtriley / terminalsize.py
Created July 26, 2011 21:58
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()