getting started using dynamic labels is as easy as 1 2 4! First copy the following text:
<first name> is a dynamic label for someone's <name>
assuming you got a list of margin/padding values from your css with
ack --css margin > margin.txt
ack --css padding > padding.txt
you can run
#!/bin/bash | |
# Adds the currently playing iTunes track to your prepared commit message. | |
# | |
# To install, save in repo as chmod +x to .git/hooks/prepare-commit-msg | |
# save music.js somewhere like ~/.bin | |
# if you don't use a commit template $SONG should precede $1 to allow --verbose | |
# commits to work, otherwise change the echo to "$(cat $1)\n\n$SONG" | |
SONG=`osascript -l JavaScript ~/.bin/music.js` | |
if [[ $SONG ]]; then | |
echo -e "\n\n$SONG\n$(cat $1)" > $1 |
import typeof {Foo} from './foo' | |
class Bar extends Component { | |
props: { | |
foolike: Foo | |
} | |
render (){....} | |
} |
""" | |
doodler.py - (c) 2012 Marcos Ojeda <marcos@khanacademy.org> | |
--"Quis leget haec?" | |
requires | |
graphicsmagick - brew install graphicsmagick | |
ghostscript - brew install ghostscript | |
""" |
{ | |
"presets": ["es2015", "react"] | |
} |
import MarkdownIt from 'markdown-it'; | |
import {convertFromRaw} from 'draft-js'; | |
import util from 'util'; | |
import _ from 'lodash'; | |
const flog = (whatever) => { | |
console.log(util.inspect(whatever, {depth: null, colors: true})); | |
}; | |
/** | |
* add .default to requires for 'stores/index' that don't already have them. | |
* | |
* this comes up because babel6 Does The Right Thing with es6 exports and | |
* commonjs requires now need to play by the rules of the es6 exported modules | |
* and specify the default argument. see more: | |
* https://medium.com/@kentcdodds/misunderstanding-es6-modules-upgrading-babel-tears-and-a-solution-ad2d5ab93ce0#.tjlvbfd4x | |
* | |
*/ | |
export default function transformer(file, api) { |
/** | |
* jsx-require-codeshift changes all import/require calls for .jsx files to their root files | |
* | |
* this is not a very complicated jscodeshift transform, but the more the merrier imo, since there | |
* aren't very many out there to peek at. (it could probably be satisfied with a not-crazy regex). | |
* | |
* What this does is converts calls like `import Foo from 'foo.jsx';` to `import Foo from 'foo';` | |
* and similarly, it also converts require calls for jsx files to their extensionless versions. | |
* | |
*/ |
var Nest = (classlist) => { | |
// classlist = 'foo bar baz' | |
let classes = classlist.split(' '); | |
classes.reverse(); | |
let nestReducer = (prev, current) => <div className={current}>{prev}</div>; | |
return (el) => (props) => classes.reduce(nestReducer, el) | |
} | |
var Hello = React.createClass({ |