This file contains hidden or 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
grep -R --exclude-dir={node_modules,build,.git} --exclude=*.{png,jpg,vim,swp,swo} 'searchString' ./ |
This file contains hidden or 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 remark = require('remark'); | |
const html = require('remark-html'); | |
const visit = require('unist-util-visit'); | |
const { log } = console; | |
const inputMD = ` | |
[A Link](#){: data-track="footer-link" .xclass onclick=alert() } with text that has *some*{: .emphclass } emphasis and something **strong**{: .strngclss} | |
[{: height=100 width=100 }](/){: .rspnsv-img data-track="logo click" } |
This file contains hidden or 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 { | |
compose, | |
concat, | |
curry, | |
flatten, | |
flip, | |
identity, | |
isNil, | |
isEmpty, | |
join, |
This file contains hidden or 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 { | |
compose, | |
concat, | |
cond, | |
curry, | |
flatten, | |
flip, | |
identity, | |
is, | |
isNil, |
This file contains hidden or 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 basicSurround = curry((char, text) => `${char}${text}${char}`); | |
const snglQt = basicSurround(`'`); | |
const dblQt = basicSurround(`"`); | |
const OrderPrefixTmplt = jsonKey => `${dblQt(jsonKey)}->>`; | |
const OrderBaseTmplt = (field, dir) => `${field} ${dir}`; |
This file contains hidden or 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 dot = (f, g) => (a) => f(g(a)); | |
const cmp = (list) => list.reduce(dot, (a) => a); | |
const pthOr = (fallback, keys, obj) => keys.reduce( | |
(acc, item) => typeof acc === 'undefined' || | |
acc === null || | |
acc === fallback || | |
typeof acc[item] === 'undefined' | |
? fallback | |
: acc[item], | |
obj |
This file contains hidden or 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
;; leiningen profile | |
;; ~.lein/profiles.clj | |
{:user {:plugins [ | |
[cider/cider-nrepl "0.20.0"] | |
[lein-pprint "1.2.0"]] | |
:dependencies [[cider/piggieback "0.3.10"] | |
[cljfmt "0.6.3"]] | |
:repl-options {:nrepl-middleware [cider.piggieback/wrap-cljs-repl]}}} |
This file contains hidden or 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 test = require('tape'); | |
const emptyContainer = () => null; | |
const checkWith = el1 => el2 => el1 === el2 ? el2 : null; | |
const inContainer = ( containingFn, el ) => containingFn( el ) === el; | |
const inEither = ( a, b ) => el => inContainer( a, el ) ? el : b( el ); | |
const inAny = ( ...containingFns ) => containingFns.reduce( inEither, checkWith( null ) ); | |
const inBoth = ( a, b ) => el => inContainer( a, el ) && inContainer( b, el ) ? el : null; | |
const inAll = ( ...containingFns ) => containingFns.reduce( inBoth, checkWith ); |
This file contains hidden or 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
snippet log "console.log(...)" b | |
console.log($0); | |
endsnippet | |
snippet tg "generic JSX tag" b | |
<$1>$0</$1> | |
endsnippet |
This file contains hidden or 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
@function apply-unit($unit, $val) { | |
@return unquote('#{$val}#{$unit}'); | |
} | |
@function strip-unit($number) { | |
@if type-of($number) == 'number' and not unitless($number) { | |
@return $number / ($number * 0 + 1); | |
} | |
@return $number; | |
} |