Skip to content

Instantly share code, notes, and snippets.

View lgriffin's full-sized avatar

Leigh Griffin lgriffin

  • Red Hat
  • Waterford
View GitHub Profile
0 : No action required, this could be a non-functional requirement or a validation metric. They should be taken into account but typically the ticket cannot be directly actioned upon and could be closed when the related work is completed.
1 : No tough process required, a trivial change such as a version bump, fixing a typo, etc.
2 : Almost a trivial change but some tough process required, e.g. logging statements and docs update.
3 : Manageable change for 1 person. Relatively easy change which might hit multiple components, some form of research is possibly needed prior to the start of real work.
5 : Possibly a manageable change for 1 person but multiple people could collaborate. Scope might hit multiple components, small amount of uncertainty that might require a spike, sub-tasks are most likely to appear at this point.
8 : Potentially no longer a manageable change for 1 person but an indicator that help might be necessary. Same as a 5 but wit higher uncertainty, meaning a spike is most likely to be required
@lgriffin
lgriffin / Events.js
Created February 15, 2016 16:07
App Based Subscription model
var eventEmitter3 = require('eventemitter3');
var EE = new eventEmitter3();
EE.on('unsubscribe',function(appName){
console.log("Unsubscribe request received for " + appName);
removeListener(appName);
});
function addListener(appName)
{
@lgriffin
lgriffin / BatchEmitter.js
Created February 12, 2016 14:55
BatchEmitter
var events = require('events');
var eventEmitter = new events.EventEmitter();
var interval = 5000;
var notificationMessage = {
created: "12-02-16",
dynoName: "Dyno1",
status: "RUNNING",
messages: []
};
@lgriffin
lgriffin / watcher.js
Created January 19, 2016 15:47
Directory watcher and Total Size reported
var chokidar = require('chokidar');
var dir = '.';
var du = require('du');
var watcher = chokidar.watch(dir, {ignored: /[\/\\]\./});
function getSize()
{
du(dir, function (err, size) {
console.log('The current size of ' + dir + ' is:', size, 'bytes');
});
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL -l
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.0.0-p0
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
rbenv rehash
rbenv global 2.0.0-p0
gem install rails --no-ri --no-rdoc