Skip to content

Instantly share code, notes, and snippets.

View apipkin's full-sized avatar
🤖
^_^

Anthony Pipkin apipkin

🤖
^_^
View GitHub Profile
@apipkin
apipkin / bmvzvr.markdown
Last active February 23, 2019 19:48
Bumper Ball
@apipkin
apipkin / post-merge
Created May 14, 2016 21:22 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
<pre><code class="language-js">function () {
var a = 1;
}
</code></pre>
[09:30][apipkin:~/Desktop/player]$ npm run pack
> [email protected] pack /Users/apipkin/Desktop/player
> webpack --progress --colors
Webpak Config
Hash: 9a56cc72acac2de6f40c
Version: webpack 1.7.3
Time: 21ms
[0] ./src/js/app.jsx 0 bytes [built] [failed]
console.info('Webpak Config');
module.exports = {
entry: './src/js/app.jsx',
output: {
filename: 'app.js',
path: __dirname + '/public/js/'
},
module: {
loader: [
@apipkin
apipkin / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
{
"align_indent": false,
"alignment_chars":
[
"=",
":"
],
"alignment_space_chars":
[
"="
server.route({
method: 'GET',
path: '/frame/{file*}',
handler: {
directory: {
path: 'dist'
}
}
});
@apipkin
apipkin / gist:f4142ff2e2b79d4693a5
Last active August 29, 2015 14:06
Simple hapi.js file server
var Hapi = require('hapi'),
server = new Hapi.Server();
server.connection({
port: 3001
});
server.route({
path: '/{param*}',