Skip to content

Instantly share code, notes, and snippets.

View luisdalmolin's full-sized avatar
👨‍💻

Luís Dalmolin luisdalmolin

👨‍💻
View GitHub Profile
@luisdalmolin
luisdalmolin / gradient.scss
Created June 5, 2013 20:44
Compass Gradient CSS3 function
@mixin gradient($color-start, $color-stop, $direction: top) {
background-color: $color-stop;
@include background-image(linear-gradient($direction, $color-start, $color-stop));
}
[Exception]
DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() functi
on. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, bu
t please set date.timezone to select your timezone.
@luisdalmolin
luisdalmolin / Gruntfile.js
Created May 6, 2013 23:53
Grunt Boilerplate
module.exports = function(grunt) {
grunt.initConfig({
coffee: {
compile: {
files: {
'assets/js/main.js': 'assets/js/coffee/main.coffee',
}
}
},
@luisdalmolin
luisdalmolin / deploy.sh
Created April 18, 2013 18:29
Deploy via GIT with composer update and database migration and seed.
$ git deploy
Counting objects: 41, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (24/24), done.
Writing objects: 100% (25/25), 5.39 KiB, done.
Total 25 (delta 12), reused 0 (delta 0)
remote: Loading composer repositories with package information
Updating dependencies
remote: Generating autoload files
remote: Generating optimized class loader...
@luisdalmolin
luisdalmolin / config.rb
Created April 15, 2013 18:10
Compass file configuration
# Arquivo de configuração do Compass para o EscapeWork (a partir de versão 1.3, que contém o sass)
# Versões anteriores vão precisar criar e cofigurar os diretórios do sass e css
# Author: Luís Dalmolin <luis@escape.ppg.br>
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = ""
css_dir = "assets/css"
sass_dir = "assets/css/scss"
@luisdalmolin
luisdalmolin / ClientAuth.php
Last active December 15, 2015 02:28
Some thoughts about the Laravel Auth. The only real changes is the new method getModel in EloquentUserProvider (need to add in DatabaseUserProvider too), and the methods `getName` and `getRecallerName` in the `Guard` class, to make the session name with the related model.
<?php namespace Commerce\Client\Facades;
class ClientAuth
{
/**
* @var Illuminate\Auth\Guard
*/
static $guard;
<?php
class Slug
{
/**
* Create a URI friendly slug from a string.
*
* @param string $uri
* @return string
*/
public static function make($uri)
<?php
App::bind('product', function($value, $route)
{
var_dump( $value ); die;
});
Route::get('produtos/{product}/skus', array('as' => 'produtos.skus.index', 'uses' => 'ProductSkuController@index'));
<?php
class SkuValueController extends BaseController
{
public function update( SkuRepositoryInterface $sku, $id )
{
}
}