This file contains hidden or 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
uint32_t bin2bcd(const uint16_t in) { | |
uint32_t out = 0; | |
for (uint8_t pos = 13; pos >= 0; pos--) { | |
if ((out & 0xF) >= 5) | |
out += 3; | |
if (((out & 0xF0) >> 4) >= 5) | |
out += (3 << 4); | |
if (((out & 0xF00) >> 8) >= 5) | |
out += (3 << 8); | |
out = (out << 1) | ((in >> pos) & 1); |
This file contains hidden or 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
/******************************* SOURCE LICENSE ********************************* | |
Copyright (c) 2018 MicroModeler. | |
A non-exclusive, nontransferable, perpetual, royalty-free license is granted to the Licensee to | |
use the following Information for academic, non-profit, or government-sponsored research purposes. | |
Use of the following Information under this License is restricted to NON-COMMERCIAL PURPOSES ONLY. | |
Commercial use of the following Information requires a separately executed written license agreement. | |
This Information is distributed WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or 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
/******************************* SOURCE LICENSE ********************************* | |
Copyright (c) 2018 MicroModeler. | |
A non-exclusive, nontransferable, perpetual, royalty-free license is granted to the Licensee to | |
use the following Information for academic, non-profit, or government-sponsored research purposes. | |
Use of the following Information under this License is restricted to NON-COMMERCIAL PURPOSES ONLY. | |
Commercial use of the following Information requires a separately executed written license agreement. | |
This Information is distributed WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or 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
/******************************* SOURCE LICENSE ********************************* | |
Copyright (c) 2018 MicroModeler. | |
A non-exclusive, nontransferable, perpetual, royalty-free license is granted to the Licensee to | |
use the following Information for academic, non-profit, or government-sponsored research purposes. | |
Use of the following Information under this License is restricted to NON-COMMERCIAL PURPOSES ONLY. | |
Commercial use of the following Information requires a separately executed written license agreement. | |
This Information is distributed WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
This file contains hidden or 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
sudo iw wlan0 scan | grep -io '\(^bss [^(]*\)\|\(signal: [-.0-9]*\)' | sed -e :a -e '$!N; s/\n/ /; ta' | sed 's/\.[0-9]\+ BSS /;/g' | sed 's/ signal: /,/g' | sed 's/BSS //g; s/\.00//g' | base64 -w 0 | xargs -I{} curl -v "http://api.mylnikov.org/geolocation/wifi?v=1.1&data=open&search={}" |
This file contains hidden or 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
METAR | |
===== | |
http://weather.noaa.gov/pub/data/observations/metar/decoded/LRBS.TXT | |
http://weather.noaa.gov/pub/data/observations/metar/stations/LRBS.TXT | |
TAF | |
=== | |
http://weather.noaa.gov/pub/data/forecasts/taf/stations/LRBS.TXT | |
http://tgftp.nws.noaa.gov/data/forecasts/taf/stations/LRBS.TXT |
This file contains hidden or 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 /etc/rc.common | |
# | |
# Startup script for mjpg-streamer with file input plugin | |
# | |
START=50 | |
STOP=50 | |
PROG=/usr/bin/mjpg_streamer | |
start() { | |
start-stop-daemon -S -b -x "${PROG}" -- -i "input_file.so -f /tmp -n snapshot.jpg -d 5" -o "output_http.so -p 8090 -w /www/webcam -n" |
This file contains hidden or 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/bash | |
# Convert all mjpg AVI movies created by Niokon camera to mp4 | |
if [ ! "$1" ] | |
then | |
find . -iname '*.avi' -exec "$0" "{}" \; | |
exit 1 | |
fi | |
I="$1" | |
B="${I##*/}" |
This file contains hidden or 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
1. Add the @afivepaper command before the end of header. | |
2. Create the dvi file: | |
$ texi2dvi4a2ps FILE.texi | |
3. If needed, center the content: | |
$ dvips -t a5 -O -11mm,0mm -o FILE.ps FILE.dvi | |
4. Create the PostScript book: | |
$ cat FILE.ps | psbook -s4 | psnup -2 -Pa5 -m0 -d0 > FILE_book.ps | |
5. Create the PDF file: | |
$ ps2pdf -sPAPERSIZE=a4 -dPDFSETTINGS=/printer FILE_book.ps FILE_book.pdf |
This file contains hidden or 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 | |
# Create playlists with all available stations of sky.fm, di.fm and JazzRadio and send them by email | |
# Create all playlists | |
for station in sky di jazz | |
do | |
for format in mp3 aac | |
do | |
`dirname $0`/radio2playlist $station $format | |
done |
NewerOlder