#Mac OS X
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
CURLOPT_NOTHING = 0; | |
CURLOPT_FILE = 10001; | |
CURLOPT_URL = 10002; | |
CURLOPT_PORT = 3; | |
CURLOPT_PROXY = 10004; | |
CURLOPT_USERPWD = 10005; | |
CURLOPT_PROXYUSERPWD = 10006; | |
CURLOPT_RANGE = 10007; | |
CURLOPT_INFILE = 10009; | |
CURLOPT_ERRORBUFFER = 10010; |
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
username: vagrant | |
password: vagrant | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client | |
sudo nano /etc/mysql/my.cnf |
This tutorial guides you through creating your first Vagrant project.
We start with a generic Ubuntu VM, and use the Chef provisioning tool to:
- install packages for vim, git
- create user accounts, as specified in included JSON config files
- install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository
Afterwards, we'll see how easy it is to package our newly provisioned VM
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
# Compile PCRE - Perl Compatible Regular Expressions | |
cd /usr/local/src | |
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz | |
tar -xvzf pcre-8.31.tar.gz | |
cd pcre-8.31 | |
./configure | |
make | |
sudo make install | |
# Compile Autoconf |
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 | |
/* | |
* example usage: $results = reset_role_WPSE_82378( 'subscriber' ); | |
* per add_role() (WordPress Codex), $results "Returns a WP_Role object | |
* on success, null if that role already exists." | |
* | |
* possible $role values: | |
* 'administrator' | |
* 'editor' | |
* 'author' |
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 | |
class custom_feed { | |
public $feed = 'custom-xml'; | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
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
$('area.ctools-use-modal, a.ctools-use-modal').each( function() { | |
var $this = $(this); | |
$this.unbind(); // Note the unbind: Otherwise there are multiple bind events which causes issues | |
$this.click(Drupal.CTools.Modal.clickAjaxLink); | |
// Create a drupal ajax object | |
var element_settings = {}; | |
if ($this.attr('href')) { | |
element_settings.url = $this.attr('href'); | |
element_settings.event = 'click'; | |
element_settings.progress = { |
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 | |
set -e | |
show_help() { | |
cat << EOF | |
Usage: ${0##*/} [-u USER] [-p PASS] [-P PORT] [-H HOST] [DATABASE] | |
${0##*/} -h | |
Open a standard connection in Sequel PRO. |
OlderNewer