made with esnextbin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {mockTimeSource} from '@cycle/time'; | |
import {mockDOMSource} from '@cycle/dom'; | |
describe.only('steve example', () => { | |
function Router (sources, change$, definitions) { | |
let instances = {}; | |
function map (attr) { | |
return change$.map(path => { | |
if (path in instances) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
term = ARGV.join('+') | |
puts "\033browse https://google.co.nz/#q=#{term}\033" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Never put a new line at the top of a scope | |
So that you can see the structure of the tree | |
Always put new lines between things on the same level with different responsibilities | |
But if you have some things that are alike | |
Like | |
This | |
And that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import assert from 'assert'; | |
import xs from 'xstream'; | |
function xray (url, classToScrape) { | |
return function scrape (callback) { | |
// goes and parses internetty stuff | |
callback(stuff); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Message | |
def initialize(method_name, *args, &block) | |
@method_name = method_name | |
@args = args | |
@block = block | |
end | |
def call(value) | |
value.send(@method_name, *@args, &@block) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
live_loop :drums do | |
sample :drum_tom_lo_hard | |
sleep 0.4 | |
end | |
i = 0 | |
live_loop :woo do | |
sync :drums | |
if i % 4 == 0 && i % 40 < 20 | |
sample :bass_thick_c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'set' | |
PROJECTS_DIR = '/Users/nickj/Projects/' | |
def tmux_is_running? | |
ENV.include? 'TMUX' | |
end |
I'm looking for some awesome people to join me in working on some of the Cycle.js projects I've released. Have a look at the list. If you're unsure about anything (such as wanting to help but being unsure if you're able/welcome) please contact me!
tricycle (difficulty: beginner-advanced)
Tricycle lets you try out Cycle.js in your browser. Try it out here.
Tricycle has lots of opportunities to help out and improvements would make a big difference to the community as for a lot of beginners Tricycle is their first introduction to writing Cycle code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.search_result_with_extract').toArray().map(function (result) { | |
var message = $(result).find('.extract_content').text() | |
var date = $(result).parents(".search_message_result").find('.date_links').text().split('•')[1].trim() | |
return date + ': ' + message.trim() | |
}).filter(function (text) { | |
return text.match(/group's topic/) | |
}).join('\n') |