Skip to content

Instantly share code, notes, and snippets.

View mikenairn's full-sized avatar

Michael Nairn mikenairn

View GitHub Profile
//http://stackoverflow.com/questions/1184624/convert-form-data-to-js-object-with-jquery
jQuery.fn.serializeObject = function () {
var o = {};
var a = this.serializeArray();
$.each(a, function () {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
@mikenairn
mikenairn / dev_artifact.json
Created April 25, 2013 12:35
dev_artifact
{
"name": "dev_artifact",
"description": "Install from artifacts",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
"environment": "production",
"artifact" : {
"url": "http://artifact.feedhenry.local"
#!/bin/bash
command -v node >/dev/null 2>&1 || {
echo -e "\033[1;31mNodejs not installed?\033[0m";
curl --silent --location https://rpm.nodesource.com/setup_4.x | sudo bash -
sudo yum install -y nodejs
}
export CORE_PROJECT_NAME=core
oc login -u test -p test