Blog & Stuff


Meetings and Cross TimeZone Teams

Wrote and article https://medium.com/@alnutile/meetings-and-cross-timezone-teams-c9b833c43bfb on trying to

Dusk and Homestead

Working on learning Dusk and really excited to get going with it. But running it in homestead proved to be a bit tricky.

Simple Slack Trait Get Request and return Response

In this example I get a message from Slack (but this can be any message) and then send results back to Slack. One thing to keep in mind you really want to get your code working out side of

We Code in the Context of our Quoting

This article can be listened too here or in your favorite podcast player Whether you are working Waterfall, or Agile we still need to quote out

Instantiate Request for Testing

When I need to make a request for a test in which the Class is expecting a \Illuminate\Http\Request I can do this for a file based or non file based request.

Load Testing With Behat

The team I am a part of write our tests using Behat for the most part as we try to practice BDD and take advantage of how writing in Gherkin can lead our code to be more inline with the language of

Example Job Format for Queue

Sometimes I just need this info to remind myself what a job looks like in a queue and how to mock it etc. In this case I have a simple class that will be used to dispatch the job.

LarScanner simple foundation for building a good Laravel Security Scanner

Just the start to a new library that I hope others will help out on https://github.com/alfred-nutile-inc/larscanner There is a

Super Simple Sending Messages to Slack from Laravel

Laravel 5.3 has this feature. But for those not using that version or who just want to see how easy this is, I will show here how I been doing this for some time now. Here is the main Class

Pusher and PHP "Error Failed to connect to Pusher"

Note to self. Getting this error "Error Failed to connect to Pusher" but the front end is working. And you know your credentials are correct, AND it was working just a day ago check the date and ti

Model Boot Events

Just a quick not to modify model data upon an event. Laravel docs talk about it here But putting it in another class can get kinda

Queue onConnection

If you look here https://laravel.com/docs/5.3/queues#customizing-the-queue-and-connection Under "Dispa

Guzzle 5 or 6 or ????

Sometimes Guzzle can be a real pain to use in an library. You choose 5.x and then some other library needed 6.x and heck you really did not care either way. One interesting package example

Chrome update equals Behat Fail

Had trouble running behat after I ran updates on Chrome My typical install https://www.npmjs.com/package/selenium-standalone

Laravel and Casting "JSON_UNESCAPED_UNICODE" Data

Had a interesting issue with Laravel and the cast feature Basically a Chinese set of characters would be converted to their unic

Laravel 5.x Cookbook Chat Area

Topics Events Questions ComicClientInterface But there is

Throttle Password Reset

Laravel Throttle works on failed auth attempts but how about password resets? Here is what I made my app/Http/Controllers/Auth/PasswordController.php look like 5.3

Laravel Throttle Feature using IP address as Key

NOTE: 5.3, for 5.2 see ending update The Laravel Throttle feature here is a great addition to the

Troubleshooting a Failed Build with Codeship and SauceLabs

In this article, I will continue where I left off with my previous post, Laravel and Behat Using Selenium and Headless Chrome, and explain what you can do when troubleshooting a failed build.

Amazon Machine Learning

This is mostly a note2self. Amazon Machine learning is one way to dig into things. For me it mean not getting bogged down in Python or tons of formulas for now. Basically I watched

Mockery Behat and Laravel

This is a quick view of using this library https://github.com/laracasts/Behat-Laravel-Extension and a Mockery Trait (should be inc

Adding Basic Auth to Forge

make the username and password http://www.htaccesstools.com/htpasswd-generator/ admin:$a

Uploading Images in Behat both at Domain Level and UI Level

The goal here is as follows @fileCleanup @javascript Scenario: Uploading File Given I already made a Segmentation and am editing it Then I a

Behat Laravel Domain Testing Inside Out

I will cover the use of FormRequest, Mockery,

Keeping a Controller Method Simple

When I am done with a controller, done mocking up ideas and ready for some long term code, then I think this is the most information a Controller method should have.

