- Install Brew
brew install memcached
brew install libmemcached
- Grab a
memcached.so
file from here. Like this one for PHP 7.0.0. - Move the
memcached.so
file to:/Applications/MAMP/bin/php/php7.x.x/lib/php/extensions/no-debug-non-zts-200xxxxx
- Add the following to the end of the php.ini:
extension=memcached.so
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
# Choose your browser: | |
# Chrome | |
# tell application "Google Chrome" | |
# reload active tab of (get window 1) | |
# end tell | |
# | |
# # Safari | |
# tell application "Safari" | |
# tell window 1 |
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 | |
# Where should this file be stored? | |
ipfile=~/Desktop/external-ip.txt | |
# Go ahead now, go ahead and get that IP | |
IP=$(curl -s http://icanhazip.com) | |
# Has the address changed? If it has go ahead and write that bad boy down. If not, no worries. | |
OLDIP="" |
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 | |
APIKEY="From Here https://api.slack.com/custom-integrations/legacy-tokens" | |
trap onexit INT | |
function reset() { | |
echo 'Resetting status' | |
curl -s -d "payload=$json" "https://slack.com/api/users.profile.set?token="$APIKEY"&profile=%7B%22status_text%22%3A%22%22%2C%22status_emoji%22%3A%22%22%7D" > /dev/null | |
} |
wp db export nameoffile.sql
wp db import nameoffile.sql
wp export --dir=../wxr-exports --url=example.com
wp export --dir=~/wxr-exports --url=example.com --start_date=2015-08-01 --end_date=2015-09-18
for f in ~/path-to-xmls/*.xml; do wp import $f --url=example.com --authors=create; done
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 IP address from output file in Dropbox. | |
ip=`cat ~/Dropbox/HomeNetworkIP.txt` | |
# Establish SSH session | |
ssh $ip | |
# To connect: | |
# ./Dropbox/scripts/connect_to_home.sh |
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 | |
/** | |
* Add items to multidimensional array | |
*/ | |
function array_push_assoc( $array, $key, $value ){ | |
$array[$key] = $value; | |
return $array; | |
} |
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
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" /> |
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
<script> | |
$(document).ready(function() { | |
$('a[href]') | |
.filter(function(){ | |
return ($(this).attr('href').match(new RegExp('^https?|ftp'))); | |
}) | |
.filter(function(){ | |
return (! $(this).attr('href').match(new RegExp('^(https?|ftp):\/\/'+location.hostname))); | |
}) | |
.attr('target', '_blank'); |
NewerOlder