Skip to content

Instantly share code, notes, and snippets.

View fgrsnau's full-sized avatar

Stefan Haller fgrsnau

View GitHub Profile
@fgrsnau
fgrsnau / README.markdown
Last active February 15, 2023 17:15
Synchronize MUC admins/owners/members with usermanager

  • 'Stage-Alpha' summary: Synchronize MUC admins/owners/members with usermanager ...

Introduction

This module allows to synchronize the affiliation of a group chat room (MUC) with the members of the organization prosody is running for. The idea is that every user known the prosody's usermanager should be affiliated as a "member" of the MUC.

@fgrsnau
fgrsnau / dmenu_find
Created May 4, 2017 12:23
dmenu fuzzy files
#!/bin/bash
set -eu -o pipefail
(
if [[ -e .git ]]; then
git ls-files -co
else
find -type f -printf '%P\n'
fi
) | dmenu -p 'Fuzzy File:' -i -l 10
// ==UserScript==
// @name Compatibility Mode
// @namespace https://gist.github.com/fgrsnau
// @version 1
// @grant none
// @include *
// ==/UserScript==
css = 'img { display: none !important; } * { background-color: white !important; color: black !important; background-image: none !important; } svg { display: none !important; }';
{-# LANGUAGE NumDecimals #-}
module Main where
import Data.List
import Data.List.Split
import Data.Ratio
import System.Random
data Coin = Head | Tail deriving (Eq, Enum, Read, Show)
@fgrsnau
fgrsnau / Reddit_Comment_Highlighter.user.js
Last active April 8, 2020 19:48
Reddit Comment Highlighter
// ==UserScript==
// @name Reddit Comment Highlighter
// @namespace https://gist.github.com/fgrsnau
// @include http://www.reddit.com/r/*/comments/*
// @include https://www.reddit.com/r/*/comments/*
// @version 1
// @grant none
// ==/UserScript==
var id = $('.content .sitetable .thing:first').attr('data-fullname');