Skip to content

Instantly share code, notes, and snippets.

@douggrubba
douggrubba / install.sh
Last active August 29, 2015 13:57 — forked from fideloper/install.sh
Super stupid, simple LAMP server. Just for goofy stuff, not production.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@douggrubba
douggrubba / nfl.css
Created June 26, 2014 03:34
All the NFL teams with a 3 color scheme.
.ARI {
background-color: #870619;
border: 1px solid #000000;
color: #ffffff;
}
.ATL {
background-color: #BD0D18;
border: 1px solid #000000;
color: #ffffff;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
======================================================================
Halflife Contrast
======================================================================
A Sublime Text 2 / Textmate theme.
Copyright (c) 2014 Dayle Rees.
Released under the MIT License <http://opensource.org/licenses/MIT>
======================================================================
alias blue='sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport && sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport'
@douggrubba
douggrubba / create.php
Created September 12, 2011 15:13
my goofy controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Create extends Personal_Controller {
/*
*
* Let people create new projects
*
*/
public function index()
//add support for the display id
$display_id = sprintf('(SELECT COALESCE(display_id, 0) + 1 FROM (SELECT MAX(display_id) AS display_id FROM '.DBPRE.'records WHERE project_id = %d) AS x)', $data['project_id']);
$this->db->set('display_id', $display_id, FALSE);
$this->db->insert(DBPRE . 'records', $data);
@douggrubba
douggrubba / "rename" s3 object
Created December 6, 2011 20:58
"rename" s3 object
$old_dir = getcwd() . '/projects/' . $old_url_name;
$new_dir = getcwd() . '/projects/' . $new_url_name;
// Instantiate the class
$s3 = new AmazonS3();
$s3->disable_ssl();
$cp_resp = $s3->copy_object(
array( // Source
'bucket' => S3BUCKET,
'filename' => $old_dir
// html purifier
require_once $this->fcpath.$this->apppath.'libraries/htmlpurifier/library/HTMLPurifier.auto.php';
$this->ci->htmlpurifier = new HTMLPurifier();
$config = HTMLPurifier_Config::createDefault();
$this->html = $this->ci->htmlpurifier->purify($this->html, $config);
@douggrubba
douggrubba / gist:3140487
Created July 19, 2012 03:03 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS and create PostGIS template on Ubuntu 11.10 Oneiric Ocelot
#!/bin/bash
#
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box
# http://wildfish.com
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
@douggrubba
douggrubba / gist:3980056
Created October 30, 2012 13:02 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt