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
)
var mongoose = require('mongoose'); | |
mongoose.Query.prototype.paginate = function(page, limit, callback) { | |
var query = this | |
, page = page || 1 | |
, limit = limit || 10 | |
, offset = (limit * page) - limit; | |
query = query.skip(offset).limit(limit); | |
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
const {app, BrowserWindow} = require('electron') | |
const path = require('path') | |
const url = require('url') | |
// Keep a global reference of the window object, if you don't, the window will | |
// be closed automatically when the JavaScript object is garbage collected. | |
let win | |
function createWindow () { | |
// Create the browser window. |
This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.
Read the entire Decent Security guide, and follow the instructions, especially:
# Generate a BaseSystem.dmg with 10.13 Install Packages | |
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/highsierra/ | |
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
$ docker run --name mysql-c1 -d -v /workspace/docking:/workspace/docking mysql/mysql-server
Remember to wait for a few seconds and then continue.
$ docker logs mysql-c1 2>&1 | grep GENERATED # On Windows it's "findstr" instead of "grep"
# Copy that password from output: e.g. GENERATED ROOT PASSWORD: Axegh3kAJyDLaRuBemecis&EShOs
$ docker exec -it mysql-c1 mysql -u root -p
First create a mongod config file. e.g.
# mongod.conf
# Where and how to store data.
storage:
dbPath: /data/db
directoryPerDB: true
journal:
enabled: true
#!/bin/bash | |
hdiutil create -o /tmp/Mojave.cdr -size 8g -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo /Applications/Install\ macOS\ 10.14\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build | |
mv /tmp/Mojave.cdr.dmg ~/Desktop/InstallSystem.dmg | |
hdiutil detach /Volumes/Install\ macOS\ 10.14\ Beta | |
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/Mojave.iso |
# Install these packages (use your favorite AUR tool here) | |
yay -S minikube kubectl docker-machine-driver-kvm2 libvirt qemu-headless ebtables | |
# Get libvirt going | |
sudo systemctl enable libvirtd.service | |
sudo usermod -a -G libvirt $(whoami) | |
# This fix thanks to http://blog.programmableproduction.com/2018/03/08/Archlinux-Setup-Minikube-using-KVM/ | |
sudo virsh net-autostart default |