Install language-latex and:
path = require 'path'
atom.workspaceView.eachEditorView (editorView) ->
editor = editorView.getEditor()
type t('a) = ReasonUrql.Types.response('a); | |
let map: (t('a), 'a => 'b) => t('b) = | |
(response, fn) => | |
switch (response) { | |
| Fetching => Fetching | |
| NotFound => NotFound | |
| Error(error) => Error(error) | |
| Data(data) => Data(fn(data)) | |
}; |
#!/bin/bash -eux | |
NAME=$1 | |
VERSION=$2 | |
FLOW_VERSION=0.25.x | |
echo $NAME@$VERSION | |
DIRECTORY=$(dirname $0)/definitions/npm/${NAME}_v$VERSION |
import _ from 'lodash' | |
export const get = (path, data) => { | |
const collection = JSON.parse(localStorage.getItem(path)) || [] | |
if (data && data.id) { | |
return Promise.resolve(_.find(collection, ['id', data.id])) | |
} | |
return Promise.resolve(collection) | |
} |
export default React.createClass({ | |
displayName: 'ExamplePage', | |
stores: [ExampleStore, OtherStore], | |
mixins: [StoreMixin], | |
render: function() { | |
return <h1>o/</h1>; | |
} | |
}); |
#!/bin/sh | |
CHANGED_JS_FILES=$(git diff --cached --name-only --diff-filter=ACMRTUXB -- '*.js') | |
echo | |
if [ -n "$CHANGED_JS_FILES" ]; then | |
eslint $CHANGED_JS_FILES | |
fi |
It is a python package for creating thumbnails. It is not tied to a specific web framework, but is designed to work with most of them and has planned integrations with Django and Flask.
#!/bin/sh | |
PID_PATH=/var/run/xvfb_99/`date +%s`.pid | |
start-stop-daemon --start --pidfile $PID_PATH --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +extension RANDR +render -noreset > /dev/null || exit 1 | |
sleep 3 > /dev/null | |
export DISPLAY=:99 > /dev/null | |
apm test | |
EXIT_CODE=$? | |
start-stop-daemon --stop --pidfile $PID_PATH > /dev/null | |
exit $EXIT_CODE |
ifeq ($(shell uname -s), Darwin) | |
OPEN='open' | |
else | |
OPEN='see' | |
endif | |
ifeq ($(USE_BIB), false) | |
COMPILE = pdflatex -halt-on-error report.tex >> logs/compile \ | |
&& echo "Compiled report" || (cat logs/compile && fail) | |
else |