Skip to content

Instantly share code, notes, and snippets.

@drizuid
drizuid / nextcloud.md
Last active March 22, 2025 20:37
nextcloud stuff

This is outdated, please see comment below

The most important bit, IMO, is that I use split dns, as every proper network should. Relying on hairpin nat/nat reflection/nat loopback will just cause problems. This is generally true for everything, hairpin nat is a security vulnerabilty, you should not be using it outside of strictly controlled scenarios with manual rules, usually for enterprise level gear like the non-recommended setup for Cisco Expressway.

I use SWAG (https://github.com/linuxserver/docker-swag) as my reverse proxy. I renamed collabora.subdomain.conf.sample to collabora.subdomain.conf, nextcloud.subdomain.conf.sample to nextcloud.subdomain.conf, and restarted swag. I then created DNS records (external and internal) for nextcloud and collabora. My SWAG participates in network nc

I was recently asked what swag confs I use for this, I use [collabora.subdomain.conf.sample](

@abstractvector
abstractvector / Dockerfile
Last active April 20, 2025 16:49
Lightweight node.js Dockerfile
ARG ALPINE_VERSION=3.11
ARG NODE_VERSION=15.5.1
##########################
# Cache-preserving image #
##########################
FROM alpine:${ALPINE_VERSION} AS deps
RUN apk --no-cache add jq
@thomasloven
thomasloven / my-custom-card.js
Last active November 28, 2025 15:13
Simplest custom card
// Simplest possible custom card
// Does nothing. Doesn't look like anything
class MyCustomCard extends HTMLElement {
setConfig(config) {
// The config object contains the configuration specified by the user in ui-lovelace.yaml
// for your card.
// It will minimally contain:
// config.type = "custom:my-custom-card"

Visual Studio Code as Diff Tool

Comparing files using the command line Using Visual Studio Code

"%LOCALAPPDATA%\Programs\Microsoft VS Code\code.exe" --diff file1.cs file2.cs

Using Visual Studio Code Insiders

@kinghat
kinghat / keybase.md
Last active October 5, 2019 03:23
Keybase proof

Keybase proof

I hereby claim:

  • I am kinghat on github.
  • I am k1nghat (https://keybase.io/k1nghat) on keybase.
  • I have a public key ASAyEwOJcNK6nUf2gyNSXrFs2aJ-2Arm2h_UyKtuE5mzjQo

To claim this, I am signing this object:

@sanderfoobar
sanderfoobar / rpc_bandwidth.md
Last active June 30, 2019 14:58
Monero RPC node bandwidth monitoring

In this document, $YOUR_IP refers to your public ip address.

Keeping track of bandwidth for Monero RPC nodes

First, we must make a clear distinction between RPC traffic and P2P traffic. As a node operator you might think "wow my node is doing so much traffic WTF where are all these bytes coming from and going to". Well, this is actually due to your P2P port being exposed, which is port 18080. This document does not cover the monitoring of P2P traffic. This document is specifically for the RPC port which runs on 18081 (or 18089).

As Monero RPC traffic is HTTP, we can use nginx to reverse proxy and record bandwidth passing through. This implies that monerod's RPC port stays on localhost

Where normally we would use:

import sopel.module
import time
nicklist = {}
paylist = {}
@sopel.module.event('JOIN')
@sopel.module.rule('.*')
def greeting(bot, trigger):
if trigger.sender == '#monero-pools' and trigger.nick != bot.nick:
@DakuTree
DakuTree / decryptchromecookies.py
Last active December 22, 2024 23:59
Decrypt Chrome Cookies File (Python 3) - Windows
#Based off https://gist.github.com/DakuTree/98c8362fb424351b803e & pieces of https://gist.github.com/jordan-wright/5770442
from os import getenv
from shutil import copyfile
import sqlite3
import win32crypt #https://sourceforge.net/projects/pywin32/
# Copy Cookies to current folder
copyfile(getenv("APPDATA") + "/../Local/Google/Chrome/User Data/Default/Cookies", './Cookies')
# Connect to the Database
@Chaser324
Chaser324 / GitHub-Forking.md
Last active December 2, 2025 20:05
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 2, 2025 11:50
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname