Skip to content

Instantly share code, notes, and snippets.

@shapeshed
shapeshed / exp_permissions.sh
Created August 26, 2009 10:28
Correctly sets permissions for a new ExpressionEngine site
#!/bin/bash
# File: exp_permissions.sh
# Description: Sets permssions on a ExpressionEngine install
#
# Copyright 2009 George Ornbo (Shape Shed)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@choonkeat
choonkeat / ee-localize-mysqldump.rb
Created November 26, 2009 02:05
Because customizing config.php is insufficient (3rd party code get left out, config.php get overwritten on update, ...) http://boblet.tumblr.com/post/68095239/ee-localhost
#!/bin/env ruby
if ARGV.empty?
$stderr.puts <<-EOM
ExpressionEngine (1.x) MYSQL DUMP Localizer
1. Reads MYSQL DUMP of ExpressionEngine website from STDIN
2. Replaces ALL HOSTNAME & PATH data (config) with LOCAL SETTINGS
3. Output corrected MYSQL DYMP file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cross-browser kerning-pairs & ligatures</title>
<style>
body { font-family: sans-serif; background: #f4f3f3; color: rgba(40, 30, 0, 1); width: 500px; margin: 80px auto; padding: 0px; }
a { color: rgba(15, 10, 0, 0.8); text-decoration: none; border-bottom: 1px solid; padding: 1px 1px 0px; -webkit-transition: background 1s ease; }
a:hover { background: rgba(0, 220, 220, 0.2); }
p, li { line-height: 1.5; padding: 0em 1em 0em 0em; margin: 0em 0em 0.5em; }
@BenParizek
BenParizek / config.php
Created July 5, 2010 22:22 — forked from leevigraham/config_bootstrap.php
Custom configuration file for ExpressionEngine 2
<?php
/**************************************************
Custom configuration bootstrap file for ExpressionEngine
1) Place config.php above site root
2) Require this bootstrap file at the bottom of the config and database files:
system/expressionengine/config/config.php
Example: require(realpath(dirname(__FILE__) . '/../../../config.php'));
require 'rake/clean'
HAML = FileList['**/*.haml']
LESS = FileList['**/*.less']
COFFEE = FileList['**/*.coffee']
HTML = HAML.ext('html')
CSS = LESS.ext('css')
JS = COFFEE.ext('js')
@shapeshed
shapeshed / ee2_permissions.sh
Created July 27, 2010 11:24
Sets permissions on an ExpressionEngine 2 install
#!/bin/bash
# File: exp_permissions.sh
# Description: Sets permssions on a ExpressionEngine 2 install
#
# Copyright 2010 George Ornbo (Shape Shed)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
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
@bhollis
bhollis / .htaccess
Created March 25, 2012 22:58
Serving pre-gzipped assets from Apache
AddEncoding gzip .gz
RewriteEngine on
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Konqueror
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)\.css$ $1.css.gz [QSA,L]
RewriteRule ^(.*)\.js$ $1.js.gz [QSA,L]
RewriteRule ^(.*)\.html$ $1.html.gz [QSA,L]
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"