Skip to content

Instantly share code, notes, and snippets.

[package]
name = "ping_bot"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.29.1", features = ["full"] }
twilight-gateway = { version = "=0.16.0-rc.1" }
@Erk-
Erk- / emojifib.hs
Created September 18, 2022 09:19
Haskell Emojis in code
(🕧) = 0
(🕐) = 1
(➕) = (+)
(🔗) = (:)
(📇) = (!!)
(🐈) = tail
(💾) = zipWith
(😂) = (🕧) 🔗 (((🕐) 🔗 ((💾) (➕) (😂) ((🐈) (😂)))))
-- (😂) 📇 10
@Erk-
Erk- / mticlient-freebsd-fixes.diff
Created September 20, 2020 14:35
Fixes for mticlient on freebsd
diff -r mticlient-public/mticlient/Makefile mticlient-public-freebsd/mticlient/Makefile
40c40
< FV_LDFLAGS = -lcurl -lflexver -L`pwd`/../libflexver
---
> FV_LDFLAGS = -lcurl -lflexver -L`pwd`/../libflexver -L/usr/local/lib
42c42
< INCLUDE = -I../libflexver -I../thirdparty/micro-ecc/ -I../thirdparty/sha2/ -I../thirdparty/jsmn/ -I../thirdparty/b64/
---
> INCLUDE = -I../libflexver -I../thirdparty/micro-ecc/ -I../thirdparty/sha2/ -I../thirdparty/jsmn/ -I../thirdparty/b64/ -I/usr/local/include
Only in mticlient-public-freebsd/mticlient: mticlient
@Erk-
Erk- / test.rs
Created February 16, 2019 12:19
#[macro_use]
extern crate serenity;
#[macro_use]
extern crate structopt;
use structopt::StructOpt;
use std::{collections::HashMap, env, fmt::Write, sync::Arc};
#![allow ( dead_code )]
#![allow ( mutable_transmutes )]
#![allow ( non_camel_case_types )]
#![allow ( non_snake_case )]
#![allow ( non_upper_case_globals )]
#![allow ( unused_mut )]
#![feature ( extern_types )]
#![feature ( libc )]
extern crate libc;
extern "C" {
@Erk-
Erk- / guide.md
Last active September 16, 2023 23:23
Play directly from spotify (or other mopidy sources)

Play directly from spotify

Intro

This guide helps you setup a configuration like: mopidy -> icecast -> listner (bot) Where you can use mopidy to play from a wide selection of sources for example Spotify. At the moment I know of no Discord bots capable of controlling an mpd/mopidy server so the adding of playlists have to go through a webinterface or similar. In this guide I will focus on setting up Spotify. The full config files will also be in the gist.

Mopidy

Installation

Keybase proof

I hereby claim:

  • I am erk- on github.
  • I am erk (https://keybase.io/erk) on keybase.
  • I have a public key ASAjxT_ujV-QgOKUKgr1y6qLv1VmcyhjcGR20hXwmBtjiAo

To claim this, I am signing this object:

Year First Name Last name Gender Citizenship Second Citizenship Born Remarks Affiliation at the time of the award
1936 Jesse Douglas Male United States 1897 Massachusetts Institute of Technology (MIT)
1936 Lars Valerian Ahlfors Male Finland 1907 Harvard University
1954 Kunihiko Kodaira Male Japan 1915 Princeton University
1950 Laurent Schwartz Male France 1915 Nancy University
1950 Atle Selberg Male Norway 1917 Institute for Advanced Study
1958 Ren� Thom Male France 1923 University of Strasbourg
1958 Klaus Friedrich Roth Male United Kingdom 1925 London University
1954 Jean-Pierre Serre Male France 1926 Coll�ge de France
1966 Alexander Grothendieck Male France 1928 University of Paris
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Year;First Name;Last name;Gender;Citizenship;Second Citizenship;Born;Remarks;Affiliation at the time of the award
1936;Jesse;Douglas;Male;United States;;1897;;Massachusetts Institute of Technology (MIT)
1936;Lars Valerian;Ahlfors;Male;Finland;;1907;;Harvard University
1954;Kunihiko;Kodaira;Male;Japan;;1915;;Princeton University
1950;Laurent;Schwartz;Male;France;;1915;;Nancy University
1950;Atle;Selberg;Male;Norway;;1917;;Institute for Advanced Study
1958;Ren�;Thom;Male;France;;1923;;University of Strasbourg
1958;Klaus Friedrich;Roth;Male;United Kingdom;;1925;;London University
1954;Jean-Pierre;Serre;Male;France;;1926;;Coll�ge de France
1966;Alexander;Grothendieck;Male;France;;1928;;University of Paris
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Year;First Name;Last name;Gender;Citizenship;Second Citizenship;Born;Remarks;Affiliation at the time of the award
1936;Jesse;Douglas;Male;United States;;1897;;Massachusetts Institute of Technology (MIT)
1936;Lars Valerian;Ahlfors;Male;Finland;;1907;;Harvard University
1954;Kunihiko;Kodaira;Male;Japan;;1915;;Princeton University
1950;Laurent;Schwartz;Male;France;;1915;;Nancy University
1950;Atle;Selberg;Male;Norway;;1917;;Institute for Advanced Study
1958;Ren�;Thom;Male;France;;1923;;University of Strasbourg
1958;Klaus Friedrich;Roth;Male;United Kingdom;;1925;;London University
1954;Jean-Pierre;Serre;Male;France;;1926;;Coll�ge de France
1966;Alexander;Grothendieck;Male;France;;1928;;University of Paris