- 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
<!-- Hero CTA -->
<button class="c-button c-button--outline t-red c-hero__button js-hero-button qa-hero-button">Hero CTA</button>
// Button base
.c-button {}
// Button modifier with structural properties.
// In example: `border: 1px solid transparent; padding: 5px 10px;`
#!/bin/bash | |
firstLine=`head -2 $1 | tail -1` | |
if [[ $firstLine == \#* ]]; then # Testing that the file starts with a comment, not yet a real commit ;) | |
echo '<type>(<component>): <subject>' > .prepare-commit-msg-temp | |
echo '' >> .prepare-commit-msg-temp | |
echo '<body>' >> .prepare-commit-msg-temp | |
echo '' >> .prepare-commit-msg-temp | |
echo '# types: feat, fix, docs, style, refactor, test, chore(mantean)' >> .prepare-commit-msg-temp |
'use strict'; | |
/** | |
* @ngdoc service | |
* @name app.services.service:RestService | |
* | |
* @description | |
* The common service to quickly setup other services to expose a restful-like interface | |
* | |
* How to use in a factory |
(function () | |
{ | |
//Build a pseudo-class to prevent polluting our own scope. | |
var api = { | |
Settings: {}, | |
Vox: {}, | |
Start: function () | |
{ | |
//Get the *.myshopify.com domain | |
var shop = Shopify.shop; |
APP_ENV=testing | |
APP_KEY=SomeRandomString | |
DB_CONNECTION=testing | |
DB_TEST_USERNAME=root | |
DB_TEST_PASSWORD= | |
CACHE_DRIVER=array | |
SESSION_DRIVER=array | |
QUEUE_DRIVER=sync |
$(document).ready(function() { | |
$("button.remove").on('click', function(e){ | |
e.preventDefault(); | |
if ( ! confirm('Are you sure?')) { | |
return false; | |
} | |
var action = $(this).data("action"); | |
var parent = $(this).parent(); | |
$.ajax({ | |
type: 'delete', |
EmberJS resources:
ember-cli
. You can find an example of a Redis-backed Flask-based Ember frontend endpoint I wrote here. An example deploy.js
file that Esplorio uses can be found hereThis is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
To connect to MSSQL using PHP 5.6 we'll need to use PDO's DBLIB (PDO_DBLIB) http://php.net/manual/en/ref.pdo-dblib.php and FreeTDS http://www.freetds.org/
This quick tutorial is using Ubuntu Server 14.04
First, make sure you're up to date on all of your packages.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
I'm using PHP 5.6.9 (https://launchpad.net/~ondrej/+archive/ubuntu/php5-5.6)