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
# Set php version through phpenv. 5.3, 5.4 and 5.5 available | |
phpenv local 5.4 | |
# == install pecl extensions | |
yes yes | pecl install imagick | |
# == prepare composer | |
composer config -g github-oauth.github.com "$GITHUB_ACCESS_TOKEN" #make sure this env var is configured in your project settings. otherwise remove this line. | |
# update phpunit | |
composer global remove "phpunit/phpunit" --update-with-dependencies |
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 | |
//option 1: via asset (NOTE: Create file: ./assets/form.js relative to view file) | |
$url = Yii::app()->assetManager->publish(__DIR__.'/assets/form.js'); | |
Yii::app()->clientScript->registerScriptFile($url); | |
//option 2: via php in view file | |
$script = <<<EOT | |
alert('hello world'); | |
EOT; |
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 | |
# This script does the following things | |
# - update apt respositories | |
# - Install: | |
# - nginx | |
# - memcaced | |
# - php5-fpm | |
# - php5-mysql | |
# - php5-curl |
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 | |
# | |
# This script performs the following tasks: | |
# | |
# - Update APT repositories | |
# - Install mysql-server | |
# - Change MySQL config: | |
# - listen on internal IP address instead of localhost only for external communication | |
# - TODO: update MySQL config to update performance | |
# - Create a MySQL user & database |
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 | |
echo "This script will install NewRelic Server Monitoring" | |
read -p "License Key:" NEWRELIC_LICENSE_KEY | |
echo deb http://apt.newrelic.com/debian/ newrelic non-free >> /etc/apt/sources.list.d/newrelic.list | |
wget -O- https://download.newrelic.com/548C16BF.gpg | apt-key add - | |
apt-get update | |
apt-get install newrelic-sysmond |
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 | |
// --- Settings | |
$login = ''; | |
$domainName = ''; | |
$subDomain = '@'; | |
$keyFile = 'transip.key'; | |
$publicIpApi = 'https://api.ipify.org'; |
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 | |
charlist=( "|" "/" "-" "\\" ) | |
i=0 | |
while [ TRUE ] | |
do | |
echo -en "Running mock process. Press CTRL+C to exit. ${charlist[i]} \r" | |
sleep 0.1 | |
((i++)) | |
if [ $i -gt 3 ] |
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
# Note: ~/.ssh/environment should not be used, as it | |
# already has a different purpose in SSH. | |
env=~/.ssh/agent.env | |
# Note: Don't bother checking SSH_AGENT_PID. It's not used | |
# by SSH itself, and it might even be incorrect | |
# (for example, when using agent-forwarding over SSH). | |
agent_is_running() { |
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 | |
# This script does the following things | |
# - update apt respositories | |
# - Install: | |
# - nginx | |
# - git | |
# - Create a GIT User | |
# - Set up GIT bare repo | |
# - Set up GIT working directories for nginx |