Skip to content

Instantly share code, notes, and snippets.

View AlenVelocity's full-sized avatar
:electron:
Well

Alen Yohannan AlenVelocity

:electron:
Well
View GitHub Profile
import { Add, Divide, IsEven, Subtract } from 'ts-arithmetic'
export type StrLen<S extends string> = S extends `${infer _}${infer R}` ? Add<1, StrLen<R>> : 0
type OneToTwenty = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20]
export type ReduceNum<N extends number> =
N extends OneToTwenty[number] ? N : IsEven<N> extends 1 ?
ReduceNum<Divide<N, 2>> : 5
$videoPath = Read-Host "Enter the input video path:"
$outputDirectory = Read-Host "Enter the output directory path:"
# Get the total duration of the video using FFprobe
$duration = & ffprobe.exe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 $videoPath
# Convert the duration to seconds
$durationSeconds = [math]::Round($duration, 0)
# Calculate the number of parts based on a 30-second duration
@AlenVelocity
AlenVelocity / 📊 Weekly development breakdown
Last active October 13, 2021 00:27
📊 Weekly development breakdown
TypeScript 23 hrs 6 mins ██████████████████▏░░ 86.7%
JSON 1 hr 23 mins █░░░░░░░░░░░░░░░░░░░░ 5.2%
Markdown 1 hr 9 mins ▉░░░░░░░░░░░░░░░░░░░░ 4.3%
Bash 23 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.5%
Text 14 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.9%
type Filter<T> = {
[K in keyof T as Exclude<K, 'run' | 'set'>]: T[K]
}
class FizzBuzz {
constructor(public max: number = 100, public fizz: number = 3, public buzz: number = 5) {
}
set = (key: keyof Filter<FizzBuzz>, num: number) => {
function fizzBuzz(max: number, fizz: number, buzz: number) {
for (let i = 0; i < max; i++) {
let out: any = ''
if (i % fizz === 0) out += 'Fizz'
if (i % buzz === 0) out += 'Buzz'
out = (!out) ? i : out
console.log(out)
import {
writeFile
} from "fs";
const stickerPackID = "com.snowcorp.stickerly.android.stickercontentprovider b5e7275f-f1de-4137-961f-57becfad34f2"; //not sure what this does
const googleLink = "https://play.google.com/store/apps/details?id=com.marsconstd.stickermakerforwhatsapp";
const appleLink = "https://itunes.apple.com/app/sticker-maker-studio/id1443326857";
export function createExif(packname: string, author: string, id: string) {
const json = {