Skip to content

Instantly share code, notes, and snippets.

tel / ProfunctorLens.js
Last active March 24, 2023 17:17
Pure Profunctor Lenses in Javascript (redux)
View ProfunctorLens.js
/* eslint-disable new-cap */
* Lens types.
* ===========
* a * b = {fst: a, snd: b}
* a + b = {index: Boolean, value: a | b}
* Iso s t a b = forall (~>) . Profunctor (~>) => (a ~> b) -> (s ~> t)
ernestkamara / AdbCommands
Created June 26, 2018 08:42 — forked from Pulimet/AdbCommands
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
jack126guy /
Last active March 24, 2023 17:13
Partial format specification for the e2sSample.all file used by the Korg Electribe Sampler

Electribe Sampler e2sSample.all Data Format

Based on examination of the source code for e2sEdit and Oe2sSLE.


The file is just a concatenation of WAVE files with a header to indicate where each file begins. Additional metadata such as sample name and loop point are stored in each WAVE file as a RIFF chunk with type "korg", which is conventionally at the end of the file.

Unless otherwise specified, all integers are little-endian unsigned.

ZhouYang1993 /
Created December 26, 2022 22:08
Mastering Radix Sort in Python: A Visual Guide
def radix_sort(arr):
Radix sort starting from the least significant digit(LSD)
:param arr: The list needs to be sorted
:return: A sorted list
# Find the maximum number of digits in the list
max_digits = max([len(str(x)) for x in arr])
# Set the base (radix) to 10
enten /
Created August 23, 2015 17:52
Create MAINTAINERS file from git commits
# contributors: Generate MAINTAINERS content from git commits
# Author: Steven Enten <>
# License : MIT
# Requirements: dirname cat echo eval grep read readlink shift tail
# Site: https//
set -u
mattifestation / ExpandDefenderSig.ps1
Created March 28, 2019 20:17
Decompresses Windows Defender AV signatures for exploration purposes
View ExpandDefenderSig.ps1
filter Expand-DefenderAVSignatureDB {
Decompresses a Windows Defender AV signature database (.VDM file).
Expand-DefenderAVSignatureDB extracts a Windows Defender AV signature database (.VDM file). This function was developed by reversing mpengine.dll and with the help of Tavis Ormandy and his LoadLibrary project ( Note: Currently, "scrambled" databases are not supported although, I have yet to encounter a scrambled database. Thus far, all databases I've encountered are zlib-compressed.
kn9ts /
Last active March 24, 2023 17:12
GPLv3 explained


TL;DR* Here's what the license entails:

1. Anyone can copy, modify and distribute this software.
2. You have to include the license and copyright notice with each and every distribution.
3. You can use this software privately.
4. You can use this software for commercial purposes.
5. If you dare build your business solely from this code, you risk open-sourcing the whole code base.
idleberg /
Last active March 24, 2023 17:10
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
sts10 / rust-command-line-utilities.markdown
Last active March 24, 2023 17:10
A curated list of command-line utilities written in Rust
View rust-command-line-utilities.markdown

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
veekaybee /
Last active March 24, 2023 17:09
Understanding search and recommendations

How are search and recommendations the same, and how are they different?


  • The design of both search and recommendations is to find and filter information
  • Search is a "recommendation with a null query"
  • Search is "I want this", recommendations is "you might like this"