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
const int statusPin = LED_BUILTIN; // status LED pin | |
const int flashPin = D1; // flash pin | |
const int ldrPin = A0; // select the input pin for the LDR | |
//const int pwrPin = A3; // power pin | |
int sensorValue = 0; // variable to store the value coming from the LDR | |
void setup() | |
{ | |
pinMode(ldrPin,INPUT); | |
pinMode(statusPin, OUTPUT); |
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
/* | |
* Hello world web server | |
* circuits4you.com | |
*/ | |
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
//SSID and Password to your ESP Access Point | |
const char* ssid = "ESP8266"; |
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
abschnecken | |
nirgendwas | |
dement sprechend, dement schweigend | |
Nussschnecke - Frollein, das zwar nicht clever, aber dafür schön ist | |
bemitneiden | |
writearound | |
Schnexitus | |
Schnexit | |
Schneckopocalypse -> Schnec(k)olypse! | |
clusterfake - Sven's Raspberry Pi 3 Ceph cluster |
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
#!/usr/bin/env bash | |
lat=`exiftool -n -p '$GPSlatitude' $1` | |
lon=`exiftool -n -p '$GPSlongitude' $1` | |
osm="http://www.openstreetmap.org/?mlat=$lat&mlon=$lon&zoom=18" | |
xdg-open $osm |
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
#!/usr/bin/python | |
# filedrop.py | |
# http://zetcode.com/wxpython/draganddrop/ | |
import wx, os, shutil, ntpath | |
dest_dir = '/home/user/backup/' | |
if not os.path.exists(dest_dir): |
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
from microbit import * | |
a = 0 | |
b = 0 | |
while True: | |
if button_a.is_pressed(): | |
a = a + button_a.get_presses() | |
display.scroll(str(a)) | |
if button_b.is_pressed(): | |
b = b + button_b.get_presses() | |
display.scroll(str(b)) |
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 | |
#OPTIND=1 | |
while getopts "h?sdyar" opt; do | |
case $opt in | |
s) exiftool -directory=%e . | |
;; | |
d) exiftool -d %Y%m%d-%H%M%S.%%e '-FileName<DateTimeOriginal' -r . | |
;; | |
y) exiftool '-Directory<CreateDate' -d %Y-%m-%d -r . | |
;; |
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 | |
latlon="geo:"$(xclip -o | tr -d ' ') | |
notify-send $latlon -i info | |
echo $latlon | xclip -selection c |
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 | |
ping -c1 google.com &>/dev/null | |
if [ $? -eq 0 ]; then | |
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p') | |
curl "https://dweet.io/dweet/for/$THING?IP=$IP" | |
fi |
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 | |
uuser="unsplash_user_name" | |
path="path/to/dir" | |
size=$(xdpyinfo | grep dimensions | awk '{print $2}') | |
curl "https://source.unsplash.com/user/$uuser/$size" --location --output $path/unsplash-random.jpeg | |
gsettings set org.gnome.desktop.background picture-uri file://$path/unsplash-random.jpeg |