Skip to content

Instantly share code, notes, and snippets.

Working from home

Kenji Rikitake jj1bdx

Working from home
Block or report user

Report or block jj1bdx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jj1bdx /
Created Nov 4, 2019
Import GitHub issues and the issue comments
#!/usr/bin/env python3
# Retrieve issues and the issue comments of a repository
# See for the PyGitHub manual
# See
# for the original code
import json
from github import Github
def parse_issue(issue):
jj1bdx /
Last active Oct 20, 2019
The limitation of ham radio for the social acceptance: requirement of non-apartment hut-type houses and towers, beam antennas, linear amplifiers, and how the technologies have become ancient and no longer cutting-edge


(Originally from Facebook 20-OCT-2018)




jj1bdx /
Created Jul 23, 2019
Using macOS diskutil output to search the device identifier for a given volume name
# search mount point based on the device name
search_devicename () {
diskutil list -plist | \
plutil -convert json -r -o - - | \
jq -c '[.AllDisksAndPartitions[].APFSVolumes, .AllDisksAndPartitions[].Partitions] | flatten | map(select(has("VolumeName")))[] | {volume: .VolumeName?, id: .DeviceIdentifier?}' | \
jq -r --arg volname "$1" 'select(.volume == $volname) | .id?'
jj1bdx /
Last active Jul 18, 2019
Fix XQuartz path on old macOS or OS X

Fix XQuartz path on old macOS or OS X


  • Old OS X had X11 binaries under /usr/bin (and XQuartz circa 2016)
  • Modern OS X has /usr/bin protected and unmodifiable
  • XQuartz installs the files under /opt/X11/bin
  • /usr/libexec/path_helper -s puts /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin at the top of the PATH variable

A workaround

jj1bdx / dot-zlogin-stty.zsh
Created Jul 4, 2019
stty .zlogin setting (obsoleted)
View dot-zlogin-stty.zsh
# This is an stty kludge I had been using for FreeBSD,
# which is no longer required for macOS with zsh.
setopt noglob
eval `tset -s -Q -e ^H -r -I -m "dialup:?vt100"`
# tmux kludge
stty erase "^?" erase2 "^H"
setopt glob
jj1bdx /
Last active Sep 5, 2019
Calibrating frequency of Airspy HF+ Dual Port/Discovery and Airspy R2/Mini
jj1bdx /
Created Apr 4, 2019
sox examples for macOS coreaudio
# equivalent to `play`
sox -t raw -esigned-integer -b16 -r 48000 -c 2 -q - -t coreaudio "default"
play --buffer=1024 -t raw -esigned-integer -b16 -r 48000 -c 2 -q -
# check macOS devices
sox -V6 -n -t coreaudio nonexistent
jj1bdx / cidr-cheat-sheet
Created Mar 25, 2019 — forked from charlesgreen/cidr-cheat-sheet
View cidr-cheat-sheet
Netmask Netmask (binary) CIDR Notes
_____________________________________________________________________________ 11111111.11111111.11111111.11111111 /32 Host (single addr) 11111111.11111111.11111111.11111110 /31 Unuseable 11111111.11111111.11111111.11111100 /30 2 useable 11111111.11111111.11111111.11111000 /29 6 useable
jj1bdx / duolingo-swedish-fur-pret.txt
Last active Apr 4, 2019
Duolingo Swedish example text for Future Perfect
View duolingo-swedish-fur-pret.txt
När vi skulle åka till sjukhuset gick bilen sönder.
De skulle åka till Frankrike på semester.
Filmen skulle precis börja när allt blev svart.
När vi skulle åka upptäckte vi att bilen var stulen.
Hon gick tidigare, eftersom hon skulle träffa sin syster.
Vi skulle börja med att spela fotboll, men han hade glömt bollen hemma.
Jag hoppades att du skulle komma.
Hon skulle komma efter honom.
Mannen skulle träffa sin fru när han kom ihåg att han hade glömt hennes väska.
Han såg ut som om han skulle börja gråta.
jj1bdx /
Created Mar 1, 2019
Scripts to retrieve MPX (FM demodulated) output for FM broadcasting with RTL-SDR / Airspy and csdr
# 88.1MHz (10Msps, Set 500kHz upper freq)
# CF32 IQ signal decimated to 768kHz first,
# FM decoded to real signal,
# then decimate by 4 to 192kHz CF32 output
airspy_rx -r/dev/fd/1 -p0 -f88.6 -a10000000 -t0 -g7 | \
csdr shift_addition_cc 0.05 | \
csdr fir_decimate_cc 13.028333333333 0.05 HAMMING | \
csdr fmdemod_quadri_cf | csdr fractional_decimator_ff 4
You can’t perform that action at this time.