>!
and `
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
(ns private.tmp.units) | |
(defn- ounces->kg | |
[input] | |
(let [lb 16 ;; 1kg → 16lb | |
oz 2.2] ;; 1kg → 2.2oz | |
(->> (/ input lb oz) (format "%.3f kg")))) |
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
.toggle { | |
cursor: pointer; | |
user-select: none; | |
display: flex; | |
align-items: center; | |
justify-content: left; | |
} | |
.toggle-phony { | |
opacity: 0; |
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
(ns facebook-campaigns-resolver.core | |
(:require [cheshire.core :as json] | |
[clj-http.client :as http] | |
[amazonica.aws.s3 :as s3] | |
[amazonica.aws.s3transfer :as s3transfer] | |
[clojure.java.io :as io])) | |
(def ^:private url "https://jsonplaceholder.typicode.com/comments?postId=1") | |
(def ^:private aws {: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 { Children, PropTypes } from 'react'; | |
const Visibility = ({ visible, children }) => ( | |
visible ? Children.only(children) : null | |
); | |
Visibility.defaultProps = { | |
visible: true, | |
}; |
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
/** | |
* Simple script that compares our npm manifest against Oscar's manifest | |
* and list all results that don't match versions. | |
* | |
* Usage: | |
* | |
* node tools/diff-package-json.js path/to/oscar/package.json | |
**/ | |
const current = require('../package'); |
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
# This script will take care of react-specific imports just so | |
# Preact can do its job (production only) | |
modules=./node_modules | |
bin=$modules/.bin | |
replace=$bin/replace | |
pattern="require\('react\/lib\/ReactDOMFactories'\)" | |
target=$modules/remarkable-react/lib/lib/renderer.js | |
if [ ! -d "$modules" ]; then |
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 MATCH_MARKDOWN_IMAGE = /\!\[(.*)\]\((.*)\)/gm; | |
const MATCH_INLINE_IMAGE = /\(inline\)/i; | |
class MarkdownImage { | |
// We receive both `markdown` and `containerWidth` on the constructor here | |
static updateImageTags(markdown) { | |
let updatedMarkdown = markdown; | |
let match; | |
let matches = []; |
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 Preact from 'preact' | |
import { StyleSheet, css } from 'aphrodite/no-important' | |
class Component extends Preact.Component { | |
constructor () { | |
super() | |
this._rawStyles = this.styles ? this.styles() : {} | |
this._styles = StyleSheet.create(this._rawStyles) | |
this._parseClassNames = this._parseClassNames.bind(this) |
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
// Polyfills | |
import 'promise-polyfill'; | |
import 'whatwg-fetch'; | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { Redirect, Router, Route, IndexRoute, browserHistory } from 'react-router'; | |
import configureStore from './store/configureStore'; |