Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network
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
| # Clean, simple, compatible and meaningful. | |
| # Tested on Linux, Unix and Windows under ANSI colors. | |
| # It is recommended to use with a dark background. | |
| # Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
| # | |
| # Mar 2013 Yad Smood | |
| # VCS | |
| YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} " | |
| YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}" |
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
| const puppeteer = require('puppeteer'); | |
| const devices = require('puppeteer/DeviceDescriptors'); | |
| const Good3G = { | |
| 'offline': false, | |
| 'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
| 'uploadThroughput': 750 * 1024 / 8, | |
| 'latency': 40 | |
| }; | |
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
| /** | |
| * Debounce a function so that it will only fire once | |
| * | |
| * USAGE EXAMPLE: | |
| * $scope.search = debounce(performSearch, 500); // Bind to ng-keyup | |
| * | |
| * http://davidwalsh.name/javascript-debounce-function | |
| * | |
| * @param func [Function] - The function to execute |
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
| { | |
| "Faces": [ | |
| { | |
| "name": "Oh well!", | |
| "art" : "¯\\_(ツ)_/¯" | |
| }, | |
| { | |
| "name": "Disapproving Look", | |
| "art": "ಠ_ಠ" | |
| }, |
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') | |
| , mongoskin = require('mongoskin') | |
| var app = express() | |
| app.use(express.bodyParser()) | |
| var db = mongoskin.db('localhost:27017/test', {safe:true}); | |
| app.param('collectionName', function(req, res, next, collectionName){ | |
| req.collection = db.collection(collectionName) |