Install the Clockwork library via Composer.
$ composer require itsgoingd/clockwork
Initialize Clockwork early in your application.
-- 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 | |
/* Example of a base model, which uses 0 instead of null value of the deleted_at as the deleted state when using soft-delete */ | |
class BaseModel extends \Illuminate\Database\Eloquent\Model | |
{ | |
/** | |
* Get a new query builder for the model's table. | |
* | |
* @param bool $excludeDeleted |
<?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; |
<?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 | |
{ | |
/** |
#! /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 |
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 |
<?php namespace Deployer; | |
require 'recipe/composer.php'; | |
require 'recipe/npm.php'; | |
require 'recipe/slack.php'; | |
// Project name | |
set('application', 'Project Name'); | |
// Project repository |
Install the Clockwork library via Composer.
$ composer require itsgoingd/clockwork
Initialize Clockwork early in your application.