Skip to content

Instantly share code, notes, and snippets.

View christian-korneck's full-sized avatar
💭
I may be slow to respond.

Christian Korneck christian-korneck

💭
I may be slow to respond.
View GitHub Profile
@christian-korneck
christian-korneck / README.md
Last active December 7, 2020 14:41
chrome enable reader mode

chrome://flags/#enable-reader-mode

@christian-korneck
christian-korneck / fix.sh
Created December 7, 2020 11:59
fix vscode laggy terminal in macos 11 big sur
codesign --remove-signature "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app"

Public WIFI login from the terminal

These are curl examples for confirming the captive portal login page of some public WIFI Hotspots.

Telekom

SSID: Telekom

alias telekom='onlinestatus=; onlinestatus=$(curl --silent --data-binary "{\"rememberMe\":false}" "https://hotspot.t-mobile.net/wlan/rest/freeLogin" | jq -r ".user.wlanLoginStatus"); if [ "$onlinestatus" != "online" ]; then echo error; else echo online; fi; onlinestatus='
@christian-korneck
christian-korneck / octokey
Last active April 25, 2024 09:40
octokey (.bashrc)
function octokey () {
if [ "${1}" == "" ]; then echo -e "Get a github user's ssh key(s). \nUsage: octokey github_username [all | key_index]" && return 1; fi
case "${2}" in
"")
local key_index=0
;;
a)
local key_index='' #jq wildcard
;;
all)
@christian-korneck
christian-korneck / docker_creds.bash
Created March 13, 2020 23:15
get docker desktop credentials
#!/bin/bash
docker-credential-desktop list | \
jq -r 'to_entries[].key' | \
while read; do
docker-credential-desktop get <<<"$REPLY";
done
@christian-korneck
christian-korneck / build_ncspot_darwin.sh
Last active March 2, 2020 22:36
build ncspot (ncurses spotify client) on macOS
#!/bin/bash
source $HOME/.cargo/env
brew install pkg-config
brew install portaudio
git clone --depth=50 --branch=master https://github.com/hrkfdn/ncspot.git hrkfdn/ncspot
cd hrkfdn/ncspot
export CARGO_FLAGS="--no-default-features --features portaudio_backend,cursive/pancurses-backend --release"
export PKG_CONFIG_PATH=`brew --prefix portaudio`/lib/pkgconfig #something like /usr/local/Cellar/portaudio/19.6.0/lib/pkgconfig
cargo build $CARGO_FLAGS
@christian-korneck
christian-korneck / keybase.md
Created February 21, 2020 18:46
keybase.md

Keybase proof

I hereby claim:

  • I am christian-korneck on github.
  • I am chr1stian (https://keybase.io/chr1stian) on keybase.
  • I have a public key whose fingerprint is DB30 FBED 2AD7 BD8A 01F3 CCDE 4EBE 2E5E DEB2 72F1

To claim this, I am signing this object:

@christian-korneck
christian-korneck / powerpoint_checklist.md
Last active December 7, 2020 12:02
powerpoint checklist
  • 1 message per slide
  • just image + short keywords (no full sentences, no redundancy to spoken word)
  • size: small headline, big keywords
  • contrast: highlight only the currently "active" point, gray out past (inactive) points, hide + later fade in future points
  • dark background
  • 5 to 6 objects per slide
@christian-korneck
christian-korneck / pypackagereq.py
Created April 23, 2019 19:09
python package requirements regex
import re
match = re.search(r"(?P<name>[a-zA-Z0-9_-]{1,})(?P<operator>[=><]{2,})(?P<version>[0-9]{1,}[0-9\.]{0,})", "lets-get==1.0.0")
name = match.group("name")
operator = match.group("operator")
version = match.group("version")
@christian-korneck
christian-korneck / mkUnprivedSymlink.py
Created April 6, 2019 21:47
make unprivileged windows 10 symlink ( python ctypes )