Skip to content

Instantly share code, notes, and snippets.

View montanaflynn's full-sized avatar

Montana Flynn montanaflynn

View GitHub Profile
@abeppu
abeppu / feelbetter.js
Last active February 6, 2021 19:06
Implementation of @FeelBetterBot
var Twit = require("twit");
var config = require('./oauthconfig');
console.log("config:");
console.log(config);
var T = new Twit({
consumer_key: config.consumer_key,
consumer_secret: config.consumer_secret,
access_token: config.access_token,
@nijikokun
nijikokun / about.md
Last active August 29, 2015 13:55
Javascript parallelization explained using cars and roads, because people have a hard time understanding things.

Road.js

Parallelization made easy in JavaScript / Node.js

Usage

var road = new Road();

road.onClear(function (error, results) { 
# If you're looking into the C10M problem (10 million concurrent connections)
# you might want to play with DPDK (Originally proprietry Intel, now open source)
#
# C10M: http://c10m.robertgraham.com/
# DPDK: http://dpdk.org/
#
# This is a quick summary how to install dpdk on ubuntu
# running inside virtualbox on a mac
# On my Mac:
@ronaldsuwandi
ronaldsuwandi / config.fish
Last active July 30, 2021 07:54
My personal fish shell config for OS X. Supports git branch (fast git checks), virtualenv (if installed) and Kubernetes current context
function ls --description 'List contents of directory'
command ls -lFG $argv
end
function subl --description 'Launches sublime text in a new window'
command subl -n $argv
end
function code --description 'Launches visual code studio in a new window'
command code -n $argv
@TooTallNate
TooTallNate / starwars.js
Created May 9, 2014 17:38
A little script to play the ASCII Star Wars, but with a hidden cursor, since over `telnet(1)` the cursor remains visible which is annoying
#!/usr/bin/env node
/**
* A little script to play the ASCII Star Wars, but with a hidden cursor,
* since over `telnet(1)` the cursor remains visible which is annoying.
*/
process.title = 'starwars'
var net = require('net')
@staltz
staltz / introrx.md
Last active August 2, 2025 18:25
The introduction to Reactive Programming you've been missing
@kachayev
kachayev / concurrency-in-go.md
Last active May 4, 2025 05:48
Channels Are Not Enough or Why Pipelining Is Not That Easy
@montanaflynn
montanaflynn / colors.md
Last active December 10, 2016 21:21
ANSI color escape codes

Foreground

  • FgBlack = "\033[30m"
  • FgRed = "\033[31m"
  • FgGreen = "\033[32m"
  • FgYellow = "\033[33m"
  • FgBlue = "\033[34m"
  • FgMagenta = "\033[35m"
  • FgCyan = "\033[36m"
  • FgWhite = "\033[37m"
@jkrems
jkrems / generators.md
Last active February 24, 2020 19:09
Generators Are Like Arrays

In all the discussions about ES6 one thing is bugging me. I'm picking one random comment here from this io.js issue but it's something that comes up over and over again:

There's sentiment from one group that Node should have full support for Promises. While at the same time another group wants generator syntax support (e.g. var f = yield fs.stat(...)).

People keep putting generators, callbacks, co, thunks, control flow libraries, and promises into one bucket. If you read that list and you think "well, they are all kind of doing the same thing", then this is to you.

@nmerouze
nmerouze / main.go
Last active January 17, 2025 21:20
JSON-API with Go and MongoDB: Final Part
package main
import (
"encoding/json"
"log"
"net/http"
"reflect"
"time"
"github.com/gorilla/context"