Skip to content

Instantly share code, notes, and snippets.

@caseyw
caseyw / PhpStorm - PHP Getter Method Config Template
Created June 9, 2014 15:29
PhpStorm - PHP Getter Method Config Template
/**
* @TODO Comment this!
*
#if (${TYPE_HINT} == "int")
* @return integer
#else
* @return ${TYPE_HINT}
#end
*/
#if (${TYPE_HINT} == "boolean")
@caseyw
caseyw / PhpStorm - PHP Setter Method Config Template
Created June 9, 2014 15:30
PhpStorm - PHP Setter Method Config Template
/**
* @TODO Comment this!
*
#if (${TYPE_HINT} == "int")
* @param integer $${PARAM_NAME}
#else
* @param ${TYPE_HINT} $${PARAM_NAME}
#end
*
#if (${STATIC} == "static")
@caseyw
caseyw / Rotate MySQL RDS Logs
Created June 30, 2014 13:35
Rotate MySQL RDS Logs
Rotate MySQL RDS Logs
PROMPT> CALL mysql.rds_rotate_slow_log;
PROMPT> CALL mysql.rds_rotate_general_log;
@caseyw
caseyw / Find a column in a database
Created July 5, 2014 14:40
Find a column in a database
Find a column in a database
SELECT TABLE_NAME, COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE column_name LIKE 'partnerId'
xdebug.default_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_connect_back = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_port = 9000
xdebug.idekey = "PHPSTORM"
Vagrant Issues
Issue
'vagrant up' command fails when trying to launch a Vagrant environment. The error that is output is:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Reset Root Mysql on Ubuntu
sudo dpkg-reconfigure mysql-server-5.1
// Find the third td of each tr and see if the IP starts with X, if so lets check the box for removal
$("table.ACCtable2 tr td:nth-child(3)").each(function() {
$ipNode = $(this);
if ($ipNode.text().indexOf(' XXX.XXX.XXX.') >= 0) {
$ipNode.prev().prev().children('input').prop('checked', true);
}
});
# Aliases
alias vup="vagrant up"
alias vh="vagrant halt"
alias vs="vagrant suspend"
alias vr="vagrant resume"
alias vrl="vagrant reload"
alias vssh="vagrant ssh"
alias vst="vagrant status"
alias vp="vagrant provision"
alias vdstr="vagrant destroy"
@caseyw
caseyw / vagrant_error
Created August 25, 2014 13:11
Vagrant Error
Error:
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:
mount -t vboxsf -o uid=`id -u root`,gid=`getent group vagrant | cut -d: -f3` tmp_vagrant-puppet-3_manifests /tmp/vagrant-puppet-3/manifests
mount -t vboxsf -o uid=`id -u root`,gid=`id -g vagrant` tmp_vagrant-puppet-3_manifests /tmp/vagrant-puppet-3/manifests