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
[alias] | |
current = !sh -c \"echo $(git branch | grep \"*\" | sed \"s/*//\")\" |
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
/** | |
* Requires jquery or sizzle | |
* | |
* Webkit compatible | |
* Firefox requires comparison of result of getComputedStyle to that of an | |
* unstyled element, since it's length is always non-zero 0 | |
*/ | |
$('*').filter(function(){return getComputedStyle(this, ':before').length != 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
#!/bin/sh | |
# | |
# Executes multiple scripts on a git event | |
# | |
# Expects scripts to be arranged like: | |
# some/directory/for/hooks/ | |
# pre-commit/ | |
# safe-debug.sh | |
# validate.sh | |
# update/ |
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
#!/bin/bash | |
if [ $# -le 2 ]; then | |
echo "Usage : `basename $0` id secret accounts"; | |
exit 1; | |
fi | |
NAMES=( alice alex andy armin barry beatrix belle beaumont brody callie carl chris claire dan dave davis derek dwayne edward eric fifi ford georgina greg gordon holly imogen jeff kyle liz melanie november oscar paula quinn reese samantha tilly ullyses violet wanda xiang yuself zack ) | |
SURNAMES=( abercrombie black chi dean edie fox gaant howes india juniper kent lemon middleton nice preston quirk reilly stevens tompsin unice viola wilkins xan yules zenith ) |
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
find . -name "*.php" | xargs grep -c -P '^\t+' | grep -v ':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
find . -name "*.php" | xargs grep -c -P '\s+$' | grep -v ':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
#!/bin/bash | |
if [[ $# -ne 1]]; then | |
echo "usage: line-endings.sh file-pattern" | |
echo "while file-pattern is a glob-like pattern to match files to" | |
echo | |
exit 1 | |
fi | |
find . -path $1 | xargs dos2unix |
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
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../google-map/google-map-search.html"> | |
<link rel="import" href="../core-animated-pages/core-animated-pages.html"> | |
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html"> | |
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-down.html"> | |
<link rel="import" href="../core-animated-pages/transitions/slide-up.html"> | |
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> |
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 { createSocketMiddleware } from 'redux-socket-middleware' | |
const store = createStore( | |
reducer, | |
applyMiddleware( | |
createSocketMiddleware((action) => store.dispatch(action), 'http://localhost:3030') | |
) | |
) |
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 SocketIO from 'socket.io' | |
const io = SocketIO(3030) | |
const history = [] | |
io.on('connection', (socket) => { | |
// Replay actions on new clients | |
socket.on('init', (_) => history.forEach(action => socket.emit('action', action))) | |