This file contains 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
.theme input { | |
display: none; | |
} | |
.theme { | |
margin: 0 0.3em 0 0; | |
} | |
.theme input + label { | |
color: #f90; |
This file contains 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
{ | |
"name": "syndicate my RSS feed", | |
"flow": [ | |
{ | |
"id": 1, | |
"module": "rss:TriggerNewArticle", | |
"version": 4, | |
"parameters": { | |
"url": "https://petermolnar.net/feed/index.xml", | |
"gzip": true, |
This file contains 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
import paho.mqtt.client as mqtt | |
import json | |
import requests | |
def on_connect(client, userdata, flags, rc): | |
print(f"Connected with result code {rc}") | |
client.subscribe("#") | |
def on_message(client, userdata, msg): |
This file contains 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
diff --git a/src/main.c b/src/main.c | |
index b4dbf9e0..51a73e6d 100644 | |
--- a/src/main.c | |
+++ b/src/main.c | |
@@ -41,6 +41,7 @@ static gboolean opt_no_sigint = FALSE; | |
static gboolean opt_disable_modules = FALSE; | |
static gboolean opt_force_load_modules = FALSE; | |
static gboolean opt_uninstalled = FALSE; | |
+extern gint opt_housekeeping; | |
static GOptionEntry opt_entries[] = |
This file contains 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
import paho.mqtt.client as mqtt | |
import json | |
client = mqtt.Client() | |
# set the mqtt user and password if you have to | |
client.username_pw_set( | |
username="your mqtt user", password="your mqtt password" | |
) | |
# set the host and the port if you have to |
This file contains 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
// ==UserScript== | |
// @name unfix-all-the-toolbars | |
// @description Removes "position: fixed" style from elements, unfixing "toolbars" and the such. | |
// @namespace http://inf.ufrgs.br/~vbuaraujo/ | |
// @include * | |
// @version 1.2 | |
// @grant none | |
// ==/UserScript== | |
This file contains 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
modules_enabled = { | |
-- lots of modules here, add: | |
"turncredentials"; | |
} | |
-- before virtualhosts | |
turncredentials_secret = "[SECRET STRING]"; | |
turncredentials_host = "xmpp.petermolnar.net" |
This file contains 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
{ | |
"bad_request": [ | |
".*%22https?:.*", | |
"^/xmlrpc\\.php$", | |
"^.*\\.pHp5$", | |
"^.*\\.phtml$", | |
"^/_timthumb_.*$", | |
"^.*?flattrss_redirect.*$", | |
"^.*/None", | |
"…" |
This file contains 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 | |
if [ -z "$1" ]; then | |
echo "Use: image.initmeta PHOTO" | |
exit 1 | |
fi | |
year="$(exiftool -s -EXIF:DateTimeOriginal "$1" | awk '{print $3}' | cut -d":" -f1)" | |
artist="Peter Molnar" | |
rights="CC BY-NC-ND 4.0 ${year} ${artist} <mail@petermolnar.net>" |
This file contains 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 | |
function usage () { | |
echo "backup-github.sh | |
A tiny bash script to backup own and starred public github repositories | |
Usage: | |
backup-github.sh GITHUB_USERNAME DIRECTORY_TO_BACKUP_TO" | |
exit 1 |
NewerOlder