Skip to content

Instantly share code, notes, and snippets.

@rcshubhadeep
rcshubhadeep / main.go
Created July 21, 2021 18:12
full code
package main
import (
"errors"
"fmt"
"strconv"
"gonum.org/v1/gonum/graph"
"gonum.org/v1/gonum/graph/multi"
)
@aaronmdjones
aaronmdjones / freenode-resign-letter.txt
Created May 19, 2021 10:20
My resignation from freenode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
My resignation from freenode staff
==================================
I joined the freenode staff in March 2019 [1].
Before I joined the staff, Freenode Ltd was sold [2] to a person named
Andrew Lee as part of a sponsorship deal. The informal terms of that

Verify encrypted A/V calls with OMEMO

Audio and Video calls in XMPP are encrypted end-to-end with DTLS-SRTP as per XEP-0320: Use of DTLS-SRTP in Jingle Sessions.

This protocol replaces XEP-0320 with something that is encrypted with and verified by OMEMO.

Disclaimer: The proper solution is to use OMEMO version 0.5+ and Stanza Content Encryption and encrypt the entire Jingle handshake. However we are still a long road away from having OMEMO 0.5+ in general and any implementational experience with SCE for IQ based protocols in particular. The protocol proposed here is a hack that is hopefully not too dirty.

Extension of XEP-0353: Jingle Message Initiation

@Gavinok
Gavinok / grap.ms
Last active July 23, 2022 17:03
Example file for using grap with groff and other troff implementations
.ft CW
groff -G -ms -Tpdf grap.ms > grap.pdf
.ft
.NH
Simple example
.LP
.G1
54.2
49.4
@insdavm
insdavm / wireguard-over-tcp.md
Last active May 12, 2024 03:28
WireGuard over TCP with udptunnel

WireGuard over TCP with udptunnel

udptunnel is a small program which can tunnel UDP packets bi-directionally over a TCP connection. Its primary purpose (and original motivation) is to allow multi-media conferences to traverse a firewall which allows only outgoing TCP connections.

Server

# udptunnel -s 443 127.0.0.1/51820

Client

@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@macdja38
macdja38 / Discord Join Messages
Created April 21, 2017 07:12
All the discord join messages
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN: "[!!{username}!!](usernameOnClick) just joined the server - glhf!",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_01: "[!!{username}!!](usernameOnClick) just joined. Everyone, look busy!",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_02: "[!!{username}!!](usernameOnClick) just joined. Can I get a heal?",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_03: "[!!{username}!!](usernameOnClick) joined your party.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_04: "[!!{username}!!](usernameOnClick) joined. You must construct additional pylons.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_05: "Ermagherd. [!!{username}!!](usernameOnClick) is here.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_06: "Welcome, [!!{username}!!](usernameOnClick). Stay awhile and listen.",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_07: "Welcome, [!!{username}!!](usernameOnClick). We were expecting you ( ͡° ͜ʖ ͡°)",
SYSTEM_MESSAGE_GUILD_MEMBER_JOIN_08: "Welcome, [!!{username}!!](usernameOnClick). We hope you brought pi
@tonejito
tonejito / sudoers-insults
Last active June 29, 2018 13:02
sudoers.d insults configuration file
# = ^ . ^ =
#
# /etc/sudoers.d/sudoers-insults
# sudoers.d insults configuration file
# Andres Hernandez - tonejito
#
# This file must be mode 0440 and owner root:root
# install --mode 0440 --owner root --group root sudoers-insults /etc/sudoers.d/
#
# Edit with visudo

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by