Skip to content

Instantly share code, notes, and snippets.

View vicnaum's full-sized avatar

Victor Naumik vicnaum

View GitHub Profile
@vicnaum
vicnaum / tsinit.sh
Created November 9, 2023 11:43
Quickly initialize an empty node typescript project with prettier and yarn
set -e
yarn init -yarn
yarn add typescript -D
yarn tsc --init
yarn add ts-node -D
yarn add prettier -D
yarn add @types/node
# Init .prettierrc
@vicnaum
vicnaum / EVM_Regex_Decompiler.md
Created December 28, 2022 10:03
EVM Regex Decompiler
@vicnaum
vicnaum / gist:ff94eb7f978b6550c12d624d3cd4978e
Created December 9, 2020 11:56
Solidity SafeMath regex
(?<!^[\s]*import.*)(?<!^.*\/\/.*)(?<!\/\*(?:(?!\*\/)[\s\S\r])*?)(?<![\.\+\-\/\*])[\-\+\*\/](?![\+\-\/\.\*])
@vicnaum
vicnaum / manyFolders.cmd
Created October 28, 2016 19:39
Windows CMD batch file that creates many numbered folders
@echo off
ECHO Usage: manyFolders.cmd yourfoldername 500 3
ECHO (where 500 is number of folders to create and 3 is a number of digits in folder number)
ECHO.
set count=%2
setlocal EnableDelayedExpansion
for /L %%i in (1, 1, %count%) do (
set "formattedValue=000000%%i"
md %1!formattedValue:~-%3!
@vicnaum
vicnaum / mxf.py
Last active April 1, 2017 04:25
Extracts lens Focal Length metadata from Canon C300 MXF files. Put the search dir in "rootdir" variable, where the MXF files are located (can be in subdirs also). Outputs "output.txt" with ShotName / FocalLength range tabulated values on each line.
import sys
import struct
import os
rootdir = "D:/MXF_Day1_Shots"
# MXF Keys
MXF_KEYS = {
'\x06\x0E\x2B\x34\x02\x43\x01\x01\x0D\x01\x03\x01\x04\x01\x02\x02' : 'FRAME'
}