Skip to content

Instantly share code, notes, and snippets.

View ryanlindsey's full-sized avatar
🏠
Working from home

Ryan Lindsey ryanlindsey

🏠
Working from home
  • California
View GitHub Profile
@ryanlindsey
ryanlindsey / gist:1332231
Created November 1, 2011 23:05
CodeIgniter .htaccess
# Remove index.php from CodeIgniter application
RewriteEngine on
RewriteCond $1 !^(index\.php|css|js|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
@ryanlindsey
ryanlindsey / gist:1332237
Created November 1, 2011 23:09
.htaccess
AddDefaultCharSet utf-8
DefaultLanguage en-US
# Activate rewrite engine
Options +FollowSymLinks
RewriteEngine on
# Redirect to wwww
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
@ryanlindsey
ryanlindsey / gist:1943509
Created February 29, 2012 18:53
Apache config for cross-domain fonts
Edit: /etc/apache2/apache2.conf
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
<FilesMatch "\.(ttf|otf|eot)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
@ryanlindsey
ryanlindsey / sublime_text_settings
Created June 28, 2012 16:33
Sublime Text 2 Settings
{
"auto_complete": false,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
@ryanlindsey
ryanlindsey / install_ruby_1.9.3-p194
Created August 23, 2012 18:50
Install Ruby 1.9.3-p194 with rbenv
CONFIGURE_OPTS="--disable-install-doc --enable-shared" rbenv install 1.9.3-p194
@ryanlindsey
ryanlindsey / gist:3443032
Created August 23, 2012 22:55
Remove .DS_Store from git repository
# Navigate to your repo
$ find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch
$ git config --global core.excludesfile ~/.gitignore
$ echo .DS_Store >> ~/.gitignore
@ryanlindsey
ryanlindsey / gist:3960083
Created October 26, 2012 17:25
Flexslider 2.0 Properties
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
animation: "fade", //String: Select your animation type, "fade" or "slide"
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
reverse: false, //{NEW} Boolean: Reverse the animation direction
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
startAt: 0, //Integer: The slide that the slider should start on. Array notati
@ryanlindsey
ryanlindsey / bootstrap_vars_sass.css.sass
Created November 20, 2012 04:21
Bootstrap Variables (sass)
//
// Variables
// --------------------------------------------------
// Global values
// --------------------------------------------------
// Grays
{
"auto_complete": false,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
# For a similar requirement, I just wrote myself a little Guardfile like this:
require 'guard/guard'
module ::Guard
class Middleman < ::Guard::Guard
def run_all
system("bundle exec middleman build --clean")
end