Skip to content

Instantly share code, notes, and snippets.

View fanckush's full-sized avatar

Imad abdulkarim fanckush

View GitHub Profile
@betafcc
betafcc / Permutation.d.ts
Last active June 24, 2024 10:02
Typescript Union Permutation, count of keys in an object, count of cases in an Union
/**
* @example
* type P = Permutation<1 | 2 | 3>
* // [1, 2, 3] | [1, 3, 2] | [2, 1, 3] | [2, 3, 1] | [3, 1, 2] | [3, 2, 1]
*/
export type Permutation<U, T = U> = [U] extends [never]
? []
: T extends unknown
? [T, ...Permutation<Exclude<U, T>>]
: never
@jeasonstudio
jeasonstudio / bilibili.sh
Last active July 29, 2023 19:32
Use FFmpeg rtmp streaming in macOS
#! /bin/bash
#
# Diffusion bilibili live avec ffmpeg
# Make sure you have FFmpeg installed in your mac
# list avfoundation devices
ffmpeg -f avfoundation -list_devices true -i ""
# change the param after `-i` and `-f flv`
@erikfriberg
erikfriberg / _nicetype.scss
Last active May 13, 2022 15:45
SASS boiler plate for good typography. Works best in combination with normalize.css
// Sets the default text formatting & responsive sizes //----------------
$font-size-base: 1rem;
$font-size-sm: .875rem;
$font-size-h1: 2.25rem;
$font-size-h2: 2rem;
$font-size-h3: $font-size-base;
$font-size-ingress: 1.5rem;
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@t-io
t-io / osx_install.sh
Last active October 22, 2023 13:04
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@douglasmiranda
douglasmiranda / gist:5408278
Created April 17, 2013 22:26
Leading zeros in django templates
{{ variable|stringformat:"02d" }}