Skip to content

Instantly share code, notes, and snippets.

@jamchamb
jamchamb / oss_android_studio_setup.md
Last active September 9, 2018 15:01
How to set up Android Studio on Fedora Workstation with a network home mount

Android Studio likes to run in Oracle's runtime, and the cache and config files it stores in the user's home directory (including virtual device images) start to eat up too much space on our network home mount. Here's how to set up Oracle JDK and Android Studio on Fedora Workstation, and configure Android Studio to keep its files on a local drive.

Setting up Oracle JDK

Get the latest Java SE Development Kit "critical patch update" release from oracle.com, and if OpenJDK is already installed then configure these alternatives:

@jamchamb
jamchamb / node-https-server.js
Created July 18, 2017 18:37
Simple Node HTTPS server
const tls = require('tls')
const fs = require("fs")
const https = require("https")
/*
$ openssl req -newkey rsa:2048 -new -nodes -x509 -days 365 \
-keyout key.pem -out cert.pem
*/
const options = {
key: fs.readFileSync('key.pem'),
@jamchamb
jamchamb / phd
Last active March 28, 2016 23:20
Centos init.d script for Phabricator PHD
#!/bin/sh
### BEGIN INIT INFO
# Provides: phd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: phabricator
# Description: manages phd
### END INIT INFO