Skip to content

Instantly share code, notes, and snippets.

View clarkeash's full-sized avatar
👨‍🚀
coding something...

Ashley Clarke clarkeash

👨‍🚀
coding something...
View GitHub Profile
@clarkeash
clarkeash / nodemon.json
Created March 11, 2020 11:19
Nodemon config for Laravel
{
"events": {
"start": "clear",
"restart": "clear"
},
"exec": "php artisan test",
"ext": "*",
"ignore": [
"vendor/"
]
@clarkeash
clarkeash / TestCase.php
Last active February 9, 2016 07:55
Laravel TestCase Improved
<?php
class TestCase extends Illuminate\Foundation\Testing\TestCase
{
/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://localhost';
@clarkeash
clarkeash / phpunit.xml
Last active January 27, 2016 16:01
Standard phpunit configuration. (adapted from Laravel)
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
@clarkeash
clarkeash / example.php
Last active August 29, 2015 14:07
16-October-sample-post
<?php
echo "hey, there!";
?>

Keybase proof

I hereby claim:

  • I am clarkeash on github.
  • I am clarkeash (https://keybase.io/clarkeash) on keybase.
  • I have a public key whose fingerprint is 27AC 45CC 3588 C999 69F3 A3A8 5727 16D2 B57C C18F

To claim this, I am signing this object:

@clarkeash
clarkeash / this.php
Last active September 20, 2016 14:31
<?php
class This {
protected $this;
public function __construct ()
{
$this->this = $this;
}
/*
|--------------------------------------------------------------------------
| Basic Setup/Config
|--------------------------------------------------------------------------
*/
@setup
$directory = '/home/vagrant/laravel-apps/stubb-project';
@endsetup
/*
@clarkeash
clarkeash / gist:e0a67e738559a98e64ac
Last active August 29, 2015 14:01
Setting up a Mac
Config:
- Change scrolling direction
- Hide dock
- Create SSH key
- Pull in bash profile from github
Apps:
- Chrome
- Dropbox
- Alfred App
@clarkeash
clarkeash / object_one.js
Created December 5, 2013 15:31
New to objects in JS, no idea of the differences here: (why would you use one over the other)
function Object(){
}
Object.prototype.func = function(){
//code
};
<?php
function splitAndStrip($str, $del = ',')
{
$str = explode($del, $str);
for ($i=0; $i < count($str); $i++)
{
$str[$i] = trim($str[$i]);
}
return $str;
}