Skip to content

Instantly share code, notes, and snippets.

Florian Knodt adlerweb

Block or report user

Report or block adlerweb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:cbcc3f023ea848697270
<?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);
View kicad-install.gentoo.patch
--- 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 Jul 17, 2016
powerline config
View bashrc
# 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
View associate.cmd
@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
View keybase.md

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:

View sds011.php
<?php
if($argc != 2) {
echo 'Usage: '.$argv[0].' Port'."\n";
echo 'example: '.$argv[0].' /dev/ttyUSB0'."\n";
exit(2);
}
$port = @fopen($argv[1], 'r+');
if(!$port) {
@adlerweb
adlerweb / composersetup.sh
Created Jun 10, 2017
Composer Install Script
View composersetup.sh
#!/bin/sh
#Taken from https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md, here to allow for simple installation
#Use at your own risk.
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
@adlerweb
adlerweb / vref.ino
Created Jul 28, 2017
Voltage reference hack
View vref.ino
#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[] = {
View geomag.php
<?php
$port = STDIN;
$out = array();
$b=0;
$dlc = -1;
$buffer = array();
while(!feof($port)) {
$curByte = ord(fread($port, 1));
View ESP8266-1080p.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.