Skip to content

Instantly share code, notes, and snippets.

View JacobJohansen's full-sized avatar

Jacob Johansen JacobJohansen

View GitHub Profile
@JacobJohansen
JacobJohansen / host-manager
Created June 8, 2017 15:49 — forked from nddrylliog/host-manager
A command-line utility to manage the /etc/hosts file.
#!/bin/bash
# Idea and interface taken from https://github.com/macmade/host-manager
path="/etc/hosts"
addusage="Usage: `basename $0` -add host address"
remusage="Usage: `basename $0` -remove host"
case "$1" in
-add)
if [ $# -eq 3 ]; then
if [[ -n $(grep "^$3.*[^A-Za-z0-9\.]$2$" ${path}) ]]; then
@JacobJohansen
JacobJohansen / stormTopologyCheck.py
Created January 13, 2017 03:55 — forked from wesfloyd/stormTopologyCheck.py
Script runs constantly at X seconds interval checking to see if topologies have stopped processing new Tuples
# Wes Floyd April 2015
import sys
import requests
import json
import argparse
import pprint
import time
pp = pprint.PrettyPrinter(indent=4)
@JacobJohansen
JacobJohansen / index.html
Last active June 27, 2016 18:32 — forked from ZJONSSON/index.html
testing circles in Leaflet.js (working)
<!DOCTYPE html>
<html>
<head>
<title>Testing d3.js in Leaflet.js</title>
<link rel="stylesheet" href="leaflet.css"></link>
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script>
<script src="http://code.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<style type="text/css">
svg , g