Add the repository:
- name: "add our custom package repository"
sudo: true
apt_repository: >
repo='ppa:bencoe/ppa'
state=present| var _ = require('lodash'), | |
| elasticsearch = require('elasticsearch'); | |
| function Search(opts) { | |
| _.extend(this, { | |
| client: new elasticsearch.Client({ | |
| host: process.env.ELASTIC_SEARCH_URL || 'localhost:9200' | |
| }) | |
| }, opts); | |
| } |
| var restify = require('restify'), | |
| server = restify.createServer(), | |
| search = new (require('./lib').Search); | |
| // add the query-string parsing extension | |
| // to restify. | |
| server.use(restify.queryParser()); | |
| // lookup packages by their name. | |
| server.get('/search', function(req, res, cb) { |
| # Update and install dependent packages. | |
| - name: install nagios' dependent packages | |
| sudo: true | |
| apt: pkg={{ item }} state=present force=true update_cache=yes | |
| with_items: nagios_packages | |
| - name: install legacy packages | |
| sudo: true | |
| apt: pkg={{ item }} state=present force=true update_cache=yes | |
| with_items: nagios_legacy_packages |
| var restify = require('restify'), // require the restify library. | |
| server = restify.createServer(); // create an HTTP server. | |
| // add a route that listens on http://localhost:5000/hello/world | |
| server.get('/hello', function (req, res, cb) { | |
| res.send("Hello World!"); | |
| return cb(); | |
| }); | |
| server.listen(process.env.PORT || 5000, function () { // bind server to port 5000. |
| { | |
| "name": "npm-typeahead", | |
| "version": "0.0.0", | |
| "description": "Perform typeahead searchs for npm packages.", | |
| "main": "lib/index.js", | |
| "scripts": { | |
| "test": "./node_modules/.bin/mocha -u bdd" | |
| }, | |
| "repository": { | |
| "type": "git", |
| COMPONENTS="main restricted universe multiverse" |
Add the repository:
- name: "add our custom package repository"
sudo: true
apt_repository: >
repo='ppa:bencoe/ppa'
state=present| # atomic update of a key using LUA. | |
| EVAL "local t1 = cjson.decode(redis.call('get', ARGV[1])); local t2 = cjson.decode(ARGV[2]); for k,v in pairs(t2) do t1[k] = v end; redis.call('set', ARGV[1], cjson.encode(t1))" 0 "foo" '{"bar": 3}' | |
| local id = ARGV[1] | |
| local t1 = cjson.decode(redis.call('get', id) | |
| local t2 = cjson.decode(ARGV[2]) | |
| # merge the new hash with the prior hash. | |
| for k,v in pairs(t2) do t1[k] = v end | |
| redis.call('set', id, cjson.encode(t1)) |
| #!/bin/bash | |
| # script created by nsc | |
| # usage ./bw_watch bw_warning bw_critical pkt_warning pkt_critical | |
| # bw usage is in kbits/s | |
| if [[ -z $1 ]] || [[ -z $2 ]] || [[ -z $3 ]] || [[ -z $4 ]] | |
| then | |
| echo "VARIABLES ARE NOT SET!!!" | |
| echo "usage $0 bw_warning bw_critical pkt_warning pkt_critical" | |
| echo "bw usage is in kbits/s" |
I hereby claim:
To claim this, I am signing this object: