- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
- 1. Automatic Model Validation
import 'package:firebase_storage/firebase_storage.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:meta/meta.dart'; | |
enum ImageDownloadState { Idle, GettingURL, Downloading, Done, Error } | |
class FirebaseStorageImage extends StatefulWidget { | |
/// The reference of the image that has to be loaded. | |
final StorageReference reference; | |
/// The widget that will be displayed when loading if no [placeholderImage] is set. |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>brain.js</title> | |
<script src="https://cdn.rawgit.com/BrainJS/brain.js/develop/browser.js"></script> | |
<script> | |
function DrawableCanvas(el) { | |
const px = 10 | |
const ctx = el.getContext('2d') | |
let x = [] |
<?php | |
/** | |
* @package One_Fix_Switch_Theme | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: One Fix Switch Theme | |
Plugin URI: https://www.1fix.io | |
Description: Switch theme on certain pages. | |
Author: Yoren Chang |
<?php | |
// Published under GPL | |
// tutorial here: https://codeable.io/community/how-to-import-json-into-wordpress/ | |
class Developer_Import { | |
public function __construct() { | |
add_action( 'wp_ajax_import_developer', array( $this, 'import_developer' ) ); |
<?php | |
//class docs: http://www.orderingdisorder.com/aws/ses/ | |
require_once('ses.php'); | |
//get credentials at http://aws.amazon.com My Account / Console > Security Credentials | |
$ses = new SimpleEmailService('ACCESSkeyID', 'SECRETaccessKEY'); | |
$m = new SimpleEmailServiceMessage(); |
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.