Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<link rel="stylesheet" src="main.css">
<script src="main.js"></script>
@lukebussey
lukebussey / gist:7e74d2f89fecc4daf50d
Created December 5, 2014 05:28
Dropdown Transitions for Bootstrap 3
.open > .dropdown-menu {
opacity: 1;
visibility: visible;
}
.dropdown-menu {
display: block;
opacity: 0;
transition: visibility 0.2s ease,
opacity 0.2s ease;
@lukebussey
lukebussey / http.js
Last active August 29, 2015 14:10
Angular $http delay/latency
/**
* Delay all $http calls for JSON objects by 2 seconds
* Used to introduce latency to see how things load.
*/
module.config(['$httpProvider', function ($httpProvider) {
$httpProvider.interceptors.push([
'$q', '$timeout',
function ($q, $timeout) {
sudo chmod -R +a '_www allow read,write,delete,add_file,add_subdirectory,file_inherit,directory_inherit' DIR
# Negative FilesMatch
<FilesMatch ".+\.(?!(css|js|gif|jpe?g|png|svg)$)[^\.]+?$">
</FilesMatch>
@lukebussey
lukebussey / .bash_profile
Last active August 29, 2015 14:15
Shell Prompt
#  ~/Workspace/foundationify/ (master)
# B/w
#export PS1=' \w `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\u\$ '
# Color
export PS1='\[$(tput setaf 5)\] \[$(tput setaf 6)\]\w\[$(tput sgr0)\] `git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\u\$\[$(tput sgr0)\] '
@lukebussey
lukebussey / gist:4a44ad5359c5826fbdd2
Created April 6, 2015 18:56
Set local repo email address
$ git config user.email "user@example.com"
@lukebussey
lukebussey / gist:a9681646535e6a8db0f5
Created April 6, 2015 19:52
Ignore changes to commited config files
$ echo "*.config">>.gitignore
$ git rm --cached "*.config"
$ git add .
$ git commit -m "Ignoring and deleting config files."
$ git push origin
@lukebussey
lukebussey / template.html
Created May 15, 2015 19:12
Minimal Marketo Template
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div class="mktoContent"></div>
</body>
</html>
# ----------------------------------------------------------------------
# | Trailing Slash Fix |
# ----------------------------------------------------------------------
# Fixes the issue where mod_dir would issue a full redirect with the
# incorrect hostname when missing a trailing slash on a directory.
DirectorySlash Off
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} -d