Example of Mixing it up Behat BDD and PHPUnit

Just wanted to show two things here. One is how sometimes I end up in PHPUnit to work out some ideas. And two how awesome it is to refactor thanks to PHPUnit. In this example I had a Class

Homestead and Auto Setup Hosts File

I discovered this Vagrant Plugin https://github.com/cogitatio/vagrant-hostsupdater thanks to

API Token Based Access Laravel 5.1 (Yet another article on this)

API Token Laravel 5.2 introduces the auth token guard setup which is way simpler than Oauth. Also it does not assume a certain level of complexity in needs like Scopes and expirations of

Contract Testing

Sometimes we need to make sure external APIs have not changed. Some of those we have control over some of those we do not. Either way we can run tests daily, weekly or as needed, outside of

Getting Going Quickly Windows, Behat and Selenium

Quick Install Steps Vagrant and Homestead This was easy I just followed these steps here

AWS, S3 Storage and limited Visibility

Storing files on S3 is great. And many times those files are private so I only want to give temporary access to them. Using Laravel Storage I can interact with the file-system quite easily and seam

Behat and Uploading Files to a Form Even on Remote Selenium2 Servers

Just had to tackle this issue so making some notes for later here :) Updated and more detailed here I run selenium

Laravel, PHPUnit, Require_Once on Routes

Going crazy running PHPUnit all and getting fail but you run the one route and it works! The difference is require versus require_once in PHPUnit tests. Fo

Remote Behat Testing with Laravel

Listen Here

CMS or NOT CMS

This video just shows and example of a NOT CMS we built for a client. Sure they can add content and manage it BUT they did not need all the extra features that come with Wordpress or Drupal like wo

Feature Flags In Laravel

Overview Listen here Watch https://youtu.be/4nq7FyHQj8I

Install Webdriver to get testing with Behat and Javascript

This is so I do not forget! UPDATED: go here instead https://www.npmjs.com/package/selenium-standalone

Slack Custom Commands and Laravel to Make an American to British Translater

Laravel or anything you are comfortable with making a Route and Response will work fine really.

Then Benefits of Building a Clickable POC as a Developer

Listen here

Put It All Into Version Control Even Composer!

Update: September 06 2016 We stopped doing this. I do not think it is a bad idea but we ended up going with CodeDeploy on AWS. So after our CI does a Composer install and a

Why Side Projects are Good For Me

You can Listen here! First let me define what a “Side Project” is. In this case a “Side Project” is something you are no

Do I Really Need This Route Anymore?

Clean out old code can be hard. When your application has numerous javascript widgets, blade templates and forms you can not easily say what routes are being used. But with just a few artisan comma

Logout User After Inactivity Laravel and Milddleware

Original Post http://laravel-tricks.com/tricks/session-timeout-for-logged-in-user This Mid

CentOS or RedHat and Laravel

Got Ideas from here An A

Quick Tip Forcing More Complex Passwords in Laravel

With the great Laravel Docs I will quickly show how to "encourage" the user to set a better password. Going through the standard docs fo

Image Uploads, Laravel, Angular and Flow.js

Here is one combination out of many to make this happen. The libraries are https://github.com/flowjs/ng-flow and

Simple Example of Making Code Easier to Read

