Skip to content

Instantly share code, notes, and snippets.

hippietrail

  • Nishinari, Osaka, Japan
Block or report user

Report or block hippietrail

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious about learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder due to the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentation often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@hippietrail
hippietrail / linebyline.js
Created Jan 5, 2013
My attempt at the minimal code to read text files one line at a time in node.js
View linebyline.js
var fs = require('fs'),
StringDecoder = require('string_decoder').StringDecoder,
util = require('util');
function lineByLine(fd) {
var blob = '';
var blobStart = 0;
var blobEnd = 0;
var decoder = new StringDecoder('utf8');
@hippietrail
hippietrail / ht-se-search-google.user.js
Created Dec 2, 2012
Convert a search on a StackExchange site to a Google search of that site
View ht-se-search-google.user.js
// ==UserScript==
// @name Hippietrail's StackExchange search to Google search
// @description Convert a search on a StackExchange site to a Google search of that site
// @version 0.0
// @namespace hippietrail
// @include http://stackoverflow.com/search*
// @include http://meta.stackoverflow.com/search*
// @include http://serverfault.com/search*
// @include http://meta.serverfault.com/search*
// @include http://superuser.com/search*
@hippietrail
hippietrail / se-sort-tags-by-relevance.js
Created Oct 19, 2012
Sort Stack Exchange tags by relevance
View se-sort-tags-by-relevance.js
var $c = $('#h-related-tags').parent().contents(),
s = null,
arr = [];
$c.each(function(i, e) {
var $sl, counts;
if (e.tagName === 'A') {
s = i;
} else if (e.tagName == 'BR') {
@hippietrail
hippietrail / google-search-se-questions.js
Created Oct 18, 2012
Get Stack Exchange question IDs from Google Search results
View google-search-se-questions.js
$('a.l').map(function(i, e) {
return !e.search ? e.href : (function(s) {
var u = '?';
s.split('&').forEach(function(ee, ii) {
var e = ee.split('=');
if (e[0] == 'url')
u = e[1];
});
return decodeURIComponent(u);
})(e.search);
@hippietrail
hippietrail / se-add-search-result.js
Created Oct 18, 2012
Add a new entry to Stack Exchange search results
View se-add-search-result.js
$('<div>', {
class: 'question-summary',
id: 'question-summary-QID',
html: $('<div>', {
class: 'statscontainer',
html: $('<div>', {
class: 'statsarrow'
})
}).append($('<div>', {
class: 'stats',
@hippietrail
hippietrail / ht-stackexchange-links.user.js
Created Oct 2, 2012
Adds a place where you can select and copy the question title + link in markdown
View ht-stackexchange-links.user.js
@hippietrail
hippietrail / ht-search-related-tags.user.js
Last active Oct 11, 2015
Add a "Related Tags" module to the sidebar for Search results
View ht-search-related-tags.user.js
@hippietrail
hippietrail / ht-travel-stackexchange.user.js
Created Sep 10, 2012
On travel.stackexchange.com put pale red backgrounds on all tags which lack wiki excerpt
View ht-travel-stackexchange.user.js
// ==UserScript==
// @name Hippietrail's travel.SE enhancements
// @description highlight tags without tag wiki excerpts
// @version 0.6
// @namespace hippietrail
// @match http://travel.stackexchange.com/*
// @match http://meta.travel.stackexchange.com/*
// ==/UserScript==
//
@hippietrail
hippietrail / currency exchange.html
Created Aug 6, 2012
Browser app for currency conversion supporting online and offline use, geolocation, multiple currencies, favourite currencies, etc
View currency exchange.html
<html>
<head>
<meta charset="utf-8">
<!-- styles that came with the shell code -->
<style type="text/css">
body {
font-family: monospace;
font-size: 10pt;
}
You can’t perform that action at this time.