Skip to content

Instantly share code, notes, and snippets.

View alexbowers's full-sized avatar

Alex Bowers alexbowers

View GitHub Profile
@alexbowers
alexbowers / ClearHorizonQueue.php
Created January 11, 2020 12:38
horizon:clear command
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class ClearHorizonQueue extends Command
{
/**
* The name and signature of the console command.
<?php
Collection::macro('mapAttachUntil', new mapAttachUntil);
// Examples:
collect([
[
'Action' => 'Category',
'Name' => 'One',
@alexbowers
alexbowers / Child.vue
Created March 13, 2019 13:42
Example Tailwind Vue SFC
<template>
<div>
<p class="bg-blue">Hello World 2</p>
</div>
</template>
<script>
export default {};
</script>
@alexbowers
alexbowers / handlers.yml
Created December 29, 2017 15:27
Install MySQL 5.7 via Ansible
---
- name: restart apparmor
become: yes
service:
name: apparmor
state: restarted
- name: restart mysql
become: yes
service:

Keybase proof

I hereby claim:

  • I am alexbowers on github.
  • I am bowersbros (https://keybase.io/bowersbros) on keybase.
  • I have a public key ASARDpx0lu-Nf4_c-gHI1CR3pzVPs6h4AEdydnJpuiqcWAo

To claim this, I am signing this object:

<?php
class _╯°□°╯︵┻━┻ extends \Exception {}
function _╯°□°╯︵┻━┻($message) {
throw new _╯°□°╯︵┻━┻($message);
}
_╯°□°╯︵┻━┻("Flip Table");
let original_console = window.console;
let console = Object.create(window.console);
console.log = function(msg, formatting) {
formatting = formatting || '';
console.groupCollapsed();
console.trace();
original_console.log(msg, formatting);
console.groupEnd();
<?php
class Collection implements Castable
{
protected $items = [];
public function __construct(array $items = [])
{
$this->items = $items;
}
<?php
class Collection implements ArrayAccess, Arrayable, ...
{
protected $items = [];
public function __construct(array $items = [])
{
$this->items = $items;
}
@alexbowers
alexbowers / Annotation.php
Last active October 19, 2016 15:47
Fire annotations into Grafana in PHP using UDP.
<?php
class Annotation
{
private $ip = 'Your IP';
private $port = '8089';
/**
* Annotation constructor.
*