- list-buffers | C-#
- paste-buffer | C-]
- h,j,k,l
- c new window
- w list windows
| $paths = [ | |
| { | |
| 'log_files' => ["${application_directory}/log/${application_environment}.log"], | |
| 'application' => "${application_name}", | |
| 'environment' => "${application_environment}", | |
| 'stack' => "${application_environment}${stack_id}", | |
| 'fqdn' => "${fqdn}", | |
| 'file' => "${application_environment}.log", | |
| 'type' => 'application', | |
| }, |
| var Hapi = require('hapi'); | |
| // Create a server with a host and port | |
| var server = new Hapi.Server('localhost', 8000); | |
| // Add the route | |
| server.route({ | |
| method: 'POST', | |
| path: '/notification', | |
| handler: function (request, reply) { |
| var mysql = require('mysql'); | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', | |
| password : 'adj', | |
| database : 'xoomphones' | |
| }); | |
| module.exports = { |
| const COWBELL = "https://agent.electricimp.com/05V8cFjX6eN4"; | |
| function cowbell(nullData) { | |
| server.log("Button action"); | |
| // http.get(COWBELL).sendsync(); | |
| } | |
| device.on("buttonPress", cowbell); |
| $ sudo /usr/bin/sqlite3 /opt/nagios/var/rw/nagios_hosts.db 'create table add_hosts (hostname TEXT, dstamp INTEGER); create table del_hosts (hostname TEXT);' | |
| $ sudo /opt/xoom/nagios/bin/process_api_hosts_icinga.sh add | |
| $ vim /opt/nagios/etc/check_mk/conf.d/hosts.mk #check if is correct | |
| $ sudo service monitoring start |
| // 1. I'm doing a post request to a resource | |
| // 2. I read SSE url for the creation procces of the resource is readed in the link header of the response | |
| // 3. I run a GET to that url an try to stream the SSE to stdout | |
| var parse = require('parse-link-header'); | |
| var Nipple = require('nipple'); | |
| Nipple.post('resourceurl.com/myresource',{payload:somedata}, function (err1, res1, payload1) { | |
| Nipple.read(res1, function (err1, body) { |
| Ember.FEATURES['ember-routing-drop-deprecated-action-style'] = true | |
| App = Ember.Application.create({}) | |
| App.IndexController = Ember.ArrayController.extend( | |
| page: 5 | |
| perPage: 10 | |
| start: (-> | |
| page = @get("page") | |
| perPage = @get("perPage") | |
| (page - 1) * perPage | |
| ).property("page", "perPage") |
| //Route | |
| { | |
| method: 'GET', | |
| path: '/{version}/services/{path*}', | |
| config:{ | |
| handler: { | |
| proxy: { | |
| mapUri: controller.payments.mapper , | |
| passThrough: true, |