This file contains 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
* Reset (either normalize.css or Eric Meyer's reset.css) | |
* Bourbon | |
* Neat | |
* Variables | |
* Standard colors (go for $red instead of $error) | |
* Standard sizes | |
* Font stacks | |
* Standard media query parameters (named) | |
* Utilities/ |
This file contains 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
#!/bin/bash | |
# Generate your Dropbox token: https://www.dropbox.com/developers/apps | |
DROPBOX_TOKEN={dropbox access token here} | |
# Directory that holds your WordPress sites' root folders | |
PREFIX=/var/www | |
# If you have multiple folders with WordPress sites, add/remove them from this array | |
directories=( "foo.com" "bar.com" ) |
This file contains 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
# ---- DB Search-Replace and Backup Script ---- | |
# Note: This requires WP-CLI to be installed http://wp-cli.org/ | |
# | |
# This will generate new SQL file for import to new URL | |
# 1. Old DB - for Backup purpose (old URL): backup-yymm.sql | |
# 2. Replaced DB - ready for deploy (new URL): replaced-yymm.sql | |
# | |
# Replace aaa.com to bbb.com in the script below | |
# | |
# Note: Sometimes you need to change permission with |
This file contains 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
// Columns | |
$mobile-portrait-columns: 4; | |
$mobile-landscape-columns: 4; | |
$tablet-portrait-columns: 8; | |
$tablet-landscape-columns: 8; | |
$desktop-columns: 12; | |
// Portrait |
This file contains 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
// This fixes the WordPress admin-bar 28px overlap issue with Bootstrap 3. | |
body.admin-bar .navbar { | |
position:fixed; | |
top: 28px; | |
z-index: 1000; | |
height: 40px; | |
// If the above does not work try this if your nav is wrapped in .header |
This file contains 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
#!/bin/bash | |
# For this script to work, save it somewhere in the executable path, like /usr/local/sbin/backup.sh | |
# make it executable: chmod +x /usr/local/sbin/backup.sh | |
# then add it to cron: crontab -e | |
# and add the line below, which will run backup 3am each day, then upload to Dropbox | |
# 0 3 * * * /usr/local/sbin/backup.sh > /dev/null 2>&1 | |
# You also need WP CLI installed: http://wp-cli.org/ | |
This file contains 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
# wp-cli alias to push a local WP database to a staging site | |
pushstage() { | |
START=$(date +%s) | |
# make a backup of the current local database | |
# get current directory name, used for database and URL | |
current=${PWD##*/} | |
wp db export $current.sql | |
# rsync the local database to staging site | |
rsync $current.sql $current-s:~/ | |
# get the staging site URL for search replace |
This file contains 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
// Get height of window and set an offset from bottom | |
var winHeight = $(window).height(); | |
var offset = 50; | |
// Recalc height of window in case of resize | |
$(window).bind('resizeEnd', function() { | |
winHeight = $(window).height(); | |
}); | |
// When we scroll we do some checks... |
This file contains 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
#!/bin/bash | |
# Get the required project variables | |
printf "Project name: " | |
read PROJECT_NAME | |
printf "Project folder name: " | |
read PROJECT_FOLDER | |
printf "Database Name: " |
OlderNewer