Skip to content

Instantly share code, notes, and snippets.

View peter-mcconnell's full-sized avatar
🏴

Peter McConnell peter-mcconnell

🏴
View GitHub Profile
@peter-mcconnell
peter-mcconnell / phpexec.sh
Created January 10, 2014 21:13
PHP increase exec time
#sudo vim /etc/php.ini
max_execution_time = 300
#sudo vim /etc/php-fpm.d/www.conf
request_terminate_timeout = 300
#sudo vim /etc/nginx/sites-available/default
@peter-mcconnell
peter-mcconnell / config
Created January 10, 2014 22:14
Elastic Beanstic
[global]
ApplicationName=whatevermyappnameis
DevToolsEndpoint=git.elasticbeanstalk.us-east-1.amazonaws.com
EnvironmentName=whatevermyenvnameis
Region=us-east-1
@peter-mcconnell
peter-mcconnell / crossdomain.xml
Created January 10, 2014 22:15
Cross Domain xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM " http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="app.mysite.com" secure="false" />
</cross-domain-policy>
@peter-mcconnell
peter-mcconnell / Vagrantfile
Last active January 2, 2016 21:29
PHP / FPM / MySQL / Apache shell install. Useful for quick vagrant builds
# -*- mode: ruby -*-
# vi: set ft=ruby :
# GLOBALS
IP="192.168.10.99"
DOMAIN="myapp.vagrant.local"
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.4.0"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@peter-mcconnell
peter-mcconnell / init.pp
Created January 10, 2014 22:28
Puppet - PHP5-FPM/NGINX Quick n simple
exec { 'apt-get update':
command => '/usr/bin/apt-get update',
}
package { 'nginx':
ensure => present,
require => Exec['apt-get update'],
}
package { 'php5-fpm':
@peter-mcconnell
peter-mcconnell / Vagrantfile
Created January 10, 2014 22:32
Vagrantfile with hostmanager and some provisioner syntax
# -*- mode: ruby -*-
# vi: set ft=ruby :
# GLOBALS
IP="192.168.10.01"
DOMAIN="my.domain.local"
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.4.0"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@peter-mcconnell
peter-mcconnell / sslcmds.sh
Created January 10, 2014 22:39
SSL common commands
# create CSR & key
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
# create CSR from existing key
openssl req -out CSR.csr -key privateKey.key -new
# remove passphrase
openssl rsa -in privateKey.pem -out newPrivateKey.pem
# check csr
@peter-mcconnell
peter-mcconnell / restartvirtualbox.sh
Created January 14, 2014 09:38
Restart virtualbox on mac
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
@peter-mcconnell
peter-mcconnell / mp3towav.sh
Created January 14, 2014 09:57
MP3 to WAV with FFMPEG
#rm *.wav
for f in *.mp3
do
mv "$f" "${f// /_}"
echo "Converting $f"
ffmpeg -i $f $f.wav
done
@peter-mcconnell
peter-mcconnell / Config
Created January 14, 2014 11:02
SSH Config file example
Host myhostname
HostName www.myhostname.com
User username
IdentityFile "~/.ssh/maikey.pem"
ServerAliveInterval 30
ServerAliveCountMax 120