Skip to content

Instantly share code, notes, and snippets.

// Q sample by Jeff Cogswell
/*===========
We want to call these three functions in sequence, one after the other:
First we want to call one, which initiates an ajax call. Once that ajax call
is complete, we want to call two. Once two's ajax call is complete, we want to call three.
BUT, we don't want to just call our three functions in sequence, as this quick
demo will show. Look at this sample function and think about what order
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@seanorama
seanorama / debian-dell-ultraboook.md
Last active August 29, 2015 14:03
Fixes for Debian & LMDE

Various fixes for Debian or LMDE (Linux Mint Debian Edition) running on Dell Ultrabooks (Latitude E7440 in my case) and possibly other systems.


  • Problem: Random, crazy/erratic mouse behavior. Pointer flies all over and crazy clicks which mess with or close applications.

    • Logs show things like:
    [ 9719.613110] psmouse serio1: GlidePoint at isa0060/serio1/input0 - driver resynced.
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

@Bekbolatov
Bekbolatov / tmux.md
Last active March 7, 2024 01:18
Clean tmux cheat-sheet

Clean tmux cheat-sheet

By resources

sessions

list-sessions        ls         -- List sessions managed by server
new-session          new        -- Create a new session
[
[:app "cmd-t" :workspace.show]
[:app "cmd-shift-f" :searcher.show]
[:app "cmd-shift-k" :clear-console]
[:app "cmd-shift-s" :save-all]
[:app "cmd-ctrl-f" :window.fullscreen]
[:app "cmd-k" :toggle-console]
[:app "tab" :focus-last-editor]
[:workspace.focused "enter" :lt.plugins.workspace-nav/open-selection]
@jfmengels
jfmengels / lodash-fp-documentation.md
Last active February 6, 2024 20:57
Generated docs for Lodash/fp. Help make them better at https://github.com/jfmengels/lodash-fp-docs
@subfuzion
subfuzion / curl.md
Last active April 26, 2024 09:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@mpj
mpj / README.md
Last active December 12, 2020 00:15
REALLY quick and dirty static file dev server

Usage

node dirtyserve.js

The point your browser to

http://localhost:3000/myfile.xxx

and the server will try to serve that file from the local server.