Skip to content

Instantly share code, notes, and snippets.

View doapp-ryanp's full-sized avatar

Ryan Pendergast doapp-ryanp

View GitHub Profile
/.
/etc
/etc/init.d
/etc/init.d/atop
/etc/logrotate.d
/etc/logrotate.d/atop
/etc/logrotate.d/psaccs_atop
/etc/logrotate.d/psaccu_atop
/usr
/usr/bin
[branch "master"]
merge=refs/heads/master
remote=origin
@doapp-ryanp
doapp-ryanp / test.conf
Created October 4, 2011 02:06
Test desc
test
@doapp-ryanp
doapp-ryanp / gist:1364489
Created November 14, 2011 17:17
Manual Imagick crop via gravity
<?php
$this->imgMetadata['format'] = strtolower($this->imagickObj->getImageFormat());
$this->imgMetadata['width'] = $this->imagickObj->getImageWidth();
$this->imgMetadata['height'] = $this->imagickObj->getImageHeight();
$x = $y = 0;
switch ($gravity) {
case 'center':
// $gravity = \Imagick::GRAVITY_CENTER;
$x = ($this->imgMetadata['width']/2) - ($width/2);
:~/hubot# cat package.json
{
"name": "hosted-hubot",
"version": "2.1.4",
"author": "GitHub Inc.",
"keywords": "github hubot campfire bot",
"description": "A simple helpful Robot for your Company",
"licenses": [{
"type": "MIT",
"url": "http://github.com/github/hubot/raw/master/LICENSE"
~/hubot# bin/hubot
npm http GET https://registry.npmjs.org/hubot-hipchat
npm http 304 https://registry.npmjs.org/hubot-hipchat
npm http GET https://registry.npmjs.org/wobot/0.6.0
npm http 304 https://registry.npmjs.org/wobot/0.6.0
npm http GET https://registry.npmjs.org/node-xmpp
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/node-xmpp
npm http 304 https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/node-expat
~/hubot$ ~/hubot/bin/hubot -a hipchat -n Hubot
npm http GET https://registry.npmjs.org/hubot-hipchat
npm http GET https://registry.npmjs.org/hubot/2.1.4
npm http GET https://registry.npmjs.org/hubot-scripts
npm http GET https://registry.npmjs.org/optparse/1.0.3
npm http 304 https://registry.npmjs.org/hubot/2.1.4
npm http 304 https://registry.npmjs.org/hubot-hipchat
npm http 304 https://registry.npmjs.org/hubot-scripts
npm http 304 https://registry.npmjs.org/optparse/1.0.3
npm http GET https://registry.npmjs.org/wobot/0.6.0
@doapp-ryanp
doapp-ryanp / gist:2769047
Created May 22, 2012 13:27
dynamo exception class
class DynamoDbException extends Exception
{
//DyanmoDB exceptions. @see http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/ErrorHandling.html
const AccessDeniedException = 1;
const ConditionalCheckFailedException = 2;
const IncompleteSignatureException = 3;
const LimitExceededException = 4;
const MissingAuthenticationTokenException = 5;
const ProvisionedThroughputExceededException = 6;
const ResourceInUseException = 7;
@doapp-ryanp
doapp-ryanp / gist:4595068
Created January 22, 2013 14:34
configure spotify for linux shortcut keys
#@see rynop.com for details
sudo apt-get install xbindkeys
####now put the following in ~/.xbindkeysrc:
#KeyboardPlay
"dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
XF86AudioPlay
#KeyboardStop
@doapp-ryanp
doapp-ryanp / gist:6011897
Created July 16, 2013 19:35
geddy cors
this.before(function(){
var res = this.response;
if ('OPTIONS' == this.request.method) {
res.setHeaders(200,{
'Content-Type': 'text/plain',
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization, X-Requested-With',
'Access-Control-Max-Age': 5184000 //2 months