Skip to content

Instantly share code, notes, and snippets.

@lgarner
lgarner / Oculus Mobile SDK 0.6.2.0 on Ubuntu
Last active October 22, 2015 00:33
Oculus Mobile SDK 0.6.2.0 on Ubuntu
First, do most of this:
https://gist.github.com/dirkk0/b474e1218dcc02025e25
But for the native samples to compile, only do the following extra on a clean Oculus Mobile SDK 0.6.2 install:
cd osdk/VrAppSupport
ln -s VrGUI VrGui
The basic problem: Linux cares about capitalization.
@lgarner
lgarner / MongoDB Admin and User Creation.txt
Last active October 27, 2020 19:30
MongoDB admin and database user and role creation
Get MongoDB
-----------
https://www.mongodb.org/downloads
Or the apt repo based tutorial here for Ubuntu:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
MongoDB *should* match the python pymongo where possible to avoid version mismatch problems.
Take note about updating the mongod.conf file to a non-local host IP if doing db replication.
@lgarner
lgarner / OpenSSL cmds
Created May 13, 2015 17:50
openssl keys and cert generation, signed digest generation, verification of signed digest
# Creating a RSA private key
$ openssl genrsa -out rsaprivkey.pem 1024
# Creating a cert file from priv key
$ openssl req -new -x509 -key rsaprivkey.pem -out rsacert.pem
# Converting from PEM to DER
$ openssl x509 -outform der -in rsacert.pem -out rsacert.der
# Convertin from DER to PEM
@lgarner
lgarner / get_certificate_fragment.js
Created March 6, 2015 23:33
FirefoxOS, getting a certificate for an app.
getCertificate: function getCertificate(aManifestURL) {
let manifestURL = "app://system.gaiamobile.org/manifest.webapp"; // change.
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "appsService",
"@mozilla.org/AppsService;1",
"nsIAppsService");
let app = appsService.getAppByManifestURL(manifestURL);
if (!app) {