Skip to content

Instantly share code, notes, and snippets.

View philippotto's full-sized avatar

Philipp Otto philippotto

  • scalable minds
  • Berlin
View GitHub Profile
@matttti
matttti / effect-generators.js
Created January 28, 2017 09:30
[redux-saga]: flow-typing of yield return values
import * as IOEffects from 'redux-saga/effects'
export function * select (...args) {
return yield IOEffects.select(...args)
}
export function * put (...args) {
return yield IOEffects.put(...args)
}
@pabloasanchez
pabloasanchez / Tab Context.sublime-menu
Last active December 21, 2020 23:20
Sublime Text 3 Plugin: Close all saved tabs
[
{ "caption": "-" },
{ "command": "close_saved", "caption": "Close Saved Files" }
]
@planetceres
planetceres / RESET_USB_KERNEL_MODULE.md
Last active January 25, 2026 08:28
Restart/reset USB kernel module in Ubuntu 18.04 without rebooting
@Explosion-Scratch
Explosion-Scratch / Compress string.js
Created November 1, 2021 18:51
Compress string using gzip and native browser APIs
function compress(string, encoding) {
const byteArray = new TextEncoder().encode(string);
const cs = new CompressionStream(encoding);
const writer = cs.writable.getWriter();
writer.write(byteArray);
writer.close();
return new Response(cs.readable).arrayBuffer();
}
function decompress(byteArray, encoding) {