- Set an environment variable called
CMDER_ROOT
to your root Cmder folder (in my caseC:\Program Files (x86)\Cmder
). It seems to be important that this does not have quotes around it because they mess with concatenation in the init script. - In your IntelliJ terminal settings, use
"cmd" /k ""%CMDER_ROOT%\vendor\init.bat""
as the Shell path. The double-double-quotes are intentional, as they counteract the missing double quotes in the environment variable.
This file contains 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 locked = false | |
const checkCanCall = (resolve) => { | |
if (locked) { | |
return setTimeout(() => checkCanCall(resolve), 100) | |
} | |
locked = true | |
resolve() | |
}; |
You must add the 'Content' to the viewProviders. It breaks the css margin of the root ion-content but works...
import { Content } from 'ionic-angular';
@Component({
selector: 'new-list',
templateUrl: 'list.html',
viewProviders: [Content]
This file contains 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
const arr = [1,2,3] | |
const max = arr.length -1 | |
console.info('before') | |
new Promise((resolve, reject)=>{ | |
arr.forEach((e, i)=>{ | |
setTimeout(()=>{ | |
console.log('Call n'+e) | |
if(i === max){ | |
resolve() |
This file contains 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
const asyncFn = (param) => { | |
return new Promise((resolve, reject) => { | |
setTimeout(()=>{ | |
console.info(param) | |
resolve(param) | |
}, 1e3) | |
}) | |
} | |
console.info('before'); |
This file contains 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
const calculator = (function(){ | |
function add(numberString){ | |
if (numberString === ''){ | |
return 0 | |
} | |
const delimiter = getDelimiter(numberString) | |
const formattedInput = formatInput(numberString) | |
return calculateSum(getNumbers(formattedInput, delimiter)) |
This file contains 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
// Paste this at the and of your code to prevent console usage | |
var protect = function () { | |
// Disable all console logging | |
if(window && window.console){ | |
window.console = {} | |
} | |
// Trigger a debugger breakpoint set | |
function triggerDebugger() { | |
(function () {}.constructor('debugger')()) | |
// Recursive call |
This file contains 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
version: '3' | |
services: | |
kadira-engine: | |
restart_policy: | |
condition: on-failure | |
depends_on: | |
- mongo | |
image: vladgolubev/kadira-engine | |
ports: |
This file contains 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
# Copy this Dockerfile inside application bundle directory, then build image | |
FROM node:8.9.4 | |
WORKDIR /usr/src/app/myapp | |
COPY . . | |
WORKDIR /usr/src/app/myapp/programs/server | |
RUN set -e; \ | |
npm i --production; \ | |
npm i bcrypt; \ | |
rm -rf ./npm/node_modules/bcrypt; \ | |
cp -r ./node_modules/bcrypt ./npm/node_modules/bcrypt; |
This file contains 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
#!/bin/sh | |
MONGO_VERSION=3.4.10 | |
# Import the Public Key used by the Ubuntu Package Manager | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 | |
# Create a file list for mongoDB to fetch the current repository | |
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list | |
# Update the Ubuntu Packages | |
sudo apt update | |
# Install MongoDB | |
sudo apt install mongodb-org=$MONGO_VERSION mongodb-org-server=$MONGO_VERSION mongodb-org-shell=$MONGO_VERSION mongodb-org-mongos=$MONGO_VERSION mongodb-org-tools=$MONGO_VERSION |