Skip to content

Instantly share code, notes, and snippets.

@nevillepark
nevillepark / README.md
Last active January 25, 2024 15:13
CBC MP3 stream urls
@johnwcowan
johnwcowan / dioscuri.md
Last active January 17, 2021 21:36
Dioscuri, a Gemini-adjacent protocol for interaction

This gist will be maintained, and supersedes all IRC and email description of Dioscuri.

Dioscuri, a Gemini-adjacent protocol for interaction

Dioscuri is a protocol intended to supplement Gemini for doing things like performing remote actions or running an application server. It is the POST to Gemini's GET. Dioscuri servers will run on a different port from Gemini servers, so that they do not interfere with each other; it will often be useful to run multiple servers on one host, so no fixed port is specified. The use of client certificates for authorization is strongly recommended, especially if requests are interpreted to affect server-side state.

The name "Dioscuri" is the Latin version of the Classical Greek name Διόσκουροι for the Heavenly Twins, Castor and Pollux/Polydeukes, who were called Gemini in Latin; the constellation is named after them. I say dee-OH-skoo-ree, but Greeks, classicists, and others should feel free to pronounce the name their way.

Great thanks to the members of [#gemini](ir

@makew0rld
makew0rld / go-build-all.sh
Last active April 26, 2024 09:51
Cross compile for all possible Golang targets. This script will always be updated, because it uses the `go` command to see what can be built.
#!/usr/bin/env bash
# Based on https://gist.github.com/eduncan911/68775dba9d3c028181e4
# but improved to use the `go` command so it never goes out of date.
type setopt >/dev/null 2>&1
contains() {
# Source: https://stackoverflow.com/a/8063398/7361270
[[ $1 =~ (^|[[:space:]])$2($|[[:space:]]) ]]
@nevillepark
nevillepark / README.md
Last active April 28, 2024 20:21
CBC radio stream URLs

CBC Radio Stream URLs

Using these URLs, you can listen to CBC radio streams with applications like VLC or Transistor. The files are M3U playlists, so you can use them as-is, edit them to suit your tastes, or use individual URLs.

This playlist contains the .m3u8 URLs from the CBC Listen website, which uses the HLS (HTTP Live Streaming) protocol. The audio stream is broken up into multiple tiny files, which are then fed into the .m3u8 playlist file that delivers them to your computer in the right order. This should work with modern media players.

This legacy playlist uses good old-fashioned MP3 streams found on PublicRadioFan.com. It will work with older programs like Winamp that don't support HLS. I don't know how lo

@markosjal
markosjal / AirScan-eSCL.txt
Last active December 15, 2023 09:42
Reverse Engineering eSCL / Apple AirScan
Reverse Engineering the Apple Airscan / eSCL Protocol
I am not certain of the origins, one person involved in IPP printing claimed it was proprietary of HP , but then again they have their own protocol. AirScan/eSCL is used by other manufacturers too like Xerox, Kyocera, Canon and more. Mopria also seems to claim some responsibility for it but then again it seems not completely. In any case it seems shrouded in such secrecy that to date several years after its implementation, unless someone wants to take it all apart.
I offer this as my contribution. It is not perfect but almost there.
As I began looking for information to make a scanner more compatible, I could only find fragments of information. Even Apple Developer Forums offered zero help.
Server/Client in eSCL / AirScan:
There is a “server”and a “client” the client can be a desktop computer or mobile device. The server is a scanner or another device configured to emulate a hardware scanner, even a desktop computer. In my case I did this on Linux, so
@vi
vi / split_by_silence.sh
Last active February 23, 2024 13:18
Using FFmpeg to split multimedia file into parts based on audio volume level
#!/bin/bash
IN=$1
OUT=$2
true ${SD_PARAMS:="-55dB:d=0.3"};
true ${MIN_FRAGMENT_DURATION:="20"};
export MIN_FRAGMENT_DURATION
if [ -z "$OUT" ]; then
@fnky
fnky / ANSI.md
Last active May 4, 2024 22:07
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@nzec
nzec / README.MD
Last active February 23, 2024 01:08
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@4Kaylum
4Kaylum / DiscordPy Tutorial.md
Last active August 27, 2023 18:05
A simple bot tutorial for Discord.py

Writing a Discord bot with Discord.py

Hey one, hey all, and welcome to a basic Discord bot writing tutorial. This is a basic tutorial that doesn't cover coding in general, but rather how to work with the Discord.py (v1.0.0a) library and how to write a simple bot with it. General help can be found on the Discord API guild and in the documentation.

This tutorial assumes some prior knowledge of programming, and assumes you already have Python3.5 (and Pip) or later installed and added to your PATH.

With that, let's get to it.

Installation

@eduncan911
eduncan911 / go-build-all
Last active April 11, 2024 07:14
Go Cross-Compile Script
#!/bin/bash
#
# GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script:
# http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
#
# To use:
#
# $ cd ~/path-to/my-awesome-project
# $ go-build-all
#