Skip to content

Instantly share code, notes, and snippets.

View manan-gup's full-sized avatar

Manan Gupta manan-gup

  • New Delhi
View GitHub Profile
@psenger
psenger / index.js
Created March 3, 2020 01:25
[Example of Limiting Concurrency using ES6 iterator] #JavaScript
/*
Reference: https://stackoverflow.com/questions/40639432/what-is-the-best-way-to-limit-concurrency-when-using-es6s-promise-all
[Symbol.iterator]() is equivalent to .values()
const iterator = [1,2,3][Symbol.iterator]()
*/
const iterator = [1,2,3].values()
// loop over all items with for..of
for (const x of iterator) {
@przemoc
przemoc / youtube-sort-videos-by-length.md
Last active March 29, 2025 10:24
Bookmarklet for YouTube: Sort videos by length in videos tab

Bookmarklet for YouTube: Sort videos by length in videos tab

On channels in videos tab you can sort videos by:

  • Most popular
  • Date added (oldest)
  • Date added (newest)

But you cannot sort by length. So I decided to create a bookmarklet to do it in ascending order.

@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@diffficult
diffficult / installing_virt_manager.md
Last active March 23, 2025 10:51
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2025 02:17
FFmpeg cheat sheet
@Geoff-Ford
Geoff-Ford / composing-software.md
Last active March 14, 2025 20:26
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@Geoff-Ford
Geoff-Ford / master-javascript-interview.md
Last active April 4, 2025 21:36
Eric Elliott's Master the JavaScript Interview Series
@eguven
eguven / brew-list.sh
Last active April 13, 2025 05:34
List all packages installed using Homebrew and their sizes
# this original one uses values returned from 'brew info'
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
# faster alternative using 'du'
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h
@staltz
staltz / introrx.md
Last active April 24, 2025 06:10
The introduction to Reactive Programming you've been missing