Skip to content

Instantly share code, notes, and snippets.

View pbek's full-sized avatar
🐧
🍉 🥭 🍌 🍓 🍒 🍎

Patrizio Bekerle pbek

🐧
🍉 🥭 🍌 🍓 🍒 🍎
View GitHub Profile
@sjahl
sjahl / docker-compose.yaml
Created March 11, 2023 13:33
docker compose file for a matrix sliding sync proxy
version: "3"
services:
sliding-proxy:
image: ghcr.io/matrix-org/sliding-sync:v0.99.1
restart: unless-stopped
ports:
- "127.0.0.1:8881:8881"
environment:
@mvneves
mvneves / RTL8761B-driver.md
Last active February 14, 2022 19:06
Installing Bluetooth 5.0 Headset with Realtek RTL8761B Bluetooth 5.0 dongle on Linux

How to install Bluetooth 5.0 Headset with Realtek RTL8761B Bluetooth 5.0 dongle on Linux

Download and install RLT8761B chipset firmware:

wget https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_config
wget https://raw.githubusercontent.com/Realtek-OpenSource/android_hardware_realtek/rtk1395/bt/rtkbt/Firmware/BT/rtl8761b_fw

sudo cp rtl8761b_config /usr/lib/firmware/rtl_bt/rtl8761b_config.bin
@gullyn
gullyn / flappy.html
Last active May 4, 2024 15:35
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@smashnet
smashnet / docker-compose.yml
Last active December 7, 2023 05:50
Docker-Compose: Mastodon v3.5.3 with Traefik v2.9
version: "3.5"
# Variables to fill in:
# Line 23: <LETSENCRYPT_MAIL_ADDRESS> - your mail address for contact with Let's Encrypt
# Line 36: <TRAEFIK_DASHBOARD_ADMIN_PASSWORD> - MD5 hash of your password (use http://www.htaccesstools.com/htpasswd-generator/)
# Line 54: <POSTGRES_PASSWORD> - the password for the postgres db. Use the same during mastodon:setup!
# Lines 31, 86, 111: <DOMAIN> - e.g. social.yourdomain.com (Must have an A record pointing to your box' IP) (AAAA for IPv6 ;)
services:
traefik:
@kizzx2
kizzx2 / docker-compose.yml
Last active May 9, 2024 20:00
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@hjbotha
hjbotha / free_ports.sh
Last active May 8, 2024 14:15
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@ghosh
ghosh / micromodal.css
Last active May 14, 2024 16:34
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;
@TakayoshiKochi
TakayoshiKochi / query-slotted.js
Created August 9, 2017 07:22
Replacement for querySelector("::slotted(x)")
function querySlotted(root, selector) {
let slots = root.querySelectorAll('slot');
let matched = [];
slots.forEach((slot) => {
matched = matched.concat(slot.assignedNodes().filter((el) => {
return el.matches(selector);
}));
});
return matched;
}
@wolkenschieber
wolkenschieber / qownnotes-converttomediawiki.qml
Created August 22, 2016 06:18
QML-script to convert markdown from QOwnNotes to MediaWiki
import QtQml 2.0
import com.qownnotes.noteapi 1.0
QtObject {
function init() {
script.registerCustomAction("convertToMediaWiki", "Convert note to MediaWiki", "Convert to MediaWiki" );
}
function customActionInvoked(identifier) {
@arfon
arfon / big_query_examples.md
Last active September 19, 2022 13:00
BigQuery Examples for blog post

How many times shouldn't it happen...

-- https://news.ycombinator.com/item?id=11396045

SELECT count(*)
FROM (SELECT id, repo_name, path
        FROM [bigquery-public-data:github_repos.sample_files]
 ) AS F