Skip to content

Instantly share code, notes, and snippets.

View diegofelix's full-sized avatar

Diego Felix diegofelix

View GitHub Profile
@diegofelix
diegofelix / index.html
Last active October 10, 2015 21:58 — forked from kennethsnippet/gist:3757593
HTML: HTML5 Template
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>untitled</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<!-- Main -->
@diegofelix
diegofelix / main.css
Created November 6, 2012 11:20
CSS: Linear Gradient CSS
/* change the color to your colors */
background-color: #666666;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #666666, #333333);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#666666), to(#333333));
background-image: -webkit-linear-gradient(top, #666666, #333333);
background-image: -o-linear-gradient(top, #666666, #333333);
background-image: linear-gradient(to bottom, #666666, #333333);
background-repeat: repeat-x;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff666666', endColorstr='#ff333333', GradientType=0);
@diegofelix
diegofelix / helper.php
Last active November 30, 2016 11:33
Laravel 3: Back Link
// Link to Back page
HTML::macro("back", function($text = "Back"){
return '<a href="{{ Request::referrer() }}">$text</a>';
});
@diegofelix
diegofelix / .htaccess
Created April 17, 2013 13:42
Laravel 3: .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@diegofelix
diegofelix / gist:5404428
Last active December 16, 2015 08:18 — forked from rjv/gist:5372014
Laravel 4: Installing via Composer
composer create-project laravel/laravel --prefer-dist
@diegofelix
diegofelix / SublimeText3_ContextMenuReg
Last active December 20, 2015 04:29 — forked from iaian/sublimeText2_contextMenu.reg
Sublime Text 3: Adding Context Menu on Windows
Windows Registry Editor Version 5.00
; This will make it appear when you right click ON a folder
; The "Icon" line can be removed if you don't want the icon to appear
[HKEY_CLASSES_ROOT\Directory\shell\sublime]
@="Open Folder as Sublime Project"
"Icon"="\"C:\\Program Files\\Sublime Text 3\\sublime_text.exe\",0"
[HKEY_CLASSES_ROOT\Directory\shell\sublime\command]
@diegofelix
diegofelix / laravel-weekly-23-quick-tip.php
Created September 17, 2013 15:42 — forked from driesvints/laravel-weekly-23-quick-tip.php
Laravel 4: Form range examples
<?php
# Create a list with numbers ranging from 10 to 20.
Form::selectRange('number', 10, 20);
# Create a list with years ranging from 1900 to 2000.
Form::selectYear('year', 1900, 2000);
# Creates a list with month names.
Form::selectMonth('month');
@diegofelix
diegofelix / filters.php
Created November 18, 2013 12:32 — forked from zmsaunders/filters.php
Laravel 4: Minifying Html Response
<?php
### --- Snip --- ###
App::after(function($request, $response)
{
// HTML Minification
if(App::Environment() != 'local')
{
if($response instanceof Illuminate\Http\Response)
@diegofelix
diegofelix / gist:8314644
Last active January 2, 2016 14:09
Laravel 4: Delete Form Macro
<?php
/*
|--------------------------------------------------------------------------
| Delete form macro
|--------------------------------------------------------------------------
|
| This macro creates a form with only a submit button.
| We'll use it to generate forms that will post to a certain url with the DELETE method,
| following REST principles.
@diegofelix
diegofelix / routes.php
Created January 9, 2014 10:12 — forked from fhferreira/routes.php
Laravel 4: Custom Paginator
<?php
View::composer(Paginator::getViewName(), function($view) {
$query = array_except( Input::query(), Paginator::getPageName() );
$view->paginator->appends($query);
});