Skip to content

Instantly share code, notes, and snippets.

@joshholt
joshholt / JolokiaCommands.md
Created October 11, 2017 17:19 — forked from yashpatil/JolokiaCommands.md
Jolokia URLs for quick access to A-MQ statistics

This is a quick reference to get to Jolokia statistics urls for JBoss Fuse or JBoss A-MQ statistics. Sometimes, when you are interested in very specific attributes, it's easier to keep monitoring a specific url rather than loading the full Hawtio console.

@joshholt
joshholt / hidpi.txt
Created June 19, 2013 02:24 — forked from simX/hidpi.txt
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@joshholt
joshholt / package.json
Created January 23, 2012 21:09
Your Package.json file
{
"name": "my-first-provider",
"version": "0.0.1",
"dependencies" : {
"express": "2.5.0",
"jade": "0.16.4",
"underscore": "1.2.1"
}
}
@joshholt
joshholt / rsync_func.sh
Created January 19, 2012 17:12
Bash Function to sync directories
#------------------------------------------------
# $1 should be the local dir you want to sync
# $2 should be the remote server path (i.e. user@remote:~/)
#------------------------------------------------
function rsync_dir () {
rsync --verbose --progress --stats --compress --rsh=/usr/bin/ssh --recursive --times --perms --links --delete --exclude "*bak" --exclude "*~" $1 $2
}
@joshholt
joshholt / Procfile
Created January 19, 2012 16:38
Heroku Cedar Stack Procfile
web: node app.js
@joshholt
joshholt / route_db_middle_ware.js
Created January 18, 2012 21:03
Express Route DB Middle ware
var _ = require('underscore');
var insertRecord, fetchRecord, updateRecord, deleteRecord;
insertRecord = function(db, req) {
db[req.params.guid] = '{}';
return "We have inserted a record for the instance represented by the GUID: " + req.params.guid;
};
fetchRecord = function(db, req) {
return db[req.params.guid]
@joshholt
joshholt / route_middle_ware.js
Created January 18, 2012 20:54
Express Route Middleware
var findComponent = function(service_doc, req) {
return service_doc.components.filter(function (c) {
var c_fixed = c.name.toLowerCase().replace(/\s*/g, ''),
req_fixed = req.params.component.toLowerCase();
return c_fixed === req_fixed;
});
};
module.exports = {
configureInstance: function(service_doc) {
@joshholt
joshholt / app_final.js
Created January 18, 2012 20:29
App.js Stages
var express = require('express'),
db = {},
app = express.createServer(),
service_document = require('./lib/service_document'),
middle = require('./lib/route_db_middleware'),
renderer = require('./lib/route_rendering_middleware'),
port = process.env.PORT || 3000;
/*****************************************************************************
* Application Settings
@joshholt
joshholt / service_document.js
Created January 18, 2012 16:44
Provider Service Document
var BASE_IMG_URL = "http://ccpv2.herokuapp.com/images";
var BASE_COMP_URL = "http://ccpv2.herokuapp.com/components";
module.exports = {
name: 'The CCPV2 Test Provider',
version: '2.0.0',
logoUrl: BASE_IMG_URL + "/cloud_components.png",
components: [{
name: 'My First Component',
description: "This our first cloud component",
#logo {background: url(http://dl.dropbox.com/u/5268661/Eloqua.png); height: 55px; width: 125px; display:block;}
.logo { display: none; }
#header,#header-bottom,.dashboard-item-header h3 {background-color: #2d729e !important;}
#header-bottom {border-top: none;}
#header-bottom #main-nav li.aui-dd-parent {background-color: #003f67;}