Skip to content

Instantly share code, notes, and snippets.

@justindantzer
justindantzer / ScheduleListCommand.php
Last active November 14, 2024 15:33 — forked from nvahalik/ScheduleList.php
PHP Artisan command that lists all scheduled tasks: php artisan schedule:list (Credit: https://stackoverflow.com/a/35559970/2714126 and https://gist.github.com/nvahalik/110ee066a39d9f68f3b4b159f7acad6c)
<?php
namespace App\Console\Commands;
use Carbon\Carbon;
use Cron\CronExpression;
use Illuminate\Console\Command;
use Illuminate\Console\Scheduling\Event;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Console\Scheduling\CallbackEvent;
@justindantzer
justindantzer / jquery.parseparams.js
Last active February 4, 2016 19:45 — forked from kares/jquery.parseparams.js
jQuery.parseParams - parse query string paramaters into an object
/**
* $.parseParams - parse query string paramaters into an object.
*/
(function($) {
var re = /([^&=]+)=?([^&]*)/g;
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );};
$.parseParams = function(query) {
var params = {}, e, f;
while ( e = re.exec(query) ) {