Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / README.md
Created January 10, 2025 06:35 — forked from webketje/README.md
Notepad++ extension: "Open Folder as workspace" context menu entry

Notepad++ extension: "Open Folder as workspace" context menu entry

Adds a context menu entry upon right-clicking folders to open the folder as a clean workspace in Notepad++, like many other modern editors allow.
Requires Notepad++ 7.8 or higher.

Screenshot

Install

Run install.cmd as administrator, or open regedit and manually import the .reg file.

@sefgit
sefgit / lil-gui-textarea.ts
Created January 6, 2025 06:15 — forked from mistic100/lil-gui-textarea.ts
Add textarea support to lil-gui
import { GUI, Controller } from 'lil-gui';
export class TextController extends Controller {
private $button: HTMLButtonElement;
private $text: HTMLTextAreaElement;
constructor(parent: GUI, object: object, property: string, rows: number = 4) {
super(parent, object, property, 'textarea');
from contextlib import contextmanager
import sys, os
@contextmanager
def suppress_stdout():
with open(os.devnull, "w") as devnull:
old_stdout = sys.stdout
sys.stdout = devnull
try:
yield
@sefgit
sefgit / asyncio_socket_server.py
Created November 21, 2024 13:58 — forked from johnliu55tw/asyncio_socket_server.py
Python asyncio socket server template
import asyncio
import logging
# XXX: REMOVE THIS LINE IN PRODUCTION!
logging.basicConfig(format='%(asctime)s %(lineno)d %(levelname)s:%(message)s', level=logging.DEBUG)
logger = logging.getLogger(__name__)
# Connected client records
clients = dict()
@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