Skip to content

Instantly share code, notes, and snippets.

View pstinnett's full-sized avatar

Patrick Stinnett pstinnett

View GitHub Profile
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
# Redirect www to non www
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
<?php
/**
* Custom configuration bootsrtap file for ExpressionEngine
*
* Place config.php in your site root
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php
* If you have moved your site root you'll need to update the require_once path
*
@pstinnett
pstinnett / gist:826324
Created February 14, 2011 18:41
Spree checkout.js updated to work for IE
(function($){
$(document).ready(function(){
$('#checkout_form_address').validate();
var get_states = function(region){
var country = $('span#' + region + 'country :first-child').val();
return state_mapper[country];
}
@pstinnett
pstinnett / ee_disqus_exporter.rb
Created December 30, 2009 18:07 — forked from shapeshed/ee_disqus_exporter.rb
ExpressionEngine comments to Disqus ruby script
# Copyright 2009 Michael Ivey, released to public domain
# Disqus guts lifted from http://github.com/squeejee/disqus-sinatra-importer/tree/master
# I wanted it to run from MySQL and command line, instead of a Sinatra app
require 'rubygems'
require 'rest_client'
require 'json'
require 'sequel'
disqus_url = 'http://disqus.com/api'