Skip to content

Instantly share code, notes, and snippets.

@almost
almost / async-await-lightning-talk.md
Last active September 12, 2019 09:07
Reactive 2015 Lightning Talk Proposal: Pyramids be gone!: ES7 Async Function

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)

Pyramids be gone!

ES7 Async Functions

JavaScript is getting async functions (or already has them if you count Babel.JS) and with them a way to finally slay the evil pyramid. This new language feature lets you write asynchronous code that almost looks synchronous, while maintaining the same semantics as promises. This lets you shed your .then and .catch boilerplate and escape those nested callbacks in favour of clean, explicit, maintainable code.

@andychase
andychase / chrome_xxd.py
Last active May 20, 2019 00:34
Google Chrome Cache Hex Dump To XXD
""" USEAGE: xclip -o | python chrome_xxd.py | xxd -r - [destination]
To access chrome's cache, go to about:cache in the address bar.
Make sure you copy the second section of the hex dump (the first section is the header).
"""
import sys
for line in sys.stdin.readlines():
sys.stdout.write(line[1:].replace(" ", " "))
@sindresorhus
sindresorhus / markdown-preview-mou.md
Created June 5, 2012 07:34
How to write your Markdown in Sublime Text 2 and preview in Mou

How to write your Markdown in Sublime Text 2 and preview in Mou

I use Sublime for everything text related, but it doesn't have any built-in way to preview my Markdown files.

This is how easy it is to preview in Mou:

  • In Sublime, go to Tools -> Build System -> New Build System...
  • In the newly opened file, replace the file contents with this and save: { "osx": {