Skip to content

Instantly share code, notes, and snippets.

View rtgibbons's full-sized avatar

Ryan Gibbons rtgibbons

View GitHub Profile
'initialize': function() {
this.model = WordModel;
this.url = App.config.get('servicesUrl') + 'services/words/enabled';
this.populate();
},
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteCond %{request_uri} !(.*)/$
RewriteRule ^(.*)$ $1/ [L,R=301]
@rtgibbons
rtgibbons / gist:5009517
Created February 21, 2013 23:43
grunt string-replace
'string-replace': {
optimized: {
files: {
'source/index.html': 'source/index.html'
},
options: {
replacements: [{
pattern: /static\/js\/main/,
replacement: 'static/js/main.optimized'
}]
@rtgibbons
rtgibbons / Package Control.sublime-settings
Created July 15, 2013 15:55
SublimeText_PackageControl.sublime-settings
{
"installed_packages":
[
"ApacheConf.tmLanguage",
"Base16 Color Schemes",
"Gist",
"GitGutter",
"JsFormat",
"nginx",
"Package Control",
@rtgibbons
rtgibbons / Preferences.sublime-settings
Created July 15, 2013 15:56
Sublime Text Settings
{
"color_scheme": "Packages/Base16 Color Schemes/base16-eighties.dark.tmTheme",
"enable_telemetry": true,
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"git_command": "/opt/boxen/homebrew/bin/git",
"ignored_packages":
[
"Vintageous"
],
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
@rtgibbons
rtgibbons / customimpactsnippet.php
Created September 23, 2013 02:14
custom impact mysql error
public function getTotalDonationImpactOfUserIds($user_ids_array){
$queryGZ = "SELECT SUM(amount) FROM gz_donations where ";
$queryMGF = "SELECT SUM(amount) FROM mgf_donations where ";
for ($i=0; $i<count($user_ids_array); $i++){
$id = $this->db->escape($user_ids_array[$i]);
if ($i == count($user_ids_array) - 1) {
$queryGZ = $queryGZ . "referrer_user_id ='$id' OR donated_by_user_id ='$id'";
@rtgibbons
rtgibbons / Dockerfile
Created November 8, 2013 19:37
Dockerfile for Ghost demo server on ubuntu 12.10
# DOCKER-VERSION 0.6.6
FROM ubuntu:12.10
# Install Node.js from Chris Lea's PPA to get v0.10.x
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get install -y nodejs
ADD . /var/www
@rtgibbons
rtgibbons / supervisord.sh
Created March 12, 2016 17:51
supervisors init script from centos6
#!/bin/bash
#
# supervisord This scripts turns supervisord on
#
# Author: Mike McGrath <mmcgrath@redhat.com> (based off yumupdatesd)
#
# chkconfig: - 95 04
#
# description: supervisor is a process control utility. It has a web based
# xmlrpc interface as well as a few other nifty features.
@rtgibbons
rtgibbons / # macvim - 2016-03-29_21-37-33.txt
Created March 30, 2016 02:41
macvim on OS X 10.11.4 - Homebrew build logs
Homebrew build logs for macvim on OS X 10.11.4
Build date: 2016-03-29 21:37:33