Skip to content

Instantly share code, notes, and snippets.

@cornernote
cornernote / Dockerfile
Created April 11, 2017 15:22
test docker
FROM phundament/php-one:5.6-fpm-5.1.1
# Server packages
RUN apt-get update -y
RUN apt-get install php5-imagick -y
RUN rm -rf /var/lib/apt/lists/*
# PHP packages
RUN yes | pecl install memcache
RUN docker-php-ext-enable memcache
@cornernote
cornernote / README.md
Last active April 19, 2017 17:50
Docker Testing

Docker Testing

Head over to http://labs.play-with-docker.com/ and create a new instance.

Download an application definition

curl -Lo docker-compose.yml https://gist.githubusercontent.com/cornernote/850a48f6d361b3401ec4f293438f55c6/raw/c1169161191127bc9415bdc42203e7b640b21a48/docker-compose.yml

Run the application setup

<?php
namespace app\components;
class Git
{
public static function get($endpoint, $file)
{
if (strpos($endpoint, 'github.com')) {
$https = strtr($endpoint, [
# This file contains settings of skyblock that can be changed in
# minetest.conf
#
# By default, all the settings are commented and not functional.
# Uncomment settings by removing the preceding #.
# How far apart to set players start positions
#skyblock.start_gap = 32
# The Y position the spawn nodes will appear
-- remove flowing
minetest.register_abm({
nodenames = {'default:lava_flowing','default:water_flowing'},
interval = 1,
chance = 1,
action = function(pos, node)
if pos.y < skyblock.WORLD_BOTTOM then
minetest.env:remove_node(pos)
end
end,
<?php
class m150719_043333_audit extends \yii\db\Migration
{
public function safeUp()
{
$query = <<<SQL
CREATE SCHEMA audits
SQL;
$this->execute($query);
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
# private network (replace XXX)
root@test:/vagrant/git/yii2-audit# git push heroku master
Counting objects: 5, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 368 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Resolved composer.lock requirement for PHP to version 5.6.11.
<?php
namespace bedezign\yii2\audit\components;
use bedezign\yii2\audit\models\AuditTrail;
use yii\base\Component;
use yii\db\ActiveRecord;
/**
* Version
* @package bedezign\yii2\audit
<?php
namespace bedezign\yii2\audit\tests;
use app\models\Post;
use Codeception\Specify;
use yii\codeception\TestCase;
/**
* AuditTrailBehaviorTest