- Add sudoer
# Config editor
sudo update-alternatives --config editor
#add user to sudoer
vi /etc/sudoers (visudo)
## Allow root to run any commands anywhere
sudo pip install git+git://github.com/powerline/powerline | |
wget https://github.com/powerline/powerline/blob/develop/font/PowerlineSymbols.otf?raw=true -O PowerlineSymbols.otf | |
sudo mv PowerlineSymbols.otf /usr/share/fonts/ | |
fc-cache -vf /usr/share/fonts/ | |
wget https://raw.githubusercontent.com/powerline/powerline/develop/font/10-powerline-symbols.conf | |
sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/ | |
echo "set rtp+=/usr/lib/python2.7/site-packages/powerline/bindings/vim/" >> ~/.vimrc | |
echo "set laststatus=2" >> ~/.vimrc | |
echo "set t_Co=256" >> ~/.vimrc |
# Config editor
sudo update-alternatives --config editor
#add user to sudoer
vi /etc/sudoers (visudo)
## Allow root to run any commands anywhere
hostname.onedumb.com
, port: 203
1433
, Destination: sqlhost:1433
pi
password: 1qazxsw2
127.0.0.1
SA
passWORD
def cluster(data, maxgap): | |
'''Arrange data into groups where successive elements | |
differ by no more than *maxgap* | |
>>> cluster([1, 6, 9, 100, 102, 105, 109, 134, 139], maxgap=10) | |
[[1, 6, 9], [100, 102, 105, 109], [134, 139]] | |
>>> cluster([1, 6, 9, 99, 100, 102, 105, 134, 139, 141], maxgap=10) | |
[[1, 6, 9], [99, 100, 102, 105], [134, 139, 141]] |
#!/bin/bash | |
TARGET_SERVICE=server_status_web | |
service_start_cmd='/home/pi/run/server_statisic/FlaskApp/server_status_web.py' | |
usage(){ | |
echo -e "Usage: bash $0 [ start | stop | restart ] " | |
exit 1 | |
} | |
start_service(){ |
import gc | |
import machine | |
# import machine | |
import time | |
import network | |
SSID='Poop' | |
PWD='cockcock' | |
# Configure GPIO pins 0 and 2 to be used for |
libnfc supports UUID writable cards and even has some dedicated tools for them.
However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.
Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.
The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):
// Try to write the trailer
for %%F in (*.zip) do ( "C:\Program Files\7-Zip\7z.exe" x -y -o"%%F_tmp" "%%F" * & pushd %%F_tmp & "C:\Program Files\7-Zip\7z.exe" a -y -r -t7z ..\"%%~nF".7z * & popd & rmdir /s /q "%%F_tmp" ) |
#!/bin/bash | |
#filename seerver_moniter.sh | |
mem_quota=20 | |
hd_quota=50 | |
cpu_quota=80 | |
# watch memory usage | |
watch_mem() |
#!/bin/bash | |
TIMESTAMP=$(date +%F) | |
ssh -i /home/pi/.ssh/id_rsa_3072 root@192.168.31.240 <<'ENDSSH' | |
#commands to run on remote host | |
rm reaver_backup_*.zip; | |
zip -r ~/reaver_backup_`date +"%Y%m%d"`.zip /usr/local/etc/reaver; | |
scp -i /root/.ssh/id_rsa_3072 ~/reaver_backup*.zip pi@192.168.31.179:~/; | |
exit |