Skip to content

Instantly share code, notes, and snippets.

@project24retry
project24retry / RunScheduler.php
Created December 13, 2017 01:52 — forked from robbydooo/RunScheduler.php
Heroku Laravel Scheduler
<?php
/**
This Scheduler will run once every minute unlike the Heroku scheduler which only runs every 10 mintues.
To use this scheduler with Laravel 5.4+ add this file to /app/Console/Commands/RunScheduler.php
Register this file in app/Console/Kernel.php
@project24retry
project24retry / macros
Created December 12, 2017 23:51 — forked from mnshankar/macros
Laravel 4 (Twitter Bootstrap 3.0 compliant) form macros that I commonly use
<?php
/*********************************************************************************************
* Example usage (In view)
* <div class="welcome">
<?php echo Form::open(array('route'=>'process','class'=>'form-horizontal'))?>
<?php echo Form::textField('first_name')?>
<?php echo Form::textField('last_name')?>
<?php echo Form::emailField('email')?>
<?php echo Form::passwordField('password')?>
<?php echo Form::selectField('select_one', array('1'=>'abc', '2'=>'def'))?>
@project24retry
project24retry / routes.php
Created December 10, 2017 20:03 — forked from lukemartin/routes.php
Output checkboxes with appropriate 'checked' attributes in Laravel
Route::get('edit', function() {
// fetch our post, and it's associated categories
$post = Post::with('cats')->where('id', '=', $id)->first();
// fetch all of our categories
$cats = Cat::all();
// create our empty array
$post_cats = array();
@project24retry
project24retry / findccmusic.py
Created November 28, 2017 19:01 — forked from treyhunner/findccmusic.py
Find Creative Commons Music
#!/usr/bin/env python
"""
Find Creative Commons Music
Provide names of musical artists and the script returns any relevant URLs for
FreeMusicArchive.org, Jamendo.com, and Magnatune.com.
Usage::
$ ./findccmusic.py <artist name>...