Quick function to deep merge using Object.assign(). Thoughts?
/**
* Simple is object check.
* @param item
* @returns {boolean}
*/| class BowlingGame { | |
| var moves = Vector.empty[Int] | |
| def roll(i: Int) = { | |
| moves = moves :+ i | |
| } | |
| def score: Int = score() |
| # Licensed under MIT. | |
| # Copyright (2016) by Kevin van Zonneveld https://twitter.com/kvz | |
| # | |
| # This Makefile offers convience shortcuts into any Node.js project that utilizes npm scripts. | |
| # It functions as a wrapper around the actual listed in `package.json` | |
| # So instead of typing: | |
| # | |
| # $ npm script build:assets | |
| # | |
| # you could just as well type: |
| var fs = require('fs'); | |
| var path = require('path'); | |
| task("pre:compile", function(event, logger) { | |
| var tiappxml = path.join(event.dir.project, 'tiapp.xml'); | |
| var tiapp = fs.readFileSync(tiappxml, { | |
| encoding : 'utf-8' | |
| }); |
When unsing docker compose you can have a problem with the order of dependent linked containers
The solution is to start a script which tries to access a service and waits until it gets ready before loading your program
| val rnd = Math.random() | |
| val n = Math.abs(rnd) | |
| assert(n > 0) |
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |
| var path = require('path'); | |
| var Nightmare = require('nightmare'); | |
| var should = require('chai').should(); | |
| describe('Nightmare demo', function () { | |
| this.timeout(15000); // Set timeout to 15 seconds, instead of the original 2 seconds | |
| var url = 'http://localhost:3000'; | |
| describe('Start page', function () { |
| admin account info" filetype:log | |
| !Host=*.* intext:enc_UserPassword=* ext:pcf | |
| "# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd | |
| "AutoCreate=TRUE password=*" | |
| "http://*:*@www” domainname | |
| "index of/" "ws_ftp.ini" "parent directory" | |
| "liveice configuration file" ext:cfg -site:sourceforge.net | |
| "parent directory" +proftpdpasswd | |
| Duclassified" -site:duware.com "DUware All Rights reserved" | |
| duclassmate" -site:duware.com |
| sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |