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
// needed for RTC.set(_, _), see bottom as well | |
#include <Wire.h> | |
#include <Time.h> | |
#include <DS1307RTC.h> | |
// from http://www.pjrc.com/teensy/td_libs_DS1307RTC.html | |
long lcnt=0; | |
void fcnt(void) { ++lcnt; } |
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
<!-- | |
Google geochart of Germany at provinces resolution | |
https://stamm-wilbrandt.de/en/github/Germany.html | |
https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart | |
--> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<script type='text/javascript' src='https://www.google.com/jsapi'></script> | |
<script type='text/javascript'> |
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
/* | |
hex2ppm.c -- this is a hack. | |
(Arduino ILI9341_due library ILIScreenshotViewer is Windows only) | |
Just copy the hex line from Serial console to eg. "scr.hex" file. | |
Then "hex2ppm src.hex > src.ppm" (followed by ppmtojpeg if needed). | |
Sample "tft.screenshotToConsole();" output in serial console window: | |
==== PIXEL DATA START ==== | |
0000000002 ... 1D4D0D4013F000015B8 |
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
import uasyncio as asyncio | |
N = 65 | |
loop = asyncio.get_event_loop(runq_len = N+1) | |
def collatz(x): | |
yield x | |
while x!=1: | |
x = 3*x+1 if x%2==1 else x//2 | |
yield x |
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 node | |
[scpt,pwd,host] = process.argv.slice(1); | |
cmd = process.argv.slice(4).join(" "); | |
out = 0; | |
last = ""; | |
if (process.argv.length < 5) { | |
console.log((require("path")).basename(scpt) + " pwd host cmd [...]"); | |
process.exit(1); |
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 | |
gw=`ip route show | grep "^default" | grep $if | cut -f3 -d\ ` | |
vip=`ip route show table local | grep ^local | grep $if | cut -f2 -d\ ` | |
# from https://unix.stackexchange.com/a/128428 | |
ip route add local $vip dev lo table 10 proto kernel scope host | |
ip rule add to $vip lookup 10 prio 1 | |
# |
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
// stepper Pan Tilt camera system: superglue connection of two 28BYJ-48 stepper motors | |
// | |
// based on https://www.thingiverse.com/thing:204734 by RGriffoGoes | |
// https://forum.arduino.cc/index.php?topic=647703.0 | |
// | |
module StepMotor28BYJ() | |
{ | |
difference(){ | |
union(){ | |
color("gray") cylinder(h = 19, r = 14, center = true, $fn = 32); |
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
# Live camera preview on main DPI display as well as HDMI0 monitor. | |
# | |
# Works only after running "rpi-update" until this commit will be available: | |
# | |
# https://github.com/raspberrypi/userland/commit/2549c149d8aa7f18ff201a1c0429cb26f9e2535a | |
# | |
# Values are Dispmanx display enums, therefore predominantly | |
# 0 = DSI/DPI LCD | |
# 2 = HDMI0 | |
# 3 = SDTV |
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) |
OlderNewer