- https://ramdajs.com/docs/#all
- https://ramdajs.com/docs/#any
- https://ramdajs.com/docs/#aperture
- https://ramdajs.com/docs/#countBy
- https://ramdajs.com/docs/#dropRepeats
- https://ramdajs.com/docs/#dropRepeatsWith
- https://ramdajs.com/docs/#dropWhile
- https://ramdajs.com/docs/#filter
- https://ramdajs.com/docs/#find
- https://ramdajs.com/docs/#findIndex
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
// following along https://medium.com/@luijar/kliesli-compositions-in-javascript-7e1a7218f0c4 | |
const R = require('ramda') | |
const Maybe = require('ramda-fantasy').Maybe | |
// parse JSON string into object | |
// parse :: String -> Object | Null | |
function parse(s) { | |
try { | |
return JSON.parse(s) | |
} catch (e) { |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const PreloadWebpackPlugin = require('preload-webpack-plugin'); | |
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin'); | |
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin'); | |
const CompressionPlugin = require('compression-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const PreloadWebpackPlugin = require('preload-webpack-plugin'); | |
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin'); | |
const StyleExtHtmlWebpackPlugin = require('style-ext-html-webpack-plugin'); | |
const CompressionPlugin = require('compression-webpack-plugin'); | |
const autoprefixer = require('autoprefixer'); |
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 Firebase from 'firebase'; | |
const firebaseUrl = 'https://spatially.firebaseio.com/clients'; | |
const timeOffsetUrl = 'https://spatially.firebaseio.com/.info/serverTimeOffset'; | |
let ref = new Firebase(firebaseUrl); | |
let timeRef = new Firebase(timeOffsetUrl); | |
let cachedUid; | |
export default ({dispatch, getState}) => next => action => { | |
// The first action rehydrates, so now we've probably got the uid now |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key
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 StartApp | |
import Http | |
import Markdown | |
import Html exposing (Html, div, button, text) | |
import Html.Events exposing (onClick) | |
import Task exposing (Task) | |
import Effects exposing (Effects) | |
-- the URL of the README.md that we desire | |
readmeUrl : String |
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
'use strict'; | |
module.exports = { | |
data: [{ | |
'id': 0, | |
'name': '3-D Man' | |
}, { | |
'id': 1, | |
'name': 'A-Bomb (HAS)' | |
}, { |
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 {List, Record, toJS} from 'immutable'; | |
import Rx, {Observable, Subject} from 'rx'; | |
const initialState = Record({count: 0, text: '', items: List(), history: List(), future: List()}); | |
const subject = new Subject(); | |
const source = Observable.merge(subject) | |
.scan((currentState, action) => action(currentState), initialState()); | |
source.subscribe( | |
state => { |
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
osascript -e 'display notification "Reloaded browser..." with title "LiveReload"' |
NewerOlder