- 'postgres' user is superuser
// Karma configuration file, see link for more information | |
// https://karma-runner.github.io/0.13/config/configuration-file.html | |
module.exports = function (config) { | |
config.set({ | |
basePath: '', | |
frameworks: ['jasmine', '@angular/cli'], | |
plugins: [ | |
require('karma-jasmine'), | |
require('karma-chrome-launcher'), |
export default function debounce(func, wait, immediate) { | |
let timeout | |
return function(...args) { | |
clearTimeout(timeout) | |
timeout = setTimeout(() => { | |
timeout = null | |
if (!immediate) func.apply(this, args) | |
}, wait) | |
if (immediate && !timeout) func.apply(this, [...args]) | |
} |
An example that shows the difference between creating a JavaScript class and subclass in ES5 and ES6.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo | |
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps | |
# The below command seems to fix the problem | |
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local | |
# The above command is a bit complicated, but all it's doing is copying whatever version of node | |
# you have active via nvm into the /usr/local/ directory (where user installed global files should | |
# live on a linux VPS) and setting the permissions so that all users can access them. |
aka "Let's take some notes about using Docker on Mac OS X to turn deployment of Scala applications into a much better experience."
DISCLAIMER The doc is a compilation of different articles and videos found on the Internet. Almost nothing's mine - mostly layout. See CREDITS section below to know who to praise. All mistakes are mine and are not intended. Drop me an email at [email protected] if you spot any errors or just share what you think about the doc.
The document lives at https://gist.github.com/jaceklaskowski/ca55be80cb76e84ce478
I'm on Mac OS X and so you're going to see a lot of setup tweaks for the platform that are not necessarily needed for your environment, esp. Linux one. When you see boot2docker
and you're on Linux, just disregard the line or even entire paragraph.
# Install Jenkins NVM plugin | |
mkdir -p /app/jenkins/plugins | |
chown jenkins:jenkins /app/jenkins/plugins | |
chmod 775 /app/jenkins/plugins | |
curl -o /app/jenkins/plugins/jenkins-nvm.hpi -ssL https://github.com/gextech/jenkins-nvm-plugin/blob/master/dist/jenkins-nvm.hpi?raw=true | |
chown jenkins:jenkins /app/jenkins/plugins/jenkins-nvm.hpi | |
chmod 0644 /app/jenkins/plugins/jenkins-nvm.hpi | |
#!/bin/bash | |
. ~/.nvm/nvm.sh |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example,vagrant init ubuntu/trusty64
.
vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)