Skip to content

Instantly share code, notes, and snippets.

@a-laughlin
a-laughlin / markdown-details-collapsible.md
Last active May 8, 2021 22:21 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@a-laughlin
a-laughlin / eslint-pushed-changes.sh
Created March 15, 2017 19:45 — forked from stalniy/eslint-pushed-changes.sh
ESLINT + pre-receive git hook
#!/bin/bash
TEMPDIR=`mktemp -d`
ESLINTRC=$TEMPDIR/.eslintrc
COMMAND="eslint --color -c $ESLINTRC --rule 'import/no-unresolved: 0' --rule 'import/no-duplicates: 0' --rule 'import/export: 0'"
git show HEAD:.eslintrc > $ESLINTRC
echo "### Ensure changes follow our code style... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
@a-laughlin
a-laughlin / pre-commit
Created March 15, 2017 19:13 — forked from broofa/pre-commit
Git pre-commit hook that runs `eslint` with the `--fix` option to fix up issues where possible, and adds "fix"ed files into the commit
#!/bin/bash
cd "$(git rev-parse --show-toplevel)"
ESLINT="node_modules/.bin/eslint"
pwd
if [[ ! -x "$ESLINT" ]]; then
printf "\t\033[41mPlease install ESlint\033[0m (npm install eslint)\n"
exit 1
fi
@a-laughlin
a-laughlin / index.html
Created March 2, 2016 17:42 — forked from anonymous/index.html
JS Bin 3 ways to do Promise.all(asyncVals) // source http://jsbin.com/wegoha/14
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="3 ways to do Promise.all(asyncVals)">
<script src="https://cdn.rawgit.com/lodash/lodash/3.0.1/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>