Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / node-presskey-console.js
Created July 20, 2024 03:24 — forked from unitycoder/node-presskey-console.js
node.js Wait For KeyPress in console
// node.js get keypress
var stdin = process.stdin;
// without this, we would only get streams once enter is pressed
//stdin.setRawMode( true );
// resume stdin in the parent process (node app won't quit all by itself
// unless an error or process.exit() happens)
stdin.resume();
// i don't want binary, do you?
@sefgit
sefgit / ceshi.ini
Created June 15, 2024 03:06 — forked from SolveSoul/ceshi.ini
V380 Pro Activate ONVIF/RTSP
[CONST_PARAM]
rtsp = 1 ; RTSPЭ�飬0���ر� 1������
@sefgit
sefgit / digicheck.py
Created June 12, 2024 04:35 — forked from petri/digicheck.py
Single-file Python digital signature maker and checker
"""digicheck - create and verify signatures for files
Usage:
digicheck keys
digicheck public <keyfilename>
digicheck sign <filename> <keyfilename>
digicheck check <filename> <keyfilename> <signaturefilename>
digicheck (-h | --help)
digicheck --version
/*!
* @license
* TradingView Lightweight Charts™ v4.1.2
* Copyright (c) 2023 TradingView, Inc.
* Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
*/
(function () {
'use strict';
/**
@sefgit
sefgit / readme.txt
Created May 19, 2024 01:22 — forked from nathanqthai/readme.txt
simple tornado server with ssl
to generate example certs
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout host.key -out host.crt
run server:
chmod +x server.py
./server.py
test server:
openssl s_client -connect localhost:8888
@sefgit
sefgit / Python3.9 on ubuntu22.04 Jammy
Created May 5, 2024 00:51 — forked from basaks/Python3.9 on ubuntu22.04 Jammy
Python3.9 on ubuntu22.04 Jammy
## Install Python3.9 interpreter on ubuntu 22.04
On a terminal just do the following steps:
Install dependencies:
sudo apt install tar build-essential checkinstall libreadline-dev \
libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \
libbz2-dev openssl libffi-dev
@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: