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/env python3 | |
''' | |
Pipeable "file" command replacement for gif/jpeg/png images. | |
Outputs three lines (type, width, height), followed by copy of input. | |
''' | |
import struct | |
import sys | |
def get_image_type_size(fhandle): |
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
foo | |
Aa (Orchidaceae) | |
Aaronsohnia (Compositae) | |
Abacopteris (Thelypteridaceae) | |
Abarema (Leguminosae) | |
Abatia (Salicaceae) | |
Abdominea (Orchidaceae) | |
Abdulmajidia (Lecythidaceae) | |
Abelia (Caprifoliaceae) | |
Abeliophyllum (Oleaceae) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <time.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <linux/fb.h> | |
#include <sys/mman.h> |
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/bash | |
if [[ rgb2fb.c -nt rgb2fb ]]; then | |
echo "compiling rgb2fb.c"; gcc -O6 -Wall -pedantic -Wextra rgb2fb.c -o rgb2fb | |
fi | |
if [[ "$#" > 0 ]]; then t=$1; else t=600000; fi | |
raspividyuv -fps 90 -rgb -o - -pts $0.pts \ | |
-md 7 -w 640 -h 480 -n -t $t -awb greyworld | \ | |
./rgb2fb 640 480 F 2> $0.txt |
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/bash | |
if [[ rgb2fb.c -nt rgb2fb ]]; then | |
echo "compiling rgb2fb.c"; gcc -O6 -Wall -pedantic -Wextra rgb2fb.c -o rgb2fb | |
fi | |
if [[ "$#" > 0 ]]; then t=$1; else t=600000; fi | |
raspividyuv -fps 135 -rgb -o - -pts $0.pts \ | |
-md 7 -w 640 -h 480 -n -t $t -awb greyworld | \ | |
./rgb2fb 640 480 0 2> $0.txt |
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
/* | |
$ gcc -O6 -Wall -pedantic -Wextra -o toggle toggle.c -lpigpio -lrt -lpthread | |
$ | |
Usage: | |
$ sudo killall pigpiod | |
$ sudo ./toggle 30 & | |
$ raspivid -md 1 -w 1920 -h 1080 -p 22,50,960,540 -o tst.h264 -fps 30 -t 8000 -pts tst.pts | |
$ ./ptsanalyze tst.pts 0 | |
$ # https://github.com/Hermann-SW/userland/blob/master/tools/ptsanalyze |
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/bash | |
while true | |
do | |
fin_wait2=`netstat 2>/dev/null | grep 1337` | |
if [[ "$fin_wait2" = "" ]] | |
then | |
sudo ./dead-man_button | |
else | |
sudo ./dead-man_button 1338 | |
fi |
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
#include <Wire.h> | |
#include "SSD1306Wire.h" | |
SSD1306Wire display(0x3c, 5, 4); | |
#include "WiFi.h" | |
#include <WiFiMulti.h> | |
WiFiMulti WiFiMulti; | |
WiFiClient client; |
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/bash | |
if [[ "$1" == "" || ${1: -4} != ".ino" ]]; then | |
echo -e "Usage:\n"`basename $0`" file.ino\nsudo ./file" | |
exit | |
fi | |
wrapper=`cat << EndOfWrapper | |
#include <time.h> | |
#include <unistd.h> |