brew install mongodb
Set up launchctl to auto start mongod
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
/usr/local/opt/mongodb/
is a symlink to /usr/local/Cellar/mongodb/x.y.z
(e.g., 2.4.9
)
#Mounting the share is a 2 stage process: | |
# 1. Create a directory that will be the mount point | |
# 2. Mount the share to that directory | |
#Create the mount point: | |
mkdir share_name | |
#Mount the share: | |
mount_smbfs //username:[email protected]/share_name share_name/ |
#!/bin/bash | |
set -eo pipefail | |
echo "Deleting existing hosting releases" | |
SITE=$1 | |
echo "Site: $SITE" | |
HEADER_AUTH="Authorization: Bearer "$(gcloud auth application-default print-access-token)""; |
// http://stackoverflow.com/questions/7789826/adb-shell-input-events | |
adb shell input keyevent 82 | |
0 --> "KEYCODE_0" | |
1 --> "KEYCODE_SOFT_LEFT" | |
2 --> "KEYCODE_SOFT_RIGHT" | |
3 --> "KEYCODE_HOME" | |
4 --> "KEYCODE_BACK" | |
5 --> "KEYCODE_CALL" |
// based on code from https://stackoverflow.com/questions/38779924/compiling-webpack-in-memory-but-resolving-to-node-modules-on-disk | |
import * as webpack from 'webpack' | |
import * as MemoryFileSystem from 'memory-fs' | |
import * as path from 'path' | |
import * as fs from 'fs' | |
import * as promisify from 'util.promisify' | |
const memFs = new MemoryFileSystem() | |
const statOrig = memFs.stat.bind(memFs) |
// Debug me with a tool like webstorm nad the child process will step in with your breakpoints :) | |
const fork = require('child-process-promise').fork | |
const debug = typeof v8debug === 'object' | |
export async function forkBin (args, debugPort) { | |
debugPort = debugPort || 40894 | |
let execArgv = debug ? ['--debug-brk', `--debug=${debugPort}`] : [] | |
const forkPromise = fork(binPath, args, { |
const net = require('net') | |
async function getAvailablePort () { | |
return new Promise((resolve, reject) => { | |
let server = net.createServer() | |
server.unref() | |
server.on('error', reject) | |
// zero gives it away ;) | |
server.listen(0, () => { |
* spin up a VM on GCE and | |
install docker (based on [these](https://docs.docker.com/installation/ubuntulinux/) instructions) | |
```bash | |
gcloud compute instances create dave --machine-type n1-standard-1 --image ubuntu-14-04 | |
gcloud compute ssh dave | |
wget -qO- https://get.docker.com/ | sh | |
``` | |
* to verify install is working |
console.log('download a file', device.platform, location.href); | |
function DownloadFile(uriString, fileName) { | |
try { | |
console.log("started"); | |
var applicationData = Windows.Storage.ApplicationData.current; | |
console.log("applicationData", applicationData.localFolder.path); | |
applicationData.localFolder |