* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
# ~/.gitconfig | |
# Add this to your global git configuration file | |
# Change phpstorm to webstorm, if you use that. | |
# Diff and merge tool changes | |
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...` | |
[merge] | |
tool = phpstorm | |
[diff] | |
tool = phpstorm |
# Disable SELinux | |
echo 0 > /selinux/enforce | |
perl -pi -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config | |
# Install required packages | |
yum install pdksh compat-libstdc++-33 compat-libstdc++-33.i686 libaio libaio.i686 \ | |
pam-1.1.1-17.el6.x86_64 pam-1.1.1-17.el6.i686 nfs-utils openssh-clients \ | |
numactl | |
# Update Kernel Parameters (http://ibm.co/1czEKb4) |
func debounceChannel(interval time.Duration, output chan int) chan int { | |
input := make(chan int) | |
go func() { | |
var buffer int | |
var ok bool | |
// We do not start waiting for interval until called at least once | |
buffer, ok = <-input | |
// If channel closed exit, we could also close output |
#! /bin/bash | |
## Instant backup of a MySQL database with LVM snapshot | |
## Author: Godefroy de Compreignac (@Godefroy) | |
## License: Beerware | |
# Instructions: | |
# - MySQL Data on DB server must be an logical LVM partition | |
# - Backup server must have ssh root access to DB server | |
# - Master status is saved at the exact moment of snapshot to allow restoration of master-slave replication |
I've frequently been bit by failures restarting my vpn on my Mac. The connection may appear to start up in Shimo (the menu icon will change) but it looks like vpnc can't connect.
Looking at the log, we see the connection gets stuck
ERROR: can't send packet: Can't assign requested address
This has plagued me for a while, and my only fix has been to restart the machine. I hate restarting my machine. So I finally made time to dig in and find a better solution
/* | |
* Configure the Jenkins EC2 Plugin via Groovy Script | |
* EC2 Plugin URL: https://wiki.jenkins-ci.org/display/JENKINS/Amazon+EC2+Plugin | |
*/ | |
import hudson.model.* | |
import jenkins.model.* | |
import hudson.plugins.ec2.* | |
import com.amazonaws.services.ec2.model.InstanceType | |
// -*- mode: groovy -*- | |
// vim: set filetype=groovy : | |
node( 'some_node' ) { | |
stage( "Phase 1" ) { | |
sshagent( credentials: [ 'some_creds' ] ) { | |
checkout scm | |
def lastSuccessfulCommit = getLastSuccessfulCommit() | |
def currentCommit = commitHashForBuild( currentBuild.rawBuild ) | |
if (lastSuccessfulCommit) { |
[mysql] | |
host=localhost | |
socket=/var/run/mysqld/mysqld.sock | |
[client] | |
host=localhost | |
socket=/var/run/mysqld/mysqld.sock |