Skip to content

Instantly share code, notes, and snippets.

@rubo77
rubo77 / create-gist.sh
Last active August 30, 2020 09:41 — forked from s-leroux/pgist.sh
A utility to create a gists from command line - for support, please check the repo https://github.com/ceremcem/create-gist
#!/bin/bash
GITHUB_USERNAME=rubo77
if [ "$1" == "" ]; then
echo 'usage: gistfile-post.sh filename [gistname]'
exit 0
fi
# 0. file name for the Gist
@rubo77
rubo77 / matrix-kick-irc-users.sh
Last active November 19, 2016 08:05
bash script to kick all IRC users in a matrix channel
#!/bin/bash
# crontab -e
# 23 4 * * * bash /home/irc-bridge/.synapse/EIGENE_purge_history_daily > /dev/null 2>&1
cd /home/irc-bridge/.synapse/
DOMAIN="matrix.domain.org"
ADMIN="@some_admin:$DOMAIN"
TOKEN=$(sqlite3 homeserver.db "select token from access_tokens where user_id like '$ADMIN' order by id desc limit 1;")
@s-leroux
s-leroux / pgist.sh
Created June 24, 2016 09:46
Post GIST
# 0. Your file name
FNAME=some.file
# 1. Somehow sanitize the file content
# Remove \r (from Windows end-of-lines),
# Replace tabs by \t
# Replace " by \"
# Replace EOL by \n
CONTENT=$(sed -e 's/\r//' -e's/\t/\\t/g' -e 's/"/\\"/g' "${FNAME}" | awk '{ printf($0 "\\n") }')
@rubo77
rubo77 / fix_mysql.inc.php.md
Last active December 13, 2023 23:58
A php include that replaces all mysql functions with the corresponding mysqli functions

If you have any questions open an issue there or enhancements as Pull Request

replacement for all mysql functions

Be aware, that this is just a workaround to fix-up some old code and the resulting project will be more vulnerable than if you use the recommended newer mysqli-functions instead. So only If you are sure that this is not setting your server at risk, you can fix your old

password
123456
12345678
1234
qwerty
12345
dragon
pussy
baseball
football
@rubo77
rubo77 / ipv6-httpd.py
Created November 24, 2015 12:56 — forked from akorobov/ipv6-httpd.py
quick ipv6 http server using python's SimpleHttpServer
import socket
from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
class MyHandler(SimpleHTTPRequestHandler):
def do_GET(self):
if self.path == '/ip':
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
anonymous
anonymous / xx.bak
Created October 14, 2015 16:31
custom keyboard layout (HJKL as arrows)
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "XX Marcelo (International)";
key <TLDE> { [ dead_circumflex, quotedbl, apostrophe, section ] };
key <AE01> { [ 1, exclam, onesuperior, exclamdown ] };
key <AE02> { [ 2, at, twosuperior, oneeighth ] };
key <AE03> { [ 3, numbersign, threesuperior, sterling ] };
key <AE04> { [ 4, dollar, foursuperior, dollar ] };
@tcatm
tcatm / faq.md
Last active August 29, 2015 14:27

Gibt es eine Grundgebühr?

Nein. Nach dem Erwerb des Knotens nimmst du direkt am Mesh teil. Es gibt keine weiteren Kosten.

Ist Freifunk ein Ersatz für meinen Internetanschluss?

Nein, im Moment nicht. Das Mesh lässt sich jedoch gut als Ersatz verwenden, falls dein Internetanschluss ausfällt. Wenn du in Funkreichweite anderer Knoten bist, wird dein Knoten automatisch eine andere Verbindung nutzen.

Welche Vorteile bringt mir Freifunk gegenüber dem Internet?