- 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
#!/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 | |
} |
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 |
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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
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