sudo systemctl disable bonescript-autorun.service bonescript.socket node-red.socket nginx.service cloud9.socket
on BBB
/* | |
* bbb_eeprom.c Read Model & SerialNo from BeagleBone Black's EEPROM via i2c | |
* | |
* Compile with: | |
* cc bbb_eeprom.c -o bbb_eeprom | |
* | |
* Winston Smith <[email protected]> | |
* | |
* History: | |
* 2014-05-01 Initial Implementation for FreeBSD |
Target machine is raspberry pi zero, running raspbian 10 buster and zsh.
--color=on
can fix the color in terminal.
-R UTF8
can fix the character display problem, like lines in tree
.
minicom --color=on -8 -b 115200 -R UTF8 -D /dev/ttyUSB0
#!/bin/bash | |
# Simple command to display the wireless strenght signal | |
# | |
clear | |
while x=1 | |
do /System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I \ | |
| grep CtlRSSI \ | |
| sed -e 's/^.*://g' \ | |
| xargs -I SIGNAL printf "\rWifi dBm: SIGNAL" | |
sleep 0.5 |
#!/bin/sh | |
ip=1 | |
while [ $ip != "254]; do | |
ping 192.168.0.$ip -c 2 | grep -q "ttl=" && echo "192.168.0.$ip yes" || echo "192.168.0.$ip no" | |
ip=`expr "$ip" "+" "1"` | |
done |
Important reference http://www.tcpdump.org/manpages/pcap-filter.7.html
wlan addr1 00:e0:b9:7c:3b:b1 || wlan addr2 00:e0:b9:7c:3b:b1 || wlan addr3 00:e0:b9:7c:3b:b1
|| wlan addr4 00:e0:b9:7c:3b:b1
#!/bin/sh | |
# | |
# Put this file to /etc/pm/sleep.d/ | |
# chmod +x /etc/pm/sleep.d/99_ssh_keep_awake.sh | |
# | |
# | |
# Thanks to https://askubuntu.com/questions/521620/prevent-machine-from-sleeping-when-ssh-connections-are-on | |
# | |
ip=`w -h | awk '{print $1,$2,$3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'` |
#!/bin/bash | |
i="0" | |
while [ $i -lt 10000 ] | |
do | |
# osascript -e 'tell app "System Events" to display dialog "Dear Researchs: This is the first warning. Please stop playing games in the lab. \n IGS"' | |
# afplay /System/Library/Sounds/Basso.aiff | |
# say "b" | |
# echo -e "\a" |