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
SET @FROMDOMAIN = 'myolddomain.com'; | |
SET @TODOMAIN = 'mynewdomain.com'; | |
SET @FROMSCHEME = 'http'; | |
SET @TOSCHEME = 'http'; | |
#-------------- STANDARD TABLES -------------# | |
UPDATE wp_options |
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 | |
#------------------------------------------------------------------------------# | |
# CONFIGURATION | |
# You will need the following variables set in the git repository to deploy from: | |
# git config --bool receive.denyCurrentBranch false | |
# git config --bool core.bare false | |
# git config --path core.worktree [DEPLOYMENT_DIR] |
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
.rotate-ie(@degrees) { | |
-webkit-transform: rotate(@degrees); | |
-o-transform: rotate(@degrees); | |
transform: rotate(@degrees); | |
@cos: cos(@degrees); | |
@sin: sin(@degrees); | |
@nl: `"\n"`; // Newline |
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
var parseLatLng = (function() | |
{ | |
var matchLocDecimal = /^\s*(-?\d+)(\.\d+)?\s*°?\s*(N|S)?(,|\s)+(-?\d+)(\.\d+)?\s*°?\s*(E|W)?\s*$/; | |
var matchLocDegrees = /^\s*(-?\d+)°?\s*((\d+)(\.\d+)?'?)?\s*(N|S)?(,|\s)+(-?\d+)°?\s*((\d+)(\.\d+)?'?)?\s*(E|W)?\s*$/; | |
var matchLocCompass = /^\s*(-?\d+)°?\s*((\d+)('|\s)+)?\s*((\d+)(\.\d+)?(''|")?)?\s*(N|S)?(,|\s)+(-?\d+)°?\s*((\d+)('|\s)+)?\s*((\d+)(\.\d+)?(''|")?)?\s*(E|W)?\s*$/; | |
return function(val) | |
{ | |
var matches, | |
lat, lng, |
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
/** | |
* Prerequisites: | |
* element must be block-level & visible | |
* element must have height: 0 | |
* element must have overflow: hidden | |
* | |
* Returns true if the element was shown, false if it was hidden | |
*/ | |
function slideToggle(ul) | |
{ |
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/env bash | |
echo Setting up dev server | |
# Change these as you need: | |
declare HOSTNAME=my_host | |
declare DB_ROOT_PW=my_password | |
declare DB_NAME=my_dbname | |
declare NGINX_CONFIG=my_site | |
declare OPTIONAL_PACKAGES="sudo vim git" |
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
window.watchEvents = function() { | |
var eventIds = [ | |
'click', 'mousedown', 'mouseup', | |
'touch', 'touchstart', 'touchend', | |
'focus', 'focusin', 'focusout', 'blur', | |
'mouseover', 'mouseout', 'mousemove', 'mouseenter', 'mouseleave', 'mousewheel', | |
'keypress', 'keydown', 'keyup', | |
'change', | |
'scroll', 'resize', | |
'submit', 'reset', |
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
<?php | |
/** | |
* Recursively sort an array of taxonomy terms hierarchically. Child categories will be | |
* placed under a 'children' member of their parent term. | |
* | |
* @param Array $cats taxonomy term objects to sort | |
* @param Array $into result array to put them in | |
* @param integer $parentId the current parent ID to put them in | |
*/ | |
function sortHierarchicalTaxonomy(Array $cats, Array &$into, $parentId = 0) |
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
$('#publishing-action') | |
.find('.spinner').hide().end() | |
.find('#publish').removeClass('button-primary-disabled'); | |
$('#save-action') | |
.find('.spinner').hide().end() | |
.find('#save-post').removeClass('button-disabled'); |
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
(function($) { | |
var WATCH_FOCUS_ON = $(); | |
$.event.special['clickoutside'] = { | |
setup: function() | |
{ | |
WATCH_FOCUS_ON = WATCH_FOCUS_ON.add( this ); | |
// bind document handler if this is the first guy being bound |
OlderNewer