Instantly share code, notes, and snippets.

View vuejs-load-ajax-template.js
* Registers a Vue component. Can take a `templateUrl` in the componentDef that is loaded and resolved to `template`
* @param {string} name
* @param {Object} componentDef
function registerVueComponent(name, componentDef) {
if (componentDef.templateUrl) {
Vue.component(name, function (resolve, reject) {
// retrieve the template via axios async call
View neo4j-auth-error-curl.bash
> curl https://HOSTNAME:7473/db/data/
"errors" : [ {
"code" : "Neo.ClientError.Security.Unauthorized",
"message" : "No authentication header supplied."
} ]
View gremlin-server.yaml
# put this in the conf/gremlin-server/ directory
host: localhost
port: 8182
threadPoolWorker: 1
gremlinPool: 8
scriptEvaluationTimeout: 30000
serializedResponseTimeout: 30000
graphs: {
View Open in iTerm.scpt
* Finder Open iTerm Here - v1.0.2 - 4/14/2011
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* Modified by Ed Finkler to work with iTerm 2.9x Beta - Tuesday; February 2, 2016
View component.html
<div id="invite-friends-component">
<div class="row">
<div class="col-md-8"><h3>Invite Friends</h3></div>
<div class="col-sm-4 col-xs-6">
<button class="btn btn-social btn-facebook btn-block"><i class="fa fa-facebook"></i>Insert contact using Facebook</button>
<div class="row">
<div class="col-md-12">
<form action="{{ inviteFriendsActionUrl }}" method="POST">
View gist:6809c147256601b283a5

Stuff I did to debug during API dev on my local machine

Run the PHP dev server on your given port

php -S -t public public/index.php

In httpie, pass ?XDEBUG_SESSION_START=foobar on the query string with the request

cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database
Credit: Based on by Alex Soto
# from
sudo ln -s /usr/local/bin/dot /usr/bin/dot