I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This file contains hidden or 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 | |
## | |
# Install autoconf, automake and libtool smoothly on Mac OS X. | |
# Newer versions of these libraries are available and may work better on OS X | |
# | |
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html | |
# | |
export build=~/devtools # or wherever you'd like to build |
This file contains hidden or 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
// Index lookup for the node representing the doctor is omitted for brevity | |
Iterable<Relationship> relationships = doctor.getRelationships( Direction.INCOMING, COMPANION_OF ); | |
for ( Relationship rel : relationships ) | |
{ | |
Node companionNode = rel.getStartNode(); | |
if ( companionNode.hasRelationship( Direction.OUTGOING, IS_A ) ) | |
{ | |
Relationship singleRelationship = companionNode.getSingleRelationship( IS_A, Direction.OUTGOING ); | |
Node endNode = singleRelationship.getEndNode(); | |
if ( endNode.equals( human ) ) |
This file contains hidden or 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
// Install with 'npm install engine.io-client' | |
// Run in node.js as a client! (Not browser-only!) | |
/* Socket client */ | |
var eio = require('engine.io-client'); | |
var socket = new eio.Socket({ host: 'localhost', port: 8080 }); | |
socket.onopen = function () { |