Skip to content

Instantly share code, notes, and snippets.

View dhc02's full-sized avatar

D.H. Clapp dhc02

View GitHub Profile
@dhc02
dhc02 / ThinkUp on EC2 Ubuntu 10.10 User-Data Script
Created April 22, 2011 17:34 — forked from waxpancake/ThinkUp on EC2 Ubuntu User-Data Script
Install script for non-interactively installing ThinkUp and prerequisites
#!/bin/bash -ex
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
# install ThinkUp on EC2 Ubuntu instance:
#
# @spara 12/23/10
# @waxpancake 1/3/11
# install required packages
sudo apt-get update
(function($){
function dragEnter(e) {
$(e.target).addClass("dragOver");
e.stopPropagation();
e.preventDefault();
return false;
};
function dragOver(e) {
e.originalEvent.dataTransfer.dropEffect = "copy";
(function($){
var insertAtCaret = function(value) {
if (document.selection) { // IE
this.focus();
sel = document.selection.createRange();
sel.text = value;
this.focus();
}
else if (this.selectionStart || this.selectionStart == '0') {
var startPos = this.selectionStart;