Skip to content

Instantly share code, notes, and snippets.

View mberkowski's full-sized avatar

Michael Berkowski mberkowski

View GitHub Profile
# Snowfall, snow depth only starting Oct 1, 2020, MSP airport ("sid": "mspthr")
curl 'https://data.rcc-acis.org/StnData' \
-H 'Accept: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
--data-raw 'params={"sid":"mspthr","sdate":"2020-10-01","edate":"por","elems":[{"name":"snow","interval":"dly","duration":"dly","add":"t"},{"name":"snwd","interval":"dly","duration":"dly","add":"t"}]}'
# "sid": "mspthr" -- MSP airport, change to your airport code
# "sdate": start date
# "edate": ending date, "por" seems to mean up to present day
# Additional elems:
@mberkowski
mberkowski / mprdailydownload.sh
Last active May 10, 2021 13:15
MPR Classical Daily Download Downloader
#!/bin/bash
#
# https://www.yourclassical.org/topics/daily-download
# Downloads an MPR Classical "Daily Download" mp3 file
# to $HOME/music/mprdailydownload.
# Supply a date argument as YYYY-MM-DD for a specific date's download
# or omit the argument for today's download.
#
# If the command `ffprobe` (from `ffmpeg`) is available, the file will be renamed as
# YYYYMMDD-Composer_composer-Title-title.mp3
@mberkowski
mberkowski / tmux_basic_usage.md
Last active July 7, 2021 09:55
Tmux Basic Usage

Basic Tmux Usage

https://tmux.github.io/ <-- Tmux project

http://z.umn.edu/tmuxgist <-- this document!

The Prefix Keystroke Ctrl-b

  • Crtl-b c Create a new window
  • Crtl-b <N> Switch to window <N>
  • Crtl-b ? List available keystrokes
  • Crtl-b , Rename current window

Keybase proof

I hereby claim:

  • I am mberkowski on github.
  • I am mberkowski (https://keybase.io/mberkowski) on keybase.
  • I have a public key whose fingerprint is AECF 1B41 4455 C348 5DE4 1420 D352 8993 8E95 0B66

To claim this, I am signing this object:

@mberkowski
mberkowski / git-current-branch.vim
Last active December 14, 2015 03:39
A simple Vimscript function `GitCurrentBranch()` which returns the git branch of the current buffer. It is really nothing fancy - it just loads the branch into the buffer variable `b:gitbranch` upon reading a buffer via `autocmd`. Ideally, it can be used in the statusline with `:set statusline+=%{b:gitbranch}`
" Retrieves git branch of the current file
" Perfect for feeding the branch into the statusline
" Depends on autocmd
"
" USAGE:--------------------------------------------
"
" Call in statusline as %{b:gitbranch}
" :set statusline+={%b:gitbranch}
function! GitCurrentBranch()