Skip to content

Instantly share code, notes, and snippets.

View pentateu's full-sized avatar
💭
Life is good

Rafael Almeida pentateu

💭
Life is good
  • New Zealand
View GitHub Profile
## start mongo and nats streaming
sudo docker run -d -p 27017:27017 mongo
# start nats streaming on port 4222
sudo docker run -d -p 4222:4222 nats-streaming -mc 0
## watch docker logs ## very usefull fixing issues :)
sudo journalctl -fu docker.service
## issues starting service.. use this to see error logs
on ubuntu host machine open ports on firewall
# in this case the subnet is 10.1.1.x
#docker daemon
sudo ufw allow from 10.1.1.0/8 to any port 2376 proto tcp
# Nats
sudo ufw allow from 10.1.1.0/8 to any port 4222 proto tcp
sudo ufw allow from 10.1.1.0/8 to any port 5775 proto udp
# mongo
## Guides
https://passthroughpo.st/hackintosh-kvm-guide-high-sierra-using-qemus-i440fx-chipset/
https://github.com/yoonsikp/macos-kvm-pci-passthrough
## Tools for Linux
# Install GNome Tweak to setup keyboard bindings
# Use ubuntu app store
# Go to Keyboard & Mouse (left menu) > Additional Layout Options (button) > Ctrl Position > Turn on Swap Left Win with Left Ctrl

Keybase proof

I hereby claim:

  • I am pentateu on github.
  • I am rafael_iswe (https://keybase.io/rafael_iswe) on keybase.
  • I have a public key ASAoRKEz7OOAFK76CWHMCoQmrk-PS03vh0LKKdudq2nc_Qo

To claim this, I am signing this object:

"use strict";
const DbService = require("moleculer-db");
const mongoose = require("mongoose");
const {
MongooseAdapter,
CRUDEvents
} = require("./common");
const collection = "XXXXXX";
const schema = mongoose.Schema(
{
@pentateu
pentateu / babel-plugin-transform-inline-environment-variables.js
Last active February 3, 2017 01:40
log the value of PARKING_ENV during transpilation -> replaced by babel-plugin-transform-inline-environment-variables !!!
/*
Replace the contents of the file:
parking-agentsApp/node_modules/babel-plugin-transform-inline-environment-variables/lib/index.js
with the contents here to log the value of PARKING_ENV during the react-native transpilation.
*/
/*istanbul ignore next*/"use strict";
exports.__esModule = true;