Skip to content

Instantly share code, notes, and snippets.

@pward123
pward123 / deep_extend_javascript_objects_underscore_mixin.js
Created November 23, 2013 12:34 — forked from kurtmilam/deep_extend_javascript_objects_underscore_mixin.js
Updated to allow transforming the property names while extending
/* Copyright (C) 2012-2013 Kurt Milam - http://xioup.com | Source: https://gist.github.com/1868955
*
* Modified by Paul Ward to allow transforming the name of properties by passing a transform function as the last parameter
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
#!/bin/bash -x
useradd -m NibblesAndBits
sudo apt-get install build-essential -y
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update -y
sudo apt-get install nodejs -y
sudo apt-get install mongodb -y
sudo apt-get install couchdb -y
@pward123
pward123 / form.js
Last active August 29, 2015 13:57 — forked from digilord/formGetter.coffee
getFormValues
/**
* Returns a hash of the form values for the form closest to the provided target
**/
getFormValues = function _getFormValues(target) {
var fields = $(target).closest('form').find(':input');
return _.reduce(fields, function(initial, field) {
var name = field.name;
if (name === '') return initial;
initial[name] = field.value.trim();
#!/bin/sh
#
# Run Script
# wget -qO - "https://git.io/vUGQt" | sudo sh
# Edit Script
# wget -q --content-disposition "https://git.io/vUGQt"
#
set -e