Skip to content

Instantly share code, notes, and snippets.

@sefgit
sefgit / git-notes.txt
Created August 8, 2024 03:38
GIT notes
git fetch origin pull/ID/head:BRANCH_NAME
e.g. https://github.com/mementum/backtrader/pull/499
git fetch origin pull/499/head:PR499
git switch PR499
apply pull request patches:
git pull origin pull/469/head
@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 / to_lib.py
Last active June 19, 2024 01:48
Create import library from dll
#
# to_lib.py
# Create import library from dll
# by seffx
# Jakarta, 2024
#
# DISCLAIMER:
# Use it on your own risk, this code is provided to PUBLIC DOMAIN, "AS IS".
#
# Usage note:
@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 / portable.py
Created June 12, 2024 10:34
python platform check
import platform
# Determine the correct platform for the webdriver
system = platform.system()
arch, _ = platform.architecture()
if system == 'Linux':
if arch == '64bit':
webdriver = 'bin/linux64/chromedriver'
else:
webdriver = 'bin/linux32/chromedriver'
@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 / _cmd.bat
Created June 2, 2024 05:13
PYTHON virtualenv
@echo off
rem mkdir workspace
rem copy _cmd.bat .
rem cd workspace
rem virtualenv .venv
Set workdir=%cd%\.venv
rem echo VIRTUALENV: %workdir%
For /F "delims=\" %%A in ("%workdir%") do (
Set Name=%%~nxA
@sefgit
sefgit / unblock.ps1
Last active May 27, 2024 17:26
Scripts to unblock dlls
Get-ChildItem -Path . -Recurse -Filter *.dll -File -Name | Unblock-File
@sefgit
sefgit / chart.py
Created May 26, 2024 02:22
Freezing python lightweight_charts using pyinstaller
from os import chdir
from os.path import dirname
import multiprocessing
import numpy as np
import pandas as pd
import asyncio
from lightweight_charts import Chart
async def main():
#print(sys._MEIPASS)