Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@itsgoingd
itsgoingd / gist:86085598fb414b69a06c
Last active August 29, 2015 14:01
Clockwork Laravel exception handler
<?php
use Illuminate\Http\Response;
use Clockwork\Clockwork;
use Clockwork\Support\Laravel\ClockworkServiceProvider;
App::error(function(Exception $exception)
{
$app = app();
<?php
use SlimFacades\App as BaseAppFacade;
class App extends BaseAppFacade
{
// Bind a value into the Slim container
public static function bind($key, $value)
{
self::$app[$key] = $value;
@itsgoingd
itsgoingd / gist:3636098
Created September 5, 2012 12:51
Applescript: instantly delete selected files in Finder
-- instantly delete selected files in Finder
tell application "Finder" to repeat with filename in (get selection)
do shell script "rm -rf " & quoted form of POSIX path of (filename as text)
end repeat
<?php
namespace Dingo\Api\Routing\Adapter;
use ArrayIterator;
use ReflectionClass;
use FastRoute\Dispatcher;
use FastRoute\RouteParser;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@itsgoingd
itsgoingd / .gitlab-ci.yml
Created August 7, 2018 10:29
GitLab CD example for a Laravel app
deploy to staging:
image: bobey/docker-gitlab-ci-runner-php7
environment:
name: staging
url: https://test.example.com
only:
- master
script:
- wget -q https://getcomposer.org/composer.phar
- mkdir -p ~/.ssh
@itsgoingd
itsgoingd / deploy.php
Created August 7, 2018 10:32
Deployer configuration for a Laravel app example
<?php namespace Deployer;
require 'recipe/composer.php';
require 'recipe/npm.php';
require 'recipe/slack.php';
// Project name
set('application', 'Project Name');
// Project repository
@itsgoingd
itsgoingd / vanilla.md
Created October 18, 2018 19:55
Clockwork 3.1 vanilla integration docs

Installation

Install the Clockwork library via Composer.

$ composer require itsgoingd/clockwork

Initialize Clockwork early in your application.

@itsgoingd
itsgoingd / ClockworkConsoleSupport.php
Created May 13, 2020 20:22
clockwork symfony support poc
<?php namespace Clockwork\Support\Symfony;
use Clockwork\Clockwork;
use Clockwork\Support\Laravel\Console\CapturingFormatter;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\Console\Event\ConsoleTerminateEvent;
use Symfony\Component\EventDispatcher\EventDispatcher;
@itsgoingd
itsgoingd / das_download.rb
Created August 5, 2018 15:11
Script to download all Destroy All Software screencasts w/ login (works as of Aug 2018)
#! /usr/bin/env ruby
# usage:
# $ das_download.rb email password
# based on various gists from this thread https://gist.github.com/maca/1798070
require "mechanize"
require "fileutils"
class DasDownloader
attr_reader :agent, :email, :password