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
<?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/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
#!/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/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
<?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
# 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
# Set php version through phpenv. 5.3, 5.4 and 5.5 available | |
phpenv local 5.4 | |
# == configure composer | |
composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN # configure env var in project settings! | |
# == install composer global dependencies | |
composer global require "phpunit/phpunit=4.3.*" | |
composer global require "phpunit/phpunit-selenium" | |
composer global require "phpunit/php-invoker" |
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 | |
# This script does backups to a remote server over ssh. the account running this script | |
# must have ssh access to the remote server using passwordless key authentication. | |
# perform: | |
# > ssh-keygen -q | |
# > ssh-copy-id [username]@[hostname] | |
# test with: `ssh [username]@[hostname]` & add script to cron | |
# > crontab -e | |
# #backup: every day @ 03:30 & log output. |
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
<span itemprop="review" itemscope itemtype="http://data-vocabulary.org/Review-aggregate"> | |
<span itemprop="rating" style="display:none;">4</span> | |
<span itemprop="count" style="display:none;">1</span> | |
</span> | |
<!-- SHOULD BECOME --> | |
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> | |
<span itemprop="ratingValue" style="display:none;">4</span> | |
<span itemprop="reviewCount" style="display:none;">1</span> |