Skip to content

Instantly share code, notes, and snippets.

#define SCLERA_WIDTH 200
#define SCLERA_HEIGHT 200
const uint16_t scleraDefault[SCLERA_HEIGHT][SCLERA_WIDTH] = {
0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901,
0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901,
0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901,
0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901,
0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901,
0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901, 0X6901,
//--------------------------------------------------------------------------
// 2018 Modified by Laurent Moll for Uncanny Eyes costume
// https://www.hackster.io/projects/376a13/
// Based on Adafruit code - Adafruit header below:
//
// Uncanny eyes for PJRC Teensy 3.1 with Adafruit 1.5" OLED (product #1431)
// or 1.44" TFT LCD (#2088). This uses Teensy-3.1-specific features and
// WILL NOT work on normal Arduino or other boards! Use 72 MHz (Optimized)
// board speed -- OLED does not work at 96 MHz.
//
sudo iptables -t nat -A PREROUTING -p tcp --dport 8888 -j DNAT --to-destination 192.168.1.5:8888
sudo iptables -t nat -A POSTROUTING -p tcp -d 192.168.1.5 --dport 8888 -j SNAT --to-source 192.168.1.4
#include "esp_timer.h"
#include <Wire.h>
#include <FastLED.h>
// Go to TTGO T-Display's Github Repository
// Download the code as zip, extract it and copy the Folder TFT_eSPI
// => https://github.com/Xinyuan-LilyGO/TTGO-T-Display/archive/master.zip
// to your Arduino library path
#include <TFT_eSPI.h>
#include <SPI.h>
@bjoerns1983
bjoerns1983 / compile-booksonic.sh
Last active February 2, 2021 21:23
Compile Booksonic App
cd Downloads/
git clone --recursive https://github.com/popeen/Booksonic-App.git
cd Booksonic-App/
docker run --rm -v $(pwd):/project mingc/android-build-box bash -c 'cd /project; bash ./gradlew assembleRelease'
cp app/build/outputs/apk/floss/release/*.apk .
keytool -genkey -v -keystore release.keystore -alias Booksonic-release -keyalg RSA -keysize 2048 -validity 10000
cd ~/Android/Sdk/build-tools/30.0.3/
./zipalign -f -v 4 ~/Downloads/Booksonic-App/Booksonic\ 2009-floss-release-unsigned.apk ~/Downloads/Booksonic-App/Booksonic\ 2009-floss-release-aligned.apk
./apksigner sign --ks ~/Downloads/Booksonic-App/release.keystore --ks-key-alias Booksonic-release ~/Downloads/Booksonic-App/Booksonic\ 2009-floss-release-aligned.apk
[Desktop Entry]
Name=Shutdown for Dock
Exec=gnome-session-quit --power-off
Comment=Shutdown button for Ubuntu dock
Terminal=false
Type=Application
Icon=system-shutdown
#Repos für PHP 7.2 und nginx hinzufügen
add-apt-repository ppa:ondrej/php
add-apt-repository ppa:ondrej/nginx
apt-get update
#Liste der installierten PHP7.0 Module anzeigen lassen
dpkg --get-selections | grep -v deinstall | grep php7.0
#PHP 7.2 installieren
apt-get install php7.2
#!/bin/bash
macadress="XX:XX:XX:XX:XX:XX"
ip="XXX.XXX.XXX.XXX"
logfile="/var/log/nginx/site_access.log"
tail -n1 -F $logfile | while read line
do
user=$(echo $line | cut -d " " -f3)
scode=$(echo $line | cut -d " " -f9)
Host vps
Hostname IP-DES-VPS
User root
IdentityFile /home/user/.ssh/vps
DynamicForward IP-DES-LAN-SERVERS:4000
ServerAliveInterval 30
ServerAliveCountMax 3
#!/bin/bash
#
# set ACPI Wakeup alarm
# safe_margin - minutes to start up system before the earliest timer
# script does not check if recording is in progress
#
#
echo 1 > /timer