$ ./node_modules/.bin/knex:migrate:latest -c db/config.js| mylib.close_to_tray = -> | |
| gui = require('nw.gui') | |
| win = gui.Window.get() | |
| tray = null | |
| win.on 'close', -> | |
| this.hide() | |
| tray = new gui.Tray({ icon: 'icon.jpg' }) |
| # check if job exists | |
| curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
| # with folder plugin | |
| curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # without folder plugin | |
| curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # create folder |
#Express - Logging The express.js node.js web application framework comes with a built-in logging module called logger which is the connect.js logger. It is really handy to enable and you can use it just like any other Express module. app.use(express.logger());
Without any configuration, the logger middleware will generate a detailed log using what is called the default format. The logger actually supports four predefined log formats: default, short ,tiny, and dev. Each of these predefined formats show various amounts of detail. You can specify one of them this way:
app.use(express.logger('dev'));
If you prefer, you can customize the precise details to be logged using the the following options to format the output of the logger:
The advantages of using Grunt with Cordova:
- It simplifies working with the cordova cli.
- It provides a mechanism to copy platform customization to the
platformsdirectory without having to commit the generatedpluginsandplatformsdirectories to version control. - It provides a way to watch resources and automatically run cordova commands.
Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
| #! /bin/bash | |
| # Description: show dependency tree | |
| # Author: damphat | |
| if [ $# != 1 ]; then | |
| echo 'Usage: apt-rdepends-tree <package>' | |
| echo 'Required packages: apt-rdepends' | |
| exit 1 | |
| fi |
| const express = require("express"); | |
| const router = express.Router(); | |
| router.get('/', function (req, res) { | |
| res.send("This is the '/' route in ep_app"); | |
| }); | |
| module.exports = router; |
| 'use strict'; | |
| /* To test: | |
| * echo -n <input> | nc localhost 1337 | |
| * | |
| * Results are <input>:<nonce> | |
| * | |
| * Passing e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e should get back | |
| * e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e:2c8 | |
| */ |
| var that = this; | |
| var recognition = new webkitSpeechRecognition(); | |
| recognition.continuous = true; | |
| recognition.interimResults = true; | |
| recognition.onstart = function() | |
| { | |
| var context = new webkitAudioContext(); | |
| navigator.webkitGetUserMedia( |