A Pen by Evan Lovely on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Evan Lovely | |
# Syncs the database and files from the live production site to here. Run it anywhere with `sh sync--prod->stage.sh` | |
# Needs to be an absolute path | |
LOCAL_PATH="" | |
SSH="[email protected]" | |
DB_USER="" | |
DB_PASS="" | |
DB="" | |
REMOTE_PATH="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$aliases['prod'] = array( | |
'root' => '', | |
'uri' => '', | |
'remote-user' => '', | |
'remote-host' => '', | |
'ssh-options' => '-o PasswordAuthentication=yes', | |
'path-aliases' => array( | |
'%files' => 'sites/default/files', | |
), | |
'databases' => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make elements align in a grid, regardless of height | |
// Apply to elements you want as grid items | |
// $cols = how many columns you want | |
// $margin-right = margin-right, should be in percent | |
// $ie8-height = an explicit height for all the elements, "off" by default, only applied to IE | |
@mixin gridify($cols, $margin-right: 5%, $ie8-height: auto) { | |
// Math for widths, margins, and clears | |
$width: (100% / $cols) - $margin-right + ($margin-right / $cols); | |
$ie-width: (100% / $cols) - $margin-right; | |
$clearnum: $cols + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# search bash aliases | |
sba() { | |
cat ~/.bash_aliases | grep -i -A 1 "^#.*$*" | |
cat ~/.bash_aliases | grep -i -B 1 "^alias.*$*" | |
cat ~/.bash_functions | grep -i -A 1 "^#.*$*" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Play sound Basso upon error | |
on_stylesheet_error do | |
system('afplay /System/Library/Sounds/Basso.aiff') | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Convert a Markdown README to HTML with Github Flavored Markdown | |
# Github and Pygments styles are included in the output | |
# | |
# Requirements: json gem (`gem install json`) | |
# | |
# Input: STDIN or filename | |
# Output: STDOUT | |
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file | |
# cat README.md | flavor > README.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="checkbox"><br /> | |
<input type="checkbox" checked="true"> | |
<hr /> | |
<input type="radio" name="radio"><br /> | |
<input type="radio" name="radio" checked="true> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.form-type-checkbox { | |
padding-left: 18px; | |
padding-right: 2px; | |
position: relative; | |
>input { | |
position: absolute; | |
left: 0; | |
top: 4px; | |
top: 0\9; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
key down command | |
keystroke tab | |
key up command | |
end tell |