Skip to content

Instantly share code, notes, and snippets.

View moshest's full-sized avatar

Moshe Simantov moshest

View GitHub Profile
// v7.0.4
// https://bundlejs.com/?q=https-proxy-agent&treeshake=%5B%7B+HttpsProxyAgent+%7D%5D&config=%7B%22esbuild%22%3A%7B%22target%22%3A%5B%22es2020%22%5D%2C%22format%22%3A%22cjs%22%2C%22minify%22%3Afalse%2C%22platform%22%3A%22node%22%7D%7D
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
var vs=Object.create;var Pe=Object.defineProperty,ys=Object.defineProperties,Is=Object.getOwnPropertyDescriptor,Bs=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,Es=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable;var Ht=(r,e)=>(e=Symbol[r])?e:Symbol.for("Symbol."+r);var qt=(r,e,t)=>e in r?Pe(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,qe=(r,e)=>{for(var t in e||(e={}))Gt.call(e,t)&&qt(r,t,e[t]);if(Vt)for(var t of Vt(e))ks.call(e,t)&&qt(r,t,e[t]);return r},Ge=(r,e)=>ys(r,Bs(e));var O=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Cs=(r,e)=>{for(var t in e)Pe(r,t,{get:e[t],enumerable:!0})},$t=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ws(e))!Gt.call(r,a)&&a!==t&&Pe(r,a,{get:()=>e[a],enumerable:!(s=Is(e,a))||s.enumerable});return r};var Os=(r,e,t)=>(t=r!=null?vs(Es(r)):{},$t(e||!r||!r.__esModule?Pe(t,"default",{value:r,enumerable:!0}):t,r)),Ts=r=>$t(Pe({},"__

Exmaple of a page break


another page

@moshest
moshest / ts-error.ts
Created March 29, 2020 14:30
Funval demo ts error
import { Schema, Optional, Or, Type } from 'funval';
const UserSchema = {
name: Optional(String),
status: Or('active' as 'active', 'suspended' as 'suspended'),
};
const validator = Schema(UserSchema);
let user: Type<typeof UserSchema>;
try {
@moshest
moshest / dynamic-lang.md
Last active February 29, 2020 15:26
A POC for Dynamic Syntax Language

Dynamic Syntax Language (POC)

I had an idea, creating a programming language with a dynamic syntax. Meaning, every programmer can extend the language easily and implement syntactic sugars fast.

Example Usage

import { createUseStyles } from 'react-jss';

// use native css styles with your code
@moshest
moshest / medium.txt
Created April 23, 2018 07:56
Keyuno articles
Link: https://medium.com/@keyuno/constructing-universal-map-of-knowledge-7fcd03a084d9
Key Uno, https://keyuno.github.io/masterkey/
Aug 29, 2017
Constructing Universal Map Of Knowledge
By designing a system of economic incentives that will provide access to reliable information to anyone with an internet connection.
Structure:
The universal map of knowledge consists of two parts:
@moshest
moshest / outputs.txt
Last active April 12, 2018 09:22
Node.js Performance Comparison Between SHA-512 and SHA-256
# MacBook Pro (Mid 2015) - 2.5 GHz Intel Core i7
# Node.js v9.2.0
block size: 8192
hashing sha512 x 300000 times: 4447ms
hashing sha256 x 300000 times: 6105ms
difference: 27.158067158067155 %
block size: 4096
hashing sha512 x 300000 times: 2601ms
@moshest
moshest / alac2aac.bat
Created May 21, 2017 07:54
Convert alac to aac with ffmpeg
if not exist "output" mkdir output
for /r path %%var in (*.m4a) do ffmpeg -i %%var -c:a libfdk_aac -b:a 320k output\%%var.m4a
@moshest
moshest / split.bat
Created April 23, 2017 08:43
Split S1 .Mov files to folders
@echo off
set found=0
setlocal enabledelayedexpansion
for /L %%a in (start,1,9999) do (
set "num=%%a"
set "num=!num:~-4!"
if exist "ZCAM!num!_*.MOV" (
set found=1
echo "Create and move files to folder '%%num'"
@moshest
moshest / ffmpeg-cheatsheet.md
Created April 6, 2017 08:56 — forked from nickkraakman/ffmpeg-cheatsheet.md
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file