Skip to content

Instantly share code, notes, and snippets.

View mkody's full-sized avatar
🍮

Kody mkody

🍮
View GitHub Profile
@mkody
mkody / f2-to-mastodon.user.js
Last active December 11, 2022 20:21
F2 to go to my mastodon instance
// ==UserScript==
// @name F2 to go to my mastodon instance
// @include /https:\/\/(.*)\/@(\w+)(\/[0-9]+)?/
// @include /https:\/\/(.*)\/users\/(\w+)/
// @include /https:\/\/(.*)\/notice\/([a-zA-Z]+)/
// @include /https:\/\/(.*)\/notes\/([0-9a-z]+)/
// @grant GM_xmlhttpRequest
// ==/UserScript==
// Based on https://github.com/rugk/mastodon-simplified-federation/issues/77#issuecomment-1328265632
@mkody
mkody / README.md
Last active March 28, 2024 12:42
Automail patch for donators

Automail patch for donators

  1. Clone https://github.com/hohMiyazawa/Automail.git
  2. Put the refresh.sh and allowDonators.patch in the root Automail directory
  3. chmod +x refresh.sh and ./refresh.sh
  4. Put a cron like 0 * * * * cd /path/to/Automail && ./refresh.sh > cron.log 2>&1 to keep it updated

Find my builds at https://s.kdy.ch/Automail/

@mkody
mkody / README.md
Last active March 28, 2024 12:41
Custom CSS for FreshRSS (using Swage as a base)

This is a dark color scheme for the Swage theme in FreshRSS. To use it, copy/paste the content of custom.css in the settings of the Custom CSS extension.


To go further, I've edited manifest.json and layout.phtml so that the colors for the window and PWA matches.

You can replace those files or if you use docker (compose) you can mount them.
For example this is the volumes settings in my docker-compose.yaml:

@mkody
mkody / backup.sh
Last active May 13, 2022 11:50
im-in.space's backup script
#!/bin/bash
# Welcome to im-in.space's backup script!
PIDFILE="/tmp/backup.pid"
BUCKETNAME="[your bucket name here]"
if [ -f "$PIDFILE" ]; then
echo "Already running"
exit 1
fi
@mkody
mkody / cleanup.js
Last active November 20, 2018 14:01
Only show highlighted runs from GDQ's schedule
// FOR USE WITH https://greasyfork.org/fr/scripts/31092-gdq-schedule-highlighter
// Hide all runs first
document.querySelectorAll('#runTable tbody tr:not(.day-split)').forEach(el => {
el.style.display = 'none'
})
// Show highlighted runs and remove background color
document.querySelectorAll('#runTable tbody tr.scheduled').forEach(el => {
el.style.display = null
el.style.backgroundColor = 'transparent'
})
@mkody
mkody / openpgp.txt
Created November 23, 2016 11:03
Identité reliée à OpenKeychain
Ce gist confirme l'identité reliée se trouvant dans ma clef OpenPGP et le relie à ce compte GitHub.
Jeton pour preuve :
[Verifying my OpenPGP key: openpgp4fpr:46e03856370035a4cb223730a0bbc25e7f92865b]
@mkody
mkody / js-logview-thingspeak.html
Created July 13, 2016 11:16
Display last X content you sent to thingspeak
<script>
// === Configure the variables here ===
// our channel id
var channel_id = 134049
// how many entries to load
var entries_count = 5
// api key (read)
var api_key = 'TNKUVEP15UGJ8HIK'
// select date locale ('en' or 'fr-ch')
var date_locale = 'fr-ch'
<?php
function getHTTPCode($code) {
switch($code) {
// From https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml (2016-03-01)
case 100:
return '100 - Continue';
break;
case 101:
return '101 - Switching Protocols';
break;
@mkody
mkody / watch.sh
Created November 9, 2015 13:43
Watch for a file change
#!/bin/bash
# Will check for remote file change. Be aware, it downloads the file.
# (Made at first to execute a php script to notify when a file was updated)
# USAGE: `./watch.sh "http://exemple.com/file"`
curl -s -o "temp-dl" "$1"
firsthash="$(md5sum 'temp-dl')"
counttime="0"
while :