Skip to content

Instantly share code, notes, and snippets.

View alnutile's full-sized avatar

Alfred Nutile alnutile

View GitHub Profile
@alnutile
alnutile / composer.json
Created June 29, 2015 01:24
Starting Demo Composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"cviebrock/eloquent-sluggable": ">=3.0.0-beta"
@alnutile
alnutile / Plans.php
Last active September 20, 2017 14:21
Theme files
<?php
//app/Plans.php
namespace App;
class Plans {
public static $ONE_SHOW_A_MONTH = '1SHOW';
public static $TWO_SHOWS_A_MONTH = '2SHOWS';
public static $FAN = 'FAN';
<?php
/**
* @Then /^I fill in wysiwyg on field "([^"]*)" with "([^"]*)"$/
*/
public function iFillInWysiwygOnFieldWith($arg, $arg2)
{
$this->getSession()->executeScript("CKEDITOR.instances.$arg.setData(\"$arg2\");");
}
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
@alnutile
alnutile / ComparisonsTableSeeder.php
Created May 1, 2015 14:56
Events to listen to and steps
<?php
// Composer: "fzaninotto/faker": "v1.3.0"
use Approve\Comparisons\Comparison;
use Faker\Factory as Faker;
class ComparisonsTableSeeder extends BaseSeeder {
public $states = [
'Error',
@alnutile
alnutile / helper.php
Created April 28, 2015 00:16
Helper for an Iron worker v2
<?php
// see https://github.com/iron-io/iron_worker_ruby_ng/blob/master/lib/iron_worker_ng/code/runtime/php.rb
function getArgs($assoc = true) {
global $argv;
$args = array('task_id' => null, 'dir' => null, 'payload' => array(), 'config' => null);
foreach ($argv as $k => $v) {
@alnutile
alnutile / FeatureContext.php
Last active August 29, 2015 14:16
Version of Behat in Composer
<?php
use Behat\Behat\Context\ClosuredContextInterface,
Behat\Behat\Context\TranslatedContextInterface,
Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
Behat\Gherkin\Node\TableNode;
use Behat\Mink\Exception\ExpectationException;
{
"images_a": [
{
"path": "bundles\/mock-project-1\/requests\/mock-diff-request-1\/compares\/a\/002-APC660901-01_DUAVEEConsumerBrandedLaunchMobileSiteV3-000.jpg",
"dirname": "bundles\/mock-project-1\/requests\/mock-diff-request-1\/compares\/a",
"timestamp": 1423670773,
"size": "170916",
"type": "file",
"basename": "002-APC660901-01_DUAVEEConsumerBrandedLaunchMobileSiteV3-000.jpg",
"extension": "jpg",
<?php
function behat_editor_saucelabs_permission() {
$items['behat run saucelabs test'] = array(
'title' => t('Can run a Saucelabs a test'),
'description' => t('Can run a Saucelabs a test')
);
return $items;
}
@alnutile
alnutile / server.cnf
Created December 25, 2014 02:58
server conf for ssl and one domain
erver {
listen 80;
server_name kidcodeshare.io www.kidcodeshare.io;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 ssl;
server_name kidcodeshare.io www.kidcodeshare.io;
root /home/forge/default/public;