Skip to content

Instantly share code, notes, and snippets.

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active February 20, 2025 22:23
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@rtt
rtt / tinder-api-documentation.md
Last active February 10, 2025 01:34
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@staltz
staltz / introrx.md
Last active March 4, 2025 04:54
The introduction to Reactive Programming you've been missing
@DrBoolean
DrBoolean / Coyoneda.js
Created March 4, 2015 02:33
Coyoneda
// helpers
var compose = function(f,g) {
return function(x) {
return f(g(x))
}
}
var id = function(x) { return x }
@pwmckenna
pwmckenna / Gryo.h
Created April 8, 2015 20:47
react-native gyro
//
// Gyro.h
// CustomComponent
//
// Created by Patrick Williams on 4/7/15.
//
#import "RCTBridge.h"
#import <CoreMotion/CoreMotion.h>
dependencies:
pre:
- source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
- wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install rethinkdb=1.16.3~0precise
- sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance1.conf
- sudo /etc/init.d/rethinkdb restart
@zackferrofields
zackferrofields / gulpfile.js
Last active September 19, 2015 19:33
Inline JavaScript (ES6) unit-tests with node, gulp, speckjs, babel & tape
require('babel-core/register');
var babel = require('babel-core');
var gulp = require('gulp');
var speckjs = require('speckjs');
var tape = require('tape');
var through = require('through2');
function requireFromBuffer(buffer) {
var m = new module.constructor();
m.paths = module.paths;
@gusty
gusty / polyvariadic.fsx
Last active July 20, 2023 15:19
Polyvariadic functions in F#
// Unfortunatelly it stopped working in F# 4.1 after this PR https://github.com/Microsoft/visualfsharp/pull/1650
// Will ask to revert it
type FoldArgs<'t> = FoldArgs of ('t -> 't -> 't)
let inline foldArgs f (x:'t) (y:'t) :'rest = (FoldArgs f $ Unchecked.defaultof<'rest>) x y
type FoldArgs<'t> with
static member inline ($) (FoldArgs f, _:'t-> 'rest) = fun (a:'t) -> f a >> foldArgs f
static member ($) (FoldArgs f, _:'t ) = f
@deebloo
deebloo / rxjs-worker-map.example.js
Last active August 19, 2016 17:24
A RxJs operator that runs in a new thread. https://github.com/deebloo/rxjs-worker
// https://github.com/deebloo/rxjs-worker
var observable = Observable.of([0, 1, 2, 3, 4]);
observable
.map(function (data) {
return data.concat([5, 6, 7, 8, 9]);
})
.workerMap(function (data) {
return data.concat([10,11,12,13,14]);;
})
@evilsoft
evilsoft / Writer.js
Last active November 16, 2019 09:14
Valid Writer in javascript?
// Based on http://adit.io/posts/2013-06-10-three-useful-monads.html
import map from 'ramda/src/map'
import compose from 'ramda/src/compose'
import curry from 'ramda/src/curry'
import multiply from 'ramda/src/multiply'
const chain = curry((fn, m) => m.chain(fn))
const read = m => m.read()