Skip to content

Instantly share code, notes, and snippets.

View alnutile's full-sized avatar

Alfred Nutile alnutile

View GitHub Profile
@alnutile
alnutile / Authenticated.php
Created October 23, 2014 12:28
Quick auth for env = local or testing
<?php namespace App\Http\Middleware;
use AlfredNutileInc\QuickAuth\QuickAuthFacade;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Contracts\Routing\ResponseFactory;
class Authenticated implements Middleware {
@alnutile
alnutile / Kernel.php
Created October 23, 2014 10:30
Response with json on 500 errors file app/Http/Kernel.php
<?php namespace BehatEditor\Http;
use BehatEditor\Services\ResponseServices;
use Exception;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Response;
class Kernel extends HttpKernel {
var elixir = require('laravel-elixir');
/*
|----------------------------------------------------------------
| Have a Drink!
|----------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic
| Gulp tasks for your Laravel application. Elixir supports
| several common CSS, JavaScript and even testing tools!
@alnutile
alnutile / gulpfile.js
Last active August 29, 2015 14:07 — forked from acavanagh/gulpfile.js
//gulpfile.js
var gulp = require('gulp');
var beep = require('beepbeep');
var sys = require('sys');
var exec = require('child_process').exec;
var gutil = require('gulp-util');
var plumber = require('gulp-plumber');
var onError = function(err) {
beep([1000, 1000, 1000]);
@alnutile
alnutile / .env_boot.php
Created October 8, 2014 17:24
Setup boot environment file. Should be ignored in git as well.
<?php
return 'local';
$router->get('password/remind', [ 'uses' => 'Auth\RemindersController@getRemind', 'as' => 'auth.remind']);
$router->get('password/reset', [ 'uses' => 'Auth\RemindersController@getReset', 'as' => 'auth.remind.post']);
$router->post('password/remind', [ 'uses' => 'Auth\RemindersController@postRemind', 'as' => 'auth.reset']);
$router->post('password/reset', [ 'uses' => 'Auth\RemindersController@postReset', 'as' => 'auth.reset.post']);
$router->get('auth/login', ['uses' => 'Auth\AuthController@getLogin', 'as' => 'auth.login']);
$router->post('auth/login', ['uses' => 'Auth\AuthController@postLogin', 'as' => 'auth.login.post']);
$router->get('auth/logout', ['uses' => 'Auth\AuthController@getLogout', 'as' => 'auth.logout.get']);
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/alfred-nutile-inc/digitalpfizer-client"
}
],
"require": {
"alfred-nutile-inc/digitalpfizer-client": "0.0.1"
},
--------------------------------------------------------------------------------
RESTful Web Services for Drupal (restws)
--------------------------------------------------------------------------------
Maintainers:
* Wolfgang Ziegler (fago), [email protected]
* Klaus Purer (klausi), [email protected]
Exposes Drupal resources (e.g. entities) as RESTful web services. The module
<?php
/*
|--------------------------------------------------------------------------
| Detect The Application Environment
|--------------------------------------------------------------------------
|
| Laravel takes a dead simple approach to your application environments
| so you can just specify a machine name for the host that matches a
| given environment, then we will automatically detect it for you.
function behat_editor_saucelabs_behat_editor_yml_array_alter(&$behat_yml, $context1, $settings) {
if( $context1 == 'generate_yml' ) {
//@TODO clean up this double if statement just may need to rethink the best way to alter this proecess
if ( isset($settings['context']) && ( $settings['context'] == 'behat_run_saucelabs' || $settings['context'] == 'behat_run_batch') ) {
/**
* needed to set some things for these but not android
*/
$mobile_devices = array('iPad', 'iPhone', 'ipad', 'iphone', 'iPad|landscape', 'iPhone|landscape');
if(variable_get('behat_debug_mode') == 1) {