Just a quick example Before public function updateMarketoFolder($folder) { /** * If parent id found in array then use it els

Spark Setup Issue

During the install https://github.com/laravel/spark I kept getting this error Problem 1 - Installation req

Adding Expose IDS to Laravel MiddleWare

The library is https://github.com/enygma/expose "Expose is an Intrusion Detection System for PHP loosely based on the PHPIDS project (and using it's ruleset for detecting pot

Note To Self: A VirtualBox machine with the name 'homestead' already exists.

Since I know this will happen again I want to remind myself and others how to fix it. I had this error A VirtualBox machine with the name 'homestead' already exists. when doing

Laravel and Angular Widgets e.g. Non SPA (Single Page Application) Pattern

Not all apps need to be an SPA (Single Page Application). Sure they have their place but in most cases the task might benefit from just a Blade template and Angular widget. This saves you from havi

Laravel 5.1 and Oauth

Laravel 5.1 and Oauth2 Server Video coming soon... Example repo is here https://github.com/alnutile/oauth_how_to The

Talking to the Methods Not the Properties

Just a team related style guide item. When talking to properties in a class talk via a getter. <?php class Foo { protected $client; function

Using your project docs inside the application

The applications I work on have markdown docs. These can be in the docs/ folder for example as docs/webhooks.md But some of these docs have value to the user of the UI not just

Behat for Product Owners

As a developer putting all the business requirements into action and then showing that it is working as expected can be hard. 10 different google docs, 3 different views of what are the goals etc.

HasMany Through a Many to Many

This thread helped a lot http://laravel.io/forum/03-04-2014-hasmanythrough-with-many-to-many In the end I h

Adding RSS to Your Site

Using this library https://packagist.org/packages/thujohn/rss We simply install but using a forked version so it works with L5

Bower and Elixir

Trying to make this workflow more easy. Right now it seems that since bower ends up putting all assets into bower_components (css and js) and elixir wants assets by default in resources/assets/css

Quick way to Request Json from Angular and return from Laravel

I simply want to make sure to return json from my app more easily even on errors. So in Angular I set my app.js as such (function(){ 'use strict'; an

Laravel 5.1 Behat and Codeship

The new integration testing features with Laravel 5.1 make Behat almost not needed BUT we do a lot of AngularJs work and instead of using karma to test the ui we enjoy using behat since we like the

Conventions to Help Minimize your ENV File

UPDATE I think we can also do AWS_BUCKET=foo_$APP_ENV directly in the env file, see

Start to end Billing using Stripe, Cashier and Laravel 5.1

Start to end Billing and Laravel As usual the Laravel docs rock but sometimes it is nice to see this from start to end. With that said read those

Codeship and Laravel for Continuous Integration

Getting going on Codeship and Laravel is pretty easy. Once you setup codeship to work with your github account just pull in your repo and set your Testing scripts as follows. (they have a u

Logging in Iron.io Workers

Previously I wrote about how to use Lumen and Iron.io this adds to that by modifying the logging technique. As noted the worker is basicall

Writing Commands and Scheduling in Laravel 5.1

Wow, writing Artisan Commands just become even easier. And plugging it into

Easily Create Fixture Data from Remote Services and Refresh Mock Data

Oops Codeship and Laravel is here Easily Create Fixture Data from Remote Services and Refresh Mock Data We have integration te

Adding Cache to your Laravel Site

Using Laravel's built in Cache facade is super easy. I will quickly cover how to use it for showing your Posts and showing a Post. Example 1 Show a Post This example will first ch

Iron.io and Lumen

Lumen Iron Worker What and why A worker is a great way to run tasks as needed taking the load off your applications server and greatly speeding up the process of a task as you c

Quick way to mock data for Behat in Laravel

Below allows me to use this type of step in my tests Scenario: Given I update a Domain get 200 Given I mock "App\Sites\Domain" with properties:

Code for making a Shortcut tool for your App

This allows the user to easily make shortcuts to urls they are on and give them names.

Using Faker and ENV vars with Behat

UPDATED April 01 2015 Realized I needed more "tokens" and I was already using my .env file for info for Seeding and for our different servers. So the Trait now pulls those

Using a BurnDown Chart to Pace Yourself

A sprint starts and you feel unsure or overly sure of being able to complete all the work in that sprint. And depending on that you crank at the start working long hours in stress of not getting do

Behat and PhantomJs

Using PhantomJS both with Selenium and in replace of Selenium With Selenium Here is my example behat profile for this one phantom_via_sele

PHP Error: Maximum function nesting level of '100' reached, aborting Behat

This started to happen on Codeship and local for me and other developers. Though one developer had a higher setting for max nesting as noted

Iron.io Laravel and Workers, Microservices

We are starting to use Iron.io and their workers for a lot of the tasks that our apps need to do. For example one app needs to scan websites for images and text and report on them. In our case that

Multi Domain Nginx Redirect

http://wordpress.stackexchange.com/questions/106445/multisite-redirect-loop-for-a-singl

Sending Dates to Angular from Laravel

This might not be ideal but so far it allows me to more easily sort dates and filter dates in Angular. From the Laravel model I add these two methods

Dealing with Oauth2 Server and Laravel for both a local app login and for remote apps using Lucadegasperi/oauth2-server-laravel

This is all based around this library https://github.com/lucadegasperi/oauth2-server-laravel I am building and API to be

Simple Look at Laravel Events

Events Getting Started This is part of a larger Laravel Guide I am working on in this case the examp

Laravel-Flysystem and Creating Time Limited Public Urls on S3

We needed to offer timed links to the urls and we are using Laravel-Flysystem A

Laravel Behat and Selenium

Laracasts has some great videos and libraries for Laravel 5 and Behat integration. Examples https://github.com/laracas

Linux, Behat and installing ChromeDriver

Setting up Chrome driver with Behat and Selenium2 Side note for Mac brew install chromedriver ChromeDriver Once yo

Sqlite and Laravel

It is really really nice to use this for testing and local since any reseed work is quick. Overall the swap out is easy and I do not think, so far, there has been any issues going to mysql

Timing PHPUnit Tests

Maybe there is a better way to do this? But using this article https://fatalfailure.wordpress.com/2011/08/

Reusable UI/API CRUD Laravel and Angular

related repo Working on a recent project it finally hit me how repetitive then need was to make a Resource at the API level and to

Laravel Blade and Angular brackets

I use one AngularController.php to render main.blade.php file that then renders angular. The only other blade file is the login page. I could have done this in the routes.php file but since the rou

Angular History Based BreadCrumbs

Originally I was going to go with one of the more well known packages but then I realized I wanted to show the history of the users states not the children of the state they are on. For example whe

Embed Template Data in View (Angular, Laravel)

Sometimes, when your frontend shares the same view rendering of the backend, you can store data in the window object. This can save you queries to the backend when, for example, Profile Data that s

Quick fixture data and mocking external APIs

We are using a number of external APIs on a project (Pusher, Iron.io, Github, Saucelabs etc). Github is key as we are using it to store and retrieve files from for editing on the site. When running

Mocking Queue Service for faster Behat Testing

As I wrote about here I am using behat to tests our APIs. I could have used Laravel's guzzle and phpunit integration to test the controller

Redirecting back to original Angular.js destination from Laravel Auth

UPDATE You can see in the comments some updated info. When a user visits an Angular url (no

Docker, MailCatcher and Laravel

I wrote an article on Mailcatcher and Homestead here but as I move into docker I wanted the same setup for my docker website container which was

PHP quick fixture data for phpunit testing

You can use VCR or other libraries to make fixture data. But sometimes you can just make the request and save the results using this technique. From then on you mock and return the data. G

Nginx force SSL

Need to quickly setup ssl and default to that for our sites. This artic

Moving Forge Deploy Script to Envoy

As we start to move off of Forge I still want the automation to take place after all tests pass. In Codeship or Locally I just follow some instructions from here

Laravel and Angular Time/Date Display

Angular seems to, by default, easily deal with milliseconds, https://docs.angularjs.org/api/ng/filter/date. Laravel outputs creat

Laravel 4.2 and Dotenv to set environment

To start using Dotenv now it is very simple. One include the library #composer.js "require": { "laravel/framework": "4.2.*",

Speeding up PHPunit tests and Behat in Laravel for Database refreshes

This article covers some good tips on this. Ideally you do not hit the database in unit tests but sometimes y

Angular Pusher Factory to Centralize Code (also using Laravel to set constants and properties)

This will cover Making an Angular factory to centralize Pusher setup in Angular Passing settings form Laravel to Angular (though could be just Angular and a .env file as well

CSRF Tokens and Angular.js

This is key to preventing Cross-site request forgery. Basically you log in and do some work on one site, then go to a malicious

Temporary Auth Updates L5

Auth updates First make sure your composer update has the latest Laravel and check that there are not relevant fixes already via laravel/docs master laravel/framework master or laravel/la

Chrome and Behat

Getting Chrome run was "easy" thanks to this post My install has behat running inside of a vagrant box so my behat.ym

Design Guide - Controllers, Services and IOC

Design Guides Controllers - contains application logic and passing user input data to service Services - The middleware between controller and repository. Gather data from

Multi Threaded Queue Processing

I needed a way to run a bunch of jobs in parallel and I am use to using the Symfony Process Component for that. So this post will show how I did this in Laravel 4.3 via the Queue so I can r

Team Style Guides and Mind Set

Been sharing this info with team members a bit lately and want to post it here for reference. Though there is no ONE way to do any of this there are ways that scale better than others. But more imp

Sorting related models in Laravel

There are a number of related models to this one model that I store in the Models $relations property protected static $relations = [ 'owner',

Behat for testing RESTful APIs

The code for behat's FeatureContext comes from this repo and book https://github.com/philsturgeon/build-apis-you-wont-hate

Boris REPL and you Applicatoin (Silex in this case)

This video will cover the details http://youtu.be/RHdxSsCDmNQ

SSL and Homestead

This is like most nginx the only trick was adding the port forward on Homestead #scripts/homestead.rb # Configure Port Forwarding To The Box config.vm

Drush and Homestead Vagrant Box

Had some trouble doing the normal composer install so I went with the manual install noted here https://github.com/drush-ops/drush Basically I downloaded and unzipped the repo to /usr/local

Polymorphic relationship Laravel

This example will show a typical "Attachment" need. The Laravel docs really do cover alot as seen here especially "Polym

Quick way to traverse a nested php arrray

The RecursiveIteratorIterator makes it super easy to traverse a nested array. Here is an example though the docs a

Using VCR for PHP API Testing

Testing that your code works against an API can take up lots of un-needed time. With this php-vcr library you can do ONE real request that saves a f

Saucelabs PHP Client

It is built off of the php-github-api client seen here by KnpLabs . They made a really nice client that uses Guzzle and an AbstractionAPI to

Many to Many Polymorphic Relations from Laravel to Angular and back

This will cover having a polymorphic relationship in Laravel, showing it on a form in Angular and saving it back to Laravel. Overall it is well documented

Laravel Sentry and UUID

Update October 10 10:07 Have hit a few issues with this model but still working okay. To start this trait does some of the work to manage incoming POST data.

Laravel Homestead and MailCatcher

Using MailCatcher http://mailcatcher.me/ I can see the emails sent by the website. First checkout https://github.com/fideloper/Vaprobash/pull/348 to get your box ready All I did was

Laravel Homestead and Beanstalkd Console

I am doing some queue work and wanted beanstalkd console installed so I can see the status of the queue

Restangular and nested responses

this was key to dealing with this type of results

Behat Test more than number of elements

There is a Mink step to check for the number of elements //MinkDictionary.php /** * Checks, that (?P<num>\d+) CSS elements exist on the page

When you have to use Angular inside of Drupal

The angularjs module for drupal will direct you to setup a menu path for Angular.js to get it's template files. So the Angular route would look like this

Transforming Output from the Database to the View/REST layer

Having watched the screen cast here by Jeffery Way and reading Phil Sturgeon's

Showing nested relationships details

This is soooo easy but this is always something this easy can be missed. In this example we have a Property Model with Buildings that have an address. So the model files look like this

Simple Laravel CMS Example

Quick intro to Laravel using a custom CMS app I made The repo is here

Quick Gulp file to run php-unit tests

MUCH BETTER WAY HERE This is setup for Laravel but can work for any app. Most of this is due to the great

Laravel and non email authentication

Note to self. The Laravel docs are here that cover Authentication. But when it came time to use a filter and a non email based user name I had to modify the auth.basic filter, or any filter you wan

Using Beanstalkd to Schedule the release of a post in Laravel

Phase 1 of my master plan is to regularly write more posts on misc web and coding in general related topics. And sometimes I can sit and write a few of them but it would be best not to release them

Behat Seed Repo

The aim of this repo is to make it super easy to get going with behat. All you will need to get outside of this repo is Selenium Jar file download Composer Saucelabs

Using Dot Env files to manage settings

Wow. Included in Laravel http://laravel.com/docs/configuration#protecting-sensitive-configuration removed due to old news

Using Scopes in Laravel

I have about 4 models that all share 2 common queries. I want all of them that are "Published" and or Ordered by a field called Order. This does help with some

Quick way to add text to a hidden ckeditor field

Since I am not testing ckeditor this is a way to get text into a sometimes required field. //FeaturesContext.php /** * @Then /^I fill in wysiwyg on f

Github CLI to get Teams and Members of an Org

Needed to make a quick library for pulling down this info and making it a CSV file. The libraries made this super easy. But it was hard to get all the emails since these can only been seen

Mink Assertions

Just a reminder this file as a good list of steps I can use. (will post more here shortly) Mink 1.3 [behat/mink-extension/src/Behat/MinkExtension/Co

Drupal and Composer install or update

Using composer and drupal, even d7, is great. But an update or install can leave you with a broken drupal registry. So here is a workflow that is pretty bullet proof. In this exampl

Adding Column using sqlite caused error "Cannot add a NOT NULL column with default value NULL"

After the security update I had to add a remember_token to my user table. security update Since I am using sqllit

php artisan migrate:reset not working

This was an issue for me using sqlite. There was a simple fix noted in the irclogs of Laravel! So under

Angular and Scope - or - How not to waste time figuring out why a scope value is not "working"

The creator of Angular notes it in this video which is well worth the watch. Basicall

Behat Checkbox

Just a reminder to check if a checkbox is checked or not. Feature: Behat bug Scenario: Given I am on "/bug.html" When I check "foo" Then the "f

Adding Markdown Editor to your Blog/CMS

In this case it is Laravel but any PHP framework could use this. Get the Library I used the dflydev-markdown library whic

Ng-if and Scope

Scratched my head on this one for a few. Inside of ng-if is a new scope. So a model on $scope.modelName will have to be referenced as $parent.modelName in the view.

Running multiple tasks asynchronously with Drush, Drupal and MT

I will not even try to write about this but instead share the most well written technical page I have read in a long time 

Angular.js, CKEditor, and REST including file uploads

I wanted to share the steps I followed to get this WYSIWYG editor working with Angular and to allow uploads. By the end of it you will see how to Plug CKeditor into your Angular app

Saucelabs Timeout

There are two settings I add to my yml file to prevent a timeout, command-timeout and max-duration.

Building the UI first with Angular, Mocked Data and REST

Lately I have had a few projects using a RESTful backend to output JSON formatted data and a javascript front end. All of them are different technologies but the f

Angular Watching a model and it's filters

I had to update other items on the page including an CSV export as the user made filter changes on the site. I had to pass the results of ng-repeat into a model and then the filters as se

Behat Resources

I've been working on behat related work for some time now and here is a list of things I would like to centralize and share Vagrant install of behat and behatEditor

Angular Seed Testing Setup

This took a few settings to get it working. For one I put the correct paths in for karma and webdriver I the

Angular Drupal and CSRF

quick tip on getting and setting your token for drupal when doing a put, post, destroy against a drupal site.  Mostly gotten from

Mocking drupal database queries

formatting issue will update the code examples soon I have a Class I want to test with phpunit but it makes several queries to a drupal database.

CORS and Laravel

When doing some API work using Laravel as the REST server I was getting a common error "No 'Access-Control-Allow-Origin' header is present on the requested resource." which happen

Behat Vagrant install and local testing

Setting up Vagrant for Behat ol.lst-kix_xa82982e1krb-7.start{counter-reset:lst-ctn-kix_xa82982e1krb-7 0}.lst-kix_xa82982e1krb-4>li

Twig and Drupal 7

This will show how to use Twig in your D7 module Setup your composer.json to pull in twig.

Angular and Laravel Partials

Blade uses {{ }} so it does not play well with Angular.js but I decided to use partials. I am not using Angular routes so I am just including partials in my controller file. My blade fil

Using Github Pages for your help docs

Really impressed with how this came out. Using Github pages with no theme we can use that repo to then pull in our help files to our local project via a JSON request. This separates docum

GitWrapper Per Page settings KnpLabs / php-github-api

I need to stash more of these here as I use this API more   Per Page Setting &Acir

Guard, Laravel and phpunit

If you already have rvm install this should be easy. Otherwise google that pain. I set my rvm to ruby 2.0 but not sure if needed rvm --default use 2.0

Drupal Services and Instantiating a Class

Been using Drupal Services on a project and there are some docs on how to use a Class with this. But to instantiate it I was using a function per class method. Instead I now I have one function tha

Laravel Project Management Site

Still has some work to be done for sure.  https://github.com/alnutile/pml4

Exploring Code and Laravel

One thing I really enjoy about any of Jeffrey Way's books or videos is how he emphasizes exploring code.   Laravel does have

Nesting Laravel 4 Routes

Make sure your route file is set to show this For my example is is projects and they have issues So my route looks like this #routes.php Route

Using headless tests with Mink and Behat

Took a bit to find the right setting. The yml file should look like default:   paths:     features: 'features'   e

Node.js error

"failed to fetch from registry" But it was json endpoint was at that url so it was not a problem with the endpoint. http://stackoverflow.com/questions/12913141/install

Behat and bad HTML

Some of the sites we are testing have HTML that has multiple ID that are the same. Or elements that do not really have enough info to get a class, name, label or ID out of. This has been a

Behat Mink and using Javascript / jQuery to test attributes

Using Behat and Mink I had to make a test that would verify the height of content on the screen compared to the rest of the window size. For example it had to be 30% of the screen or more.

Keep it (functions/methods) small and simple

I have been doing some work using Oop and have a lot of re-factoring to do since I did not keep my methods small and simple. Often they use other methods or presume a certain amount of constru

Ubuntu 12.04 and PHP 5.4

Note to self Super easy steps to setup PHP 5.4 on Ubuntu 12.04 http://ww

Bash History

This simple command "history" shows a numbered list of your past commands.  1720  sudo chgrp -R www-data batch  1721  sudo chmod -R 766

Drupal FAPI Validation Error

when setting options in an option list dyamically you may run into "An illegal choice has been detected"  You will have to set those fileds #validate => TRUE as seen bel

Drush and Features-Export

When at the command line with drush making features keep in mind you may need to use quotes. Example

PHPSH

Interactive command line on a Mac. So far this helped out brew tap josegonzalez/php

Quick Script to update Heroku database

Just need to go from dev to basic on some sites. Later I will fix up the script to pass in the plan type and pg_wait.

Behat and Drupal episode 1

Intro to Behat and Drupal more coming soon. The goals will be to  Using Behat to run Drupal Selenium tests. Introduce an easy language for Project Managers an

Bootstrap Generator Gem Ruby on Rails

This particular gem overrides the default output of scaffold. Making your generated view files bootstrap ready.

Heroku in Heroku

As I build out these sites I had to run heroku commands on heroku since the admin site needs to setup Domains and Subdomain on each new site. I was glad they had the 

HerokuApps and Multiple Domains

There are some great docs online for figuring out how to setup heroku domains. https://devcenter.heroku.com/articles/custom-

Hosting is Dead?

Hosting is Dead? https://www.getpantheon.com/resources/hostingisdead Okay so they have a good reason to say that. But it

Ruby on Rails with CMS and other fun stuff

Been working about a month now on a Ruby on Rails project. The goal of the product is to make a site that can be spun up numerous times as a Saas product. I has to include  C

Paperclip and S3 and Ckeditor

This took a bit. On the first site it was easy. I went through these directions to get ckeditor setup with paperclip.

RubyMine and BetterErrors

https://github.com/charliesome/better_errors/wikigood help here on loading RubyMine from BetterErrors

Installing mysql2 on a mac

http://stackoverflow.com/questions/5919727/bundle-install-problem-mysql-h-is-missing

Paperclip and S3

Great gem for attaching images to a rails app (maybe even Laravel). This article made it clear how to set this uphttps

Capistrano for non-rails sites

I've been using capistrano for Rails and really impressed by how easy it makes deployment and rolllback. Sometimes though I need this type of automation on non-rails work. This type of automation

Refinery CMS and Twitter Bootstrap

This worked out quite easily on a project that I am working on. (not yet released)

Technologies for a Saas

I had to review for a client what CMS to choose. Keeping in mind the CMS was only part of the product and a small part. Small in that the big value to the product seem to fall more on the APP par

Angular.js Ticket System

Fun side project to make a ticket system in Angular.js. Still have to build out the authentication system and ideally move the api into Rails. And of course wrap up a few other things

My first Rails site for the masses.

First Rails site for the masses for me. Thanks to Progressive Exchange http://www.progressiveexchange.org/welcome.htm I

Vagrant and Laravel

Most likely for any internal server I had to run command php artisan serve --host="0.0.0.0" to access the port forwarding feature of vagrant Update: I had to also make sure to set the for

Questions that may come in handy when interviewing

1. Can you clearly define the roles and responsibilities you need me to fill? 2. What would you need consider my hire a success in the next 6 months? In the next year? 3. GitHub has

Making lists from acts_as_taggable

This took some time to figure out but I finally found a post on stack exchange. Even RailsCasts has a how-to on making a tag cloud, as well as act_as_taggable's guthub page. But I just could not see h

Hack For Change Challenge

Participated in the Hack For Change challenge in Western Mass. All the challenges where inspiring, I took part in the "Unlocking Prison Phone Data" because it seemed like the most difficult challen

ActiveAdmin Rails

Pretty amazing drop in interface to manage a site. I am building a Speakers Bureau for a non-profit and ended up using this to make that part of the build easier.

Great tip on Git and Jenkins to auto deploy

with every git push I would like jenkins to run it's tests then deploy the branch if it passes. This git plugin for jenkins notes you can setup a post-receive hook in git.

Going Angular.js

Going Angular Took some time to rewrite my drupal/bootstrap site into Angular.js and slim php. Using slim and a seed project I quickly had a rest api to get the different content types, Blog,

Javascript Based Product Viewer

Due to NDA limitations I had to remove links to the final product Latest Project Virtual Design Tool. [ url removed due to nda issues ) -: ]Some points that were fun, new, and challenging.Mo

Global Redirect module after spaces / purl install does not

Sometime when using spaces and purl there are Pages Not Found even though they are there. This is one reason. There is a space that purl is looking for a url starting with eg test. Some day you mak

DrupalCamp Western Mass

I will be presenting on 2 topics. Using a VM for development the url can be seen below. http://drupalcampma.com/virtual-box-ubuntu-local-development-strategy jQuery/Ajax without using the Drupa

jQuery Address

Simple example of jQuery.address in use. As you click the top "black" menu area the pages will load via Ajax (and title) notice also the URL. Then if you click back it forces a reload. There is ver

NDA

Some sites are under NDA. So if you see this message at some point after clicking a link it is due to that. If you have questions about the link you clicked feel free to email me at alfrednutile@gmai