Skip to content

Instantly share code, notes, and snippets.

View arenowebdev's full-sized avatar

David Mosher arenowebdev

View GitHub Profile
@arenowebdev
arenowebdev / keybase.md
Created September 13, 2018 17:46
keybase.md

Keybase proof

I hereby claim:

  • I am arenowebdev on github.
  • I am arenowebdev (https://keybase.io/arenowebdev) on keybase.
  • I have a public key ASBH6yUtCpdC4UeZ3fIeLWV0-onZKl5sh9aQnvRPI_J9Rwo

To claim this, I am signing this object:

@arenowebdev
arenowebdev / keybase.md
Created March 27, 2017 17:39
Keybase Verification

Keybase proof

I hereby claim:

  • I am arenowebdev on github.
  • I am arenowebdev (https://keybase.io/arenowebdev) on keybase.
  • I have a public key ASCPx_3J5RzRXlT14PlU6Cadcer4zjogKZulPCVhaex24Ao

To claim this, I am signing this object:

@arenowebdev
arenowebdev / test.php
Created October 14, 2016 04:05
How to return relationship single column?
<?php
/*
I'm utilizing spatie/laravel-permission for this...if that matters (which I don't think it does...)
What I would like returned is an array such as this:
[
[
'created_at' => '2016-10-13 21:00:00',
@arenowebdev
arenowebdev / how-we-do.php
Created August 29, 2016 21:11
Sentry .env in Laravel
<?php
// In .env:
SENTRY_PRIVATE_DSN=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy@app.getsentry.com/#####
SENTRY_PUBLIC_DSN=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@app.getsentry.com/#####
// On our config server, each environment receives their own version of the .env file
// Depending upon the environment being deployed to, we grab that config and place it
// within the app directory. Now when the sentry config is used, it will have the environment
// specific configuration and will report exceptions for the environment that is being
@arenowebdev
arenowebdev / middleware.php
Last active April 23, 2016 05:40
OAuth2 Laravel Middleware
<?php namespace Noip\SooperSecretProjectName\Http\Middleware;
use Closure;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use League\OAuth2\Server\ResourceServer;
use League\OAuth2\Server\Exception\OAuthServerException;
class OAuthResource
{
@arenowebdev
arenowebdev / ClearBeanstalkdQueueCommand.php
Created April 1, 2016 05:04
Laravel Artisan command to clear Beanstalkd Queue(s)
<?php namespace App\Console\Commands;
use App\Contract\ListingsInterface;
use App\Contract\ListingCreatorInterface;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command
{
/**
@arenowebdev
arenowebdev / pre-commit
Created January 29, 2016 08:06 — forked from martinbean/pre-commit
Pre-commit hook to detect if any files contain dd()
#!/usr/bin/php
<?php
$files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD | grep "\.php$"');
$files = explode("\n", trim($files));
$exitCode = 0;
foreach ($files as $file) {
if (empty($file)) {
@arenowebdev
arenowebdev / Https.php
Created January 12, 2016 07:56
Laravel HTTPS Middleware issues?
<?php namespace App\Http\Middleware;
use Closure;
class Https
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
@arenowebdev
arenowebdev / lineup.md
Last active August 6, 2017 11:05
Invalid Argument Exception Lineup

Second Week Linup

Quarterback Opp Att/Comp Yds TD INT FUM RUSH-YDS RUSH-TD
P. Manning DEN OAK Sun 4:25p
Running Backs Opp Yds TD FUM REC-YDS REC-TD
D. Martin TB NO Sun 1p
C.J. Anderson DEN OAK Sun 4:25p
@arenowebdev
arenowebdev / git lg
Created October 6, 2011 22:50
Git log alias that I use
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative