Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / .block
Created January 12, 2024 00:54 — forked from schmidsi/.block
Order Book Visualisation
license: gpl-3.0
@sefgit
sefgit / datgui-build.js
Created December 25, 2023 02:37 — forked from heaversm/datgui-build.js
Automatically build a dat gui from a javascript object
config = { //SAMPLE OBJECT - replace this with your data object
stroke: 2, //svg stroke value
opacity: 0.3, //0-1
offsetX: 120, //px
offsetY: 80,
fontWeight: 400, //css font-weight
fontSize: 12, //in px
changePositive: '\u25B4', //unicode character for up arrow
changeNegative: '\u25BE', //unicode character for down arrow
colorBlue: '#1190A3', //all hex colors will automatically use the addColor dat gui function
@sefgit
sefgit / static-http-receiver.py
Created December 25, 2023 01:33 — forked from traut/static-http-receiver.py
Static HTTP server in Python that saves all POST requests as files in the current directory
import os
from http.server import HTTPServer, BaseHTTPRequestHandler, SimpleHTTPRequestHandler
class CustomHTTPRequestHandler(SimpleHTTPRequestHandler):
def do_POST(self):
filename = os.path.basename(self.path)
file_length = int(self.headers['Content-Length'])
with open(filename, 'wb') as output_file:
@sefgit
sefgit / localtime.js
Created November 26, 2023 09:42
javascript localtime to UTC
let wib_time = "Nov 25, 2023, 01:05:02 GMT+7";
let now = new Date(2023, 11, 25, 1, 5, 2); // localtime
let date_options = {timeZone:"Asia/Jakarta", hour12: false, dateStyle:"medium", timeStyle:"long"};
let wib_time = now.toLocaleString("en-US", date_options); // convert to UTC string
let wib_date = new Date(wib_time); // convert to UTC
const event = new Date(wib_time);
console.log(event.toUTCString());
@sefgit
sefgit / site.webmanifest
Created October 20, 2023 00:47
site.webmanifest
{
"name": "OnlyFans",
"short_name": "OnlyFans",
"icons": [
{
"src": "android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{