Skip to content

Instantly share code, notes, and snippets.

View PH9's full-sized avatar
🚀
To infinite and beyond

Wasith 'Pi' Theerapattrathamrong PH9

🚀
To infinite and beyond
View GitHub Profile
@narate
narate / vibie.play
Last active January 17, 2018 16:50
ffplay live from vibie.live required ffmpeg --with-ffplay and jq
#!/bin/bash
LIVE_DATA=$(curl -s "$1" | grep __NEXT_DATA__ | sed 's/__NEXT_DATA__ =//g')
STATUS=$(echo $LIVE_DATA | jq '.props.live.status' | sed 's/"//g')
if [ $STATUS == "inactive" ]
then
echo "ERROR: live status is $STATUS"
exit -1
fi
@PH9
PH9 / format.sh
Last active April 14, 2021 14:16
SwiftLint - That run only on modified (new, changes, cached, staged) files
#!/bin/bash
#
# Run SwiftLint
START_DATE=$(date +"%s")
SWIFT_LINT=/usr/local/bin/swiftlint
SWIFT_FORMAT=/usr/local/bin/swiftformat
if [[ -e "${SWIFT_LINT}" ]]; then