Skip to content

Instantly share code, notes, and snippets.

Requirements:

If you're on OSX you're probably best off using Homebrew to install this stuff:

$ brew install node mongodb

Usage:

package com.linkedin.dust.renderer;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.Writer;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.JavaScriptException;
@jmsktm
jmsktm / hostmanager.sh
Last active December 21, 2015 06:59
shell script to resolve hostname on the basis of domain name during server startup.
#!/bin/bash
# Requires two env variables ACETRAVELS_DOMAIN and ACETRAVELS_MINION to be set in /env/environment
# Hostname is set only if the above variables are set and has not been set already
HOSTNAME_RESOLVER_URI="http://config-server.cloud.acetravels.com:3000"
CURRENT=`hostname`
DOMAIN=`echo $ACETRAVELS_DOMAIN`
MINION=`echo $ACETRAVELS_MINION`
if [ "$MINION" == "true" ]; then
if [ -n "$DOMAIN" ]; then
@jmsktm
jmsktm / aws-instance-info.sh
Created August 30, 2013 07:01
AWS instance information
#/bin/bash
echo "AMI ID: $(curl http://169.254.169.254/latest/meta-data/ami-id)\n"
echo "AMI LAUNCH INDEX: $(curl http://169.254.169.254/latest/meta-data/ami-launch-index)\n"
echo "AMI MANIFEST PATH: $(curl http://169.254.169.254/latest/meta-data/ami-manifest-path)\n"
echo "BLOCK DEVICE MAPPING: $(curl http://169.254.169.254/latest/meta-data/block-device-mapping/)\n"
echo "HOSTNAME: $(curl http://169.254.169.254/latest/meta-data/hostname)\n"
echo "INSTANCE ACTION: $(curl http://169.254.169.254/latest/meta-data/instance-action)\n"
echo "INSTANCE ID: $(curl http://169.254.169.254/latest/meta-data/instance-id)\n"
echo "INSTANCE TYPE: $(curl http://169.254.169.254/latest/meta-data/instance-type)\n"
echo "KERNEL ID: $(curl http://169.254.169.254/latest/meta-data/kernel-id)\n"
@jmsktm
jmsktm / geojson-test.geojson
Last active December 26, 2015 07:09
Test for geojson map on github
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
/*BEGIN RAPPORTIVE*/
body {
padding:0;
margin:0