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
mkdir my_app_cookbook | |
cd my_app_cookbook | |
git init | |
knife cookbook create my_app -o ./ |
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
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository ppa:businessoptics/packages | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-s3 |
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
list.subList(offset > activityItems.size() ? activityItems.size() : offset, limit > (offset + activityItems.size()) ? activityItems.size() : offset+limit); |
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 | |
# This script will install the dependencies needed for MicroArmy to be installed. | |
sudo apt-get install build-essential python-dev libevent-dev | |
sudo pip install -U eventlet paramiko boto pyyaml | |
git clone git://github.com/j2labs/microarmy.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
<?php | |
// Old (single argument) function call | |
global $wpdb; | |
$authorIDs = $wpdb->get_col($wpdb->prepare("SELECT post_author FROM " . $wpdb->posts . " WHERE ID = " . intval($postID) . " LIMIT 1"); | |
// New (two argument) function call | |
global $wpdb; | |
$authorIDs = $wpdb->get_col($wpdb->prepare("SELECT post_author FROM " . $wpdb->posts . " WHERE ID = " . intval($postID) . " LIMIT 1", 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
# Use the 'theirs' strategy option during a git merge | |
git merge -Xtheirs original/master |
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
# Go to the new repository | |
cd /path/to/new | |
# Add the original repository as a remote | |
git remote add original /path/to/old | |
# Get the original's branch and merge it into yours | |
git fetch original/master | |
git merge original/master |
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
DELETE FROM `wp_options` WHERE `option_name` LIKE '_transient_%' |
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
skyebookpro:Party skyebook$ rhc app restart -a MPCParty | |
Password: ************ | |
Problem reported from server. Response code was 500. | |
Re-run with -d for more information. | |
RESULT: | |
Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support. | |
skyebookpro:Party skyebook$ rhc app force-stop -a MPCParty |
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 | |
/** | |
* Remove expired transients from the wp_options table. | |
* This script cycles through a number of expired transients until it doesn't find anymore. | |
* Our wp_options tables has over 2 million stale entries at time of writing, this limiting is really needed | |
* @author Skye Book | |
*/ | |
$user = ""; | |
$pass = ""; |