- Install and download the free Scriptable app on your iOS device.
- Inside the app, press the "Plus" icon to create a new script
- Paste the content of the JS file into the script
- Place a Scriptable widget on your home screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Livewire; | |
use App\Customer; | |
use Livewire\Component; | |
class Multiform extends Component | |
{ | |
public $name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests; | |
trait CanAssertFlash | |
{ | |
protected function assertFlash($level, $message, $important = false, $title = null, $overlay = false) | |
{ | |
$expectedNotification = [ | |
'title' => $title, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\Api; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Http\Request; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
abstract class ApiController extends Controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<scheme name="laracasts-theme-updated" version="142" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.7" /> | |
<option name="EDITOR_FONT_SIZE" value="15" /> | |
<option name="CONSOLE_FONT_NAME" value="Menlo" /> | |
<option name="CONSOLE_FONT_SIZE" value="10" /> | |
<option name="CONSOLE_LINE_SPACING" value="1.4" /> | |
<option name="EDITOR_FONT_NAME" value="Menlo" /> | |
<colors> | |
<option name="ADDED_LINES_COLOR" value="292d38" /> | |
<option name="ANNOTATIONS_COLOR" value="8b999f" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Converts a number into a short version, eg: 1000 -> 1k | |
// Based on: http://stackoverflow.com/a/4371114 | |
function number_format_short( $n, $precision = 1 ) { | |
if ($n < 900) { | |
// 0 - 900 | |
$n_format = number_format($n, $precision); | |
$suffix = ''; | |
} else if ($n < 900000) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = array(1, 2, 3); | |
$pairs = array_map(null, $a, array_slice($a, 1)); | |
/** | |
* Prints: | |
* (1,2)(2, 3)(3, ) | |
*/ | |
foreach ($pairs as list($x, $y)) { | |
echo "({$x}, {$y})"; |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |