Skip to content

Instantly share code, notes, and snippets.

@RasPhilCo
RasPhilCo / JsonHelper.java
Created November 14, 2015 19:34 — forked from codebutler/JsonHelper.java
Convert Android JSONObject/JSONArray to a standard Map/List.
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;
public class JsonHelper {
public static Object toJSON(Object object) throws JSONException {
if (object instanceof Map) {
JSONObject json = new JSONObject();
@RasPhilCo
RasPhilCo / baseline-freebsd.sh
Created November 4, 2015 05:11 — forked from mclosson/baseline-freebsd.sh
Create known good baseline of FreeBSD server basics
#!/bin/sh
# Script to generate a baseline of known good values for a FreeBSD 10.x server
# The outputs should be able to be diff'd later to verify that no changes have occured
BASELINE=baseline
SUDO=/usr/local/bin/sudo
/bin/rm -rf $BASELINE
/bin/mkdir $BASELINE
/bin/hostname > $BASELINE/hostname