Skip to content

Instantly share code, notes, and snippets.

@hummus
hummus / README
Created December 23, 2013 07:48 — forked from sasha-id/README
MongoDB upstart scripts for Ubuntu.
Run following commands after installing upstart scripts:
ln -s /lib/init/upstart-job /etc/init.d/mongoconf
ln -s /lib/init/upstart-job /etc/init.d/mongodb
ln -s /lib/init/upstart-job /etc/init.d/mongos
To start services use:
@hummus
hummus / gist:7889036
Last active December 30, 2015 21:39 — forked from somic/gist:123889
#!/bin/bash
# Prints out how many seconds ago this EC2 instance was started
# It uses Last-Modified header returned by EC2 metadata web service, which as far
# as I know is not documented, and hence I assume there is no guarantee
# that Last-Modified will be always set correctly.
# if this fails for some non-ec2 instance, then
# try to stat a file that might be from os-install time
# Use at your own risk.
python <<EOP
from datetime import datetime;import urllib2;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font: 14px sans-serif;
}
.axis path, .axis line {
fill: none;