Skip to content

Instantly share code, notes, and snippets.

@pystub
pystub / some.py
Created March 18, 2018 09:20
pythong replacementer
#!/bin/python
import re
remappings = {
'\U0001F600': 'GRINNING FACE',
'\U0001F601': 'GRINNING FACE WITH SMILING EYES',
# and many more
}
def repl(m):
@pystub
pystub / iwbtsc-api.mdown
Last active August 8, 2021 19:23
IWBTS Chat """API"""

websocket connetion to wss:/ws/ everything is sent as serialized json objects

from server to client

initial dump of all the users' details

{"t":"Au":"users":{$all_users_serialized},"groups":{$all_groups_serialized}}

this should be the first thing that's received upon connecting

@pystub
pystub / vec-vec.cpp
Last active February 19, 2016 01:12
#include <vector>
int main(int argc, char*argv[]) {
auto a = std::vector<std::vector<int>> ({
std::vector<int>({1,2,3}),
std::vector<int>({4,5,6}),
std::vector<int>({7,8,9}),
});
auto b = std::vector<std::vector<int>> (3, std::vector<int>(3));
return 0;