This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |