This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const convertBytes = (byteArray) => { | |
// converts arrays of 2 or 3 bytes into there integer values | |
if (byteArray.length === 2) { | |
return byteArray[1] * 128 + byteArray[0]; | |
} else if (byteArray.length === 3) { | |
return byteArray[2] * 16384 + byteArray[1] * 128 + byteArray[0]; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Reads Live logs in log.txt, supply with live version as argument | |
# chmod +x read_live_logs.py | |
# sudo cp read_live_logs.py /usr/local/bin | |
# Create an alias for quicker useage | |
# cd ~/. | |
# vim .zshrc | |
# Press i | |
# alias rll="read_live_logs.py" | |
# Press Esc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run the following commands to add to your terminal | |
# sudo cp copy_remote_script.sh /usr/local/bin | |
# cd /usr/local/bin | |
# chmod +x copy_remote_script.sh | |
# now from your remote script directory you can run 'sh copy_remote_script.sh . <SCRIPTNAME>' And it will do everything for you. | |
# If you want to shorten it you can add an alias | |
# cd ~/. | |
# vim .zshrc |