Skip to content

Instantly share code, notes, and snippets.

@bjoerns1983
bjoerns1983 / ttrss.service
Last active October 30, 2019 10:55
Systemd script for ttrss updater
[Unit]
Description=ttrss_backend
After=network.target mysql.service
[Service]
User=www-data
ExecStart=/usr/bin/php7.2 /var/www/ttrss/update_daemon2.php
[Install]
WantedBy=multi-user.target
#!/bin/sh
ipv6="$2"
start() {
echo -n "Starting Tunnels: "
echo "$ipv6" | awk '{print "/usr/bin/6tunnel 8080 "$1" 8080"}' | /bin/sh
echo "$ipv6" | awk '{print "/usr/bin/6tunnel 21 "$1" 21"}' | /bin/sh
echo "$ipv6" | awk '{print "/usr/bin/6tunnel 443 "$1" 443"}' | /bin/sh
return
@bjoerns1983
bjoerns1983 / ttrss
Created November 7, 2016 15:02
Nginx Config for ttrss (Tiny Tiny RSS)
server {
listen 80;
listen [::]:80;
server_name reader.example.xyz;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
[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
@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
#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>
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
//--------------------------------------------------------------------------
// 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.
//
#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,
#include "FastLED.h"
#define ANALOG_MODE_AVERAGE 0
#define ANALOG_MODE_LAST_LED 1
/**************************************
S E T U P
set following values to your needs
**************************************/