A handy cheat sheet for various FFmpeg commands I use frequently.
ffmpeg -i input -c:v libx265 -c:a copy output
dnaBin = {'A': '00', 'T': '01', 'C': '10', 'G': '11'} | |
def selectionMenu(): | |
response = input('\nWould you like to encode or decode DNA? [e/D]: ').lower() | |
if response == 'e': | |
text = input('\nInput text to encode: ') | |
encodeDNA(text) | |
elif response == 'd': | |
text = input('\nInput DNA to decode: ') |
import subprocess | |
import re | |
from prettytable import PrettyTable | |
airport = '/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport' | |
print('Scanning for networks...\n') | |
scan = subprocess.run(['sudo', airport, '-s'], stdout=subprocess.PIPE) | |
scan = scan.stdout.decode('utf-8') |
{ | |
"parserOptions": { | |
"ecmaVersion": 2021, | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"sourceType": "module" | |
}, | |
"env": { |
If you expose your Pi's SSH service to the web, you should seriously consider the security implications.
It is common for people to run mass port scans looking for open SSH ports and then run brute-force attacks against these ports hoping to crack the password and gain access to the system.
Follow this guide for a secure SSH setup.
This gist walks you through the method I used for setting up Homebridge on my Raspberry Pi 3 Model B. Many aspects are taken from the original Homebridge wiki. Note that steps can vary between Raspberry Pi models and as packages are updated or changed.
Mandatory
#! /bin/bash | |
#DESCRIPTION: Pings all the IPs in the list and reports whether or not they are reachable | |
GREEN='\033[1;32m' | |
RED='\033[1;31m' | |
BLUE='\033[1;34m' | |
THICK='\033[1;37m' #For white backgrounds, use: THICK='\033[1;30m' | |
NC='\033[0m' |
Watch a demo here
Note: These steps will only work if your NodeMCU has the CP2102 chip onboard (instead of the CH340G chip).
Have the .ino
script included in the repository downloaded and ready to go.
Download and install the Arduino IDE from here.