Running ghost
ghost run
ghost start
Making a build
https://stackoverflow.com/a/36961021/6517383
#React-Native 0.49.0+
react-native bundle --dev false --platform android --entry-file index.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
#React-Native 0-0.49.0
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
let arr = new Array(9).fill().map(i => ({filledWith: 'x'})) | |
let winLength = Math.sqrt(arr.length); | |
console.log(arr); | |
debugger; | |
let win = checkList(arr, 2, arr.length); | |
console.log(win); | |
function checkList(arr, pos, winLength) { | |
let state = false; | |
state = checkWin(arr, pos, winLength, 4); // Checks diagnal starting from top left to bottom right |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://offcloud.com/#/sites Use 10 minute mail to transfer to mega.nz | |
https://tutsglaxy.com must have tutorials all present use the url above for that. | |
https://multicloud.com uploads to the google drive |
Existing docker images can be found at existing images at registry.hub.docker.com/ or Run the command on the terminal docker search linux
The Docker CLI has a command called run which will start a container based on a Docker Image. The structure is docker run .
By default, Docker will run a command in the foreground. To run in the background, the option -d needs to be specified.
By default, Docker will run the latest version available. If a particular version was required, it could be specified as a tag, for example, version 3.2 would be docker run -d redis:3.2
Docker first search the image locally and if not found than it searches the docker registery hub directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://mongoosejs.com/docs/plugins.html | |
// lastMod.js | |
module.exports = exports = function lastModifiedPlugin (schema, options) { | |
schema.add({ lastMod: Date }); | |
schema.pre('save', function (next) { | |
this.lastMod = new Date(); | |
next(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function getPresentRoot() { | |
if [ "$(uname -s)" = 'Linux' ]; then | |
basedir=$(cd $(dirname $(dirname "$(readlink -f "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")")) && pwd) | |
else | |
basedir=$(cd $(dirname $(dirname "$(readlink "$0" || echo "$(echo "$0" | sed -e 's,\\,/,g')")")) && pwd) | |
fi | |
} | |
getPresentRoot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function zero() { | |
arg = (arguments && arguments[0]) || ''; | |
return parseInt(eval(0 + arg)); | |
} | |
function one() { | |
arg = (arguments && arguments[0]) || ''; | |
return parseInt(eval(1 + arg)); | |
} | |
function two() { | |
arg = (arguments && arguments[0]) || ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var router = express.Router(); | |
var mongoose = require('mongoose'); | |
var Schema = mongoose.Schema; | |
var config = require('../../config/dev-config'); | |
/** | |
* @param {Float} miles Distance that needs to be covered | |
*/ |