Skip to content

Instantly share code, notes, and snippets.

View jabedzaman's full-sized avatar

Jabed Zaman jabedzaman

View GitHub Profile
@jabedzaman
jabedzaman / spotify.js
Last active June 16, 2024 22:37
Fetch currently playing song on Spotify
// pages/api/spotify.
import querystring from 'querystring';
const {
NEXT_PUBLIC_SPOTIFY_CLIENT_ID: client_id,
NEXT_PUBLIC_SPOTIFY_CLIENT_SECRET: client_secret,
NEXT_PUBLIC_SPOTIFY_REFRESH_TOKEN: refresh_token,
} = process.env;
@santaklouse
santaklouse / CrossOver.sh
Last active November 14, 2024 17:50
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 7, 2024 10:42
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub