Bluekite REST APIs use Uniform Resource Identifiers (URIs) to address resources. URI designs range from masterpieces that clearly communicate the API’s resource model like: http://api.staging.bluekite.com/api/v1/countries?token=009342334
This file contains 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
(load-theme 'wombat t) | |
(add-to-list 'load-path "~/.emacs.d") | |
(require 'php-mode) | |
;; To use abbrev-mode, add lines like this: | |
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode)) | |
(add-hook 'php-mode-hook 'my-php-mode-stuff) | |
(defun my-php-mode-stuff () |
This file contains 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
(defun semicolon () | |
"Add semicolon at the end of the line and return to current position" | |
(interactive) | |
(setq current (point)) | |
(end-of-line) | |
(if (not (= (preceding-char) 59)) | |
(insert ";") | |
) | |
(goto-char current) | |
) |
This file contains 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
(defun other-window-backward(&optional n) | |
"Select Nth previows window" | |
(interactive "p") | |
(other-window (- (or n -1)) | |
) | |
(global-set-key "\C-x\C-p" 'other-window-backward) | |
(global-set-key "\C-x\C-n" 'other-window) |
This file contains 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
App = Ember.Application.create() | |
App.Router.map -> | |
@route "entries", path: "/" | |
App.EntriesView = Ember.View.extend | |
templateName: 'entries' | |
App.NewEntryView = Ember.View.extend | |
templateName: 'new_entry' |
This file contains 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
//Route | |
{ | |
method: 'GET', | |
path: '/{version}/services/{path*}', | |
config:{ | |
handler: { | |
proxy: { | |
mapUri: controller.payments.mapper , | |
passThrough: true, |
This file contains 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
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") |
This file contains 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
// 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) { |
This file contains 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
$ 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 |
OlderNewer