Skip to content

Instantly share code, notes, and snippets.

@NeKzor
NeKzor / mastodon.js
Created November 9, 2022 16:19
Simple Mastodon bot in 100 lines.
const fetch = require('node-fetch');
const createHiddenField = (obj, fieldName, value) => {
Object.defineProperty(obj, fieldName, {
enumerable: false,
writable: true,
value: value,
});
};
@Alexufo
Alexufo / simple-https-python-server.py
Last active April 24, 2024 18:44
Simple Python https server example py 3.10+ ( multithread, wasm, gzip )
import http.server
import http.cookiejar
import io
import socket
from http import HTTPStatus
import ssl
import os
import zlib
server_address = ('0.0.0.0', 4443)
import sys
import time
import socket
server = "irc.hackint.org" #settings
channel = "#jimileibniz"
botnick = "groovebot"
#establish connection
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)