Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View adlerweb's full-sized avatar

Florian Knodt adlerweb

View GitHub Profile
@adlerweb
adlerweb / gist:cbcc3f023ea848697270
Created February 15, 2015 03:51
ESP8266 -> Volkszäler
<?php
while(true) {
$html = file_get_contents('http://1.2.3.4/dht22.tpl');
if(preg_match('/temperature reading is ([\d\.]+)\*C, humidity is ([\d\.]+) ./', $html, $match)) {
vz_add('**UUID_TEMPERATUR**', $match[1]);
vz_add('**UUID_FEUCHTE**', $match[2]);
}
echo '--'."\n";
sleep(10);
--- kicad-install.sh.org 2015-04-07 10:39:13.000000000 +0200
+++ kicad-install.sh 2015-04-08 08:31:41.000000000 +0200
@@ -2,6 +2,7 @@
# Install KiCad from source onto either:
# -> a Ubuntu/Debian/Mint or
# -> a Red Hat
+# -> a Gentoo
# compatible linux system.
#
# The "install_prerequisites" step is the only "distro dependent" one. That step could be modified
@adlerweb
adlerweb / bashrc
Created July 17, 2016 01:01
powerline config
# Powerline
if [ -f `which powerline-daemon` ]; then
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/lib/python3.5/site-packages/powerline/bindings/bash/powerline.sh
fi
@echo off
SET SC=HKLM\Software\Classes
SET Extn=001-9 7z-0 arj-4 bz2-2 bzip2-2 cab-7 cpio-7 deb-11 dmg-17 gz-14 fat-21 gz-14 gzip-14 hfs-18 iso-8 lha-6 lzh-6 lzma-16 ntfs-22 rar-3 rpm-10 split-9 squashfs-24 swm-15 tar-13 taz-5 tbz-2 tbz2-2 tgz-14 tpz-14 txz-23 vhd-20 wim-15 xar-19 xz-23 z-5 zip-1001-9 7z-0 arj-4 bz2-2 bzip2-2 cab-7 cpio-7 deb-11 dmg-17 gz-14 fat-21 gz-14 gzip-14 hfs-18 iso-8 lha-6 lzh-6 lzma-16 ntfs-22 rar-3 rpm-10 split-9 squashfs-24 swm-15 tar-13 taz-5 tbz-2 tbz2-2 tgz-14 tpz-14 txz-23 vhd-20 wim-15 xar-19 xz-23 z-5 zip-1
FOR %%j IN (%Extn%) DO (
FOR /F "tokens=1,2 delims=-" %%A IN ("%%j") DO (
REG ADD %SC%\.%%A /VE /D "7-Zip.%%A" /F
REG ADD %SC%\7-Zip.%%A /VE /D "%%A Archive" /F
REG ADD %SC%\7-Zip.%%A\DefaultIcon /VE /D "%PROGRAMFILES%\7-Zip\7z.dll,%%B" /F

Keybase proof

I hereby claim:

  • I am adlerweb on github.
  • I am adlerweb (https://keybase.io/adlerweb) on keybase.
  • I have a public key whose fingerprint is 7CBC 82F8 8284 B4EB 79E4 0AC7 C374 B04A 1A1E F2DA

To claim this, I am signing this object:

@adlerweb
adlerweb / vref.ino
Created July 28, 2017 20:12
Voltage reference hack
#include <Bounce2.h>
//Pin mapping
const byte LED[] = {2,4,3,5}; //Jepp, I screwed up while soldering ;)
const byte SW = 6;
const byte SYSLED = LED_BUILTIN;
//ATT: When powering on or switching voltages the output may provide +10V for a brief moment
const String volt[] = {
<?php
$port = STDIN;
$out = array();
$b=0;
$dlc = -1;
$buffer = array();
while(!feof($port)) {
$curByte = ord(fread($port, 1));
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@adlerweb
adlerweb / LCDWiFi.ino
Created June 10, 2018 00:41
ESP8266 HD44780 WiFi
#include <LiquidCrystal.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
const char *ssid = "freifunk-myk.de";
const char *password = "";
const char *netname = "esp-lcd";
@adlerweb
adlerweb / ytwll2m3u.php
Created April 26, 2015 08:14
Youtube WatchLater to Playlist Script
<?php
/**
* Youtube Watch Later List To Playlist Script
*
* This script fetches your watch later list and outputs it as an M3U playlist
*
* Requirements:
* PHP enabled webserver
* Google PHP API (https://github.com/google/google-api-php-client)