Skip to content

Instantly share code, notes, and snippets.

View Jahhein's full-sized avatar
🎃
Tinkering with my RaspberryPi... automation? NAS? Home-assistant? I need another

Jacob Hein Jahhein

🎃
Tinkering with my RaspberryPi... automation? NAS? Home-assistant? I need another
View GitHub Profile
@Jahhein
Jahhein / 2x2-finder.scpt
Created June 15, 2016 22:53
Applescript 2x2 finder
property pWindowWidth : 975
property pWindowHeight : 440
property pWindowChromeHeight : 23
property pDockPadding : 1
on run
tell application "Finder"
close every window
my positionWindow(my makeWindow("/Users/mjt/"), 2)
my positionWindow(my makeWindow("/Users/mjt/Downloads/"), 1)
@Jahhein
Jahhein / brew-reinstall.sh
Created July 5, 2016 09:30
Homebrew reinstall
#!/bin/sh
# Brew uninstall -Jahhein
echo "Are you positive you wish to remove brew? Your brews and casks will
be placed into a text file. As always, be sure to trust any shell script you run!"
read -r -p "Are you sure? [y/N] " response
case $response in
[yY][eE][sS]|[yY])
# Create a brews list of formula and casks.
@Jahhein
Jahhein / .aliases
Created June 9, 2017 19:00
Bash/ZSH aliases
# ============================================================================ #
# Aliases
# ============================================================================ #
# ---------------------------------------------------------------------------- #
# Utility
# ---------------------------------------------------------------------------- #
alias cd..='cd ../' # Go back 1 directory level
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
@Jahhein
Jahhein / Subscriptions.opml
Last active July 1, 2017 23:40
developer-rss-feeds
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - Developer</title>
</head>
<body>
<outline text="apple" title="apple">
<outline htmlUrl="http://www.macworld.com" title="Macworld" xmlUrl="http://www.macworld.com/index.rss" type="rss" text="Macworld"/>
<outline htmlUrl="https://developer.apple.com/news/" title="News and Updates - Apple Developer" xmlUrl="https://developer.apple.com/news/rss/news.rss" type="rss" text="News and Updates - Apple Developer"/>
</outline>
@Jahhein
Jahhein / git-commit-template
Created July 7, 2017 11:03
Git Commit Template
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why the change.
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@Jahhein
Jahhein / htoprc
Last active July 12, 2017 14:51
HTOP Command-line System Tool Configuration
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=0
hide_userland_threads=0
shadow_other_users=1
show_thread_names=0
@Jahhein
Jahhein / 0_reuse_code.js
Created August 3, 2017 04:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Jahhein
Jahhein / Twitch-VLC-Player.md
Last active August 12, 2024 20:13
Twitch.tv Livestreams via VLC Media Player

Watch Twitch.tv livestreams with VLC

All-in-one

For those that just want to get to the point and start watching.

brew install streamlink && brew cask install vlc &&
  git clone https://gist.github.com/Jahhein/f96574f45b24aa797af13ce4c6812076 twitch-streamlink &&
  cd twitch-streamlink &&
@Jahhein
Jahhein / Curl-API-Token.md
Created March 6, 2018 01:53
Get github API token from cli using curl

Get github API token from cli using curl

# Here's a command you can run from your terminal to generate a token via curl:
# Where $USERNAME is your Github username. 
# Save the token generated and paste it in the settings section under the token option.
curl -v -u $USERNAME -X POST https://api.github.com/authorizations --data "{\"scopes\":[\"gist\"], \"note\": \"Token Description\"}"

# Where OTPCODE is the code your authenticator app shows you.
curl -v -u $USERNAME -H "X-GitHub-OTP: OTPCODE" -X POST https://api.github.com/authorizations --data "{\"scopes\":[\"gist\"], \"note\": \"Token Description\"}"
@Jahhein
Jahhein / Free-Goalkicker-PDFs.md
Last active March 2, 2022 15:24
Download all (48) free goalkicker.com note PDF files with a shell script!

About the script and cross platform

I was able to successfully run the script with versions:

Bash: GNU bash, version 4.4.19(1)-release

Wget: GNU Wget 1.19.4

Curl: curl 7.58.0 Working on it when I can