Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am desmondmorris on github.
  • I am desmondmorris (https://keybase.io/desmondmorris) on keybase.
  • I have a public key whose fingerprint is 0D30 B94C A2F0 FE85 3E0A 45F5 5E44 8B9A 66B3 1B40

To claim this, I am signing this object:

curl -s https://gist.githubusercontent.com/desmondmorris/844bb652ba53b313030c/raw/c9e945b4a0ad993c4fce1b5d35ecbfb1a49e231e/jekins_server.sh | sudo sh
@desmondmorris
desmondmorris / config.js
Last active December 23, 2015 22:25
An environment aware config module for node.js
/**
* An environment aware configuration module.
*
* @module config/config
*/
'use strict';
// Module dependencies
var extend = require('util')._extend;
@desmondmorris
desmondmorris / gist:0fc39d6458f73e8867eb
Created February 25, 2015 01:02
Experiment ab test manifest
name: i am an ab test
hypothesis: I think that removing underlines from links will increases clicks
type: split
cap: 10000
audience:
- mobile
url: /^\/stories/[0-9]*\/.*/
variants:
without-underline:
affect: $('a').css('decoration', 'none');
@desmondmorris
desmondmorris / gist:babc7e5ac8c0f543ff2f
Created March 31, 2015 14:39
Installing ElasticSearch on OSX via Homebrew

Elasticsearch on OSX via Homebrew

Requirements

  • OSX with Homebrew installed

Installation

brew update
@desmondmorris
desmondmorris / gist:bb5d07da92dc1005da79
Last active September 18, 2015 18:47
d7-disable-robots
diff --git a/robots.txt b/robots.txt
index ff9e286..21ea432 100644
--- a/robots.txt
+++ b/robots.txt
@@ -1,57 +1 @@
-#
-# robots.txt
-#
-# This file is to prevent the crawling and indexing of certain parts
-# of your site by web crawlers and spiders run by sites like Yahoo!
@desmondmorris
desmondmorris / testHook.js
Created September 1, 2015 23:04
My first hook.io microservice
module['exports'] = function simpleHttpRequest (hook) {
// npm modules available, see: http://hook.io/modules
var request = require('request');
request.get('http://httpbin.org/ip', function(err, res, body){
if (err) {
return hook.res.end(err.messsage);
}
hook.res.end(body);
})
};
diff --git a/robots.txt b/robots.txt
index ff9e286..1f53798 100644
--- a/robots.txt
+++ b/robots.txt
@@ -1,57 +1,2 @@
-#
-# robots.txt
-#
-# This file is to prevent the crawling and indexing of certain parts
-# of your site by web crawlers and spiders run by sites like Yahoo!
module.exports = function (event) {
if (!event.name) return Promise.reject(new Error('You must supply a name.'))
return Promise.resolve(`Hello ${event.name}!`)
}
{
"name": "Static Template",
"description": "",
"details": "A static sample Power-Up hosted on GitHub pages. Feel free to fork [this repository](https://github.com/trello/power-up-template) as a starting point for your own Power-Up.",
"icon": {
"url": "./images/logo.png"
},
"author": "Trello Inc",
"capabilities": [
"attachment-sections",