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
<?php | |
/** | |
* Single level, Case Insensitive File Exists. | |
* | |
* Only searches one level deep. Based on | |
* https://gist.github.com/hubgit/456028 | |
* | |
* @param string $file The file path to search for. | |
* | |
* @return string The path if found, FALSE otherwise. |
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
rsync -rlptuvhz -e ssh username@my-dev-server.dev:/path/to/dir . | |
# -r Recursive | |
# -l Copy symlinks as symlinks | |
# -p Copy permisisons | |
# -t Copy times | |
# -u Update. Skip files that are newer on receiving end. | |
# -v Verbose. | |
# -h Output numbers in a human-readable format | |
# -z Use compression when sending data over the network. |
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
/** | |
* Fetcher. | |
* | |
* This is a simple promise wrapper around a very basic command line curl GET | |
* request. | |
*/ | |
"use strict"; | |
/* curl-json-format.txt looks something like the following: | |
* |
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 {curry} from 'lodash/fp'; | |
/** | |
* Chain (flatMap) for Functions. | |
* | |
* chainf: (a -> x -> b) -> (x -> a) -> x -> b | |
* | |
* @param {Function} g A function that takes two parameters of type a and x. | |
* @param {Function} h A function that takes one paramter of type x. | |
* @param {*} x A value of type x. |
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
/** | |
* Lightweight Either Implementation. | |
* Mostly ripped off directly from @drboolean's Mostly Adequate Guide. | |
* https://drboolean.gitbooks.io/mostly-adequate-guide/ | |
*/ | |
import {curry} from 'lodash/fp'; | |
export function Left(x) { | |
this.__value = x; | |
} |
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
/** | |
* Functions for working with monads. | |
* | |
* https://github.com/DrBoolean/pointfree-fantasy is probably a better implementation. | |
*/ | |
/* eslint prefer-arrow-callback: 0 */ | |
import {curry} from 'lodash/fp'; | |
export const fmap = curry(function fmap(f, m) { | |
return m.map(f); |
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 {curry} from 'lodash/fp'; | |
/** | |
* lift2 (apply) for Functions. | |
* | |
* @see http://www.tomharding.me/2017/04/15/functions-as-functors/ | |
* | |
* Type signature: | |
* (a -> b -> c) -> (x -> a) -> (x -> b) -> (x -> 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
import React from 'react'; | |
import compose from 'lodash/fp/compose'; | |
import map from 'lodash/fp/map'; | |
import get from 'lodash/fp/get'; | |
// Curry React.createElement(). | |
const el = elementName => props => children => React.createElement(elementName, props, children); | |
// Sample HTML element functions | |
const ul = el('ul'); |
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
timestamp | content | viewed | href | |
---|---|---|---|---|
2018-10-27T05:33:34+00:00 | @madhatter invited you to tea | unread | https://example.com/invite/tea/3801 | |
2018-10-26T13:47:12+00:00 | @queenofhearts mentioned you in 'Croquet Tournament' discussion | viewed | https://example.com/discussions/croquet/1168 | |
2018-10-25T03:50:08+00:00 | @cheshirecat sent you a grin | unread | https://example.com/interactions/grin/88 |
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
<ul class="MessageList"> | |
<li class="Message Message--viewed"> | |
<a href="https://example.com/invite/tea/3801" class="Message-link">@madhatter invited you to tea</a> | |
<time datetime="2018-10-27T05:33:34+00:00">27 October 2018</time> | |
<li> | |
<li class="Message Message--viewed"> | |
<a href="https://example.com/discussions/croquet/1168" class="Message-link">@queenofhearts mentioned you in 'Croquet Tournament' discussion</a> | |
<time datetime="2018-10-26T13:47:12+00:00">26 October 2018</time> | |
</li> | |
<li class="Message Message--viewed"> |
OlderNewer