Skip to content

Instantly share code, notes, and snippets.

View antoniofrignani's full-sized avatar
👨‍💻

Antonio Frignani antoniofrignani

👨‍💻
View GitHub Profile
@antoniofrignani
antoniofrignani / gist:2972206
Created June 22, 2012 11:28
[LARAVEL] Compress filter for Laravel
<?php
/*
|--------------------------------------------------------------------------
| Compress output before sending it to the browser
|--------------------------------------------------------------------------
|
| Removes all tabs and line breaks from the content before sending it to
| the browser.
|
@antoniofrignani
antoniofrignani / auth.php
Created June 22, 2012 11:29 — forked from mwesten/auth.php
[LARAVEL] Laravel 3 Auth Controller
<?php
class Auth_Controller extends Base_Controller {
public $restful = true;
public function __construct() {
$this->filter( 'before', 'guest' )->except( array( 'logout', 'validate' ) );
// Note: We may not always require CSRF on login for system based logins so ignore it here.
$this->filter( 'before', 'csrf' )->on( 'post' )->except( array( 'login' ) );
}
@antoniofrignani
antoniofrignani / base.php
Created June 22, 2012 11:44 — forked from purwandi/base.php
[LARAVEL] My Base Model for Laravel
<?php
/**
* Base Model
*
* @package Extends Model Laravel
* @version 1.0
* @author Purwandi <[email protected]>
* @link http://purwand.me
*/
class Base extends Eloquent{
@antoniofrignani
antoniofrignani / bootstrap-grid.css
Created July 12, 2012 15:25 — forked from abitgone/bootstrap-grid.css
[BOOTSTRAP] Grid Overlay for Twitter Bootstrap
/*
* Grid Overlay for Twitter Bootstrap
* Assumes a 1.692em baseline grid (22px/13px)
*/
@media (min-width: 1200px) {
body {
background: -webkit-gradient(linear, top left, bottom left, color-stop(0%, rgba(0, 0, 0, 0.05)), color-stop(4.545%, rgba(0, 0, 0, 0.05)), color-stop(4.545%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))), -webkit-gradient(linear, top left, top right, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(35%, rgba(0, 0, 0, 0)), color-stop(35%, rgba(0, 0, 0, 0.05)), color-stop(36%, rgba(0, 0, 0, 0.05)), color-stop(36%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(0, 0, 0, 0)), color-stop(65%, rgba(0, 0, 0, 0.05)), color-stop(66%, rgba(0, 0, 0, 0.05)), color-stop(66%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0))), -webkit-gradient(linear, top left, top right, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(0.085%, rgba(0, 0, 0, 0.1)), color-stop(0.085%, rgba(0, 0, 0, 0)));
background: -webkit-linear-gradient(90deg, rgba(0, 0, 0, 0.05), rgba(
@antoniofrignani
antoniofrignani / snippet.xml
Created September 13, 2012 21:44 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@antoniofrignani
antoniofrignani / dabblet.css
Created September 27, 2012 08:41 — forked from LeaVerou/dabblet.css
Links with arrow background
/**
* Links
*/
body {
background: #FFDEDB;
}
a {
display: inline-block;
@antoniofrignani
antoniofrignani / index.html
Last active June 28, 2018 13:36
Back To top CSS
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class=" js no-touch svg inlinesvg svgclippaths no-ie8compat" lang="en-US" style="overflow: hidden;" id="ls-global"><!--<![endif]-->
<head>
</head>
<body>
<a href="#" id="linkTop" class="backtotop"></a>
@antoniofrignani
antoniofrignani / style.css
Created July 2, 2013 18:30
Over header multicolor bar, using pseudo element :before a <header>
header:before {
display: block;
content: '';
height: 5px;
background-image: -webkit-linear-gradient(right, #b145c7 9%,#7646d6 9%,#7646d6 18%,#4a5adb 18%,#4a5adb 27%,#4a78e4 27%,#4a78e4 36%,#3a9dcf 36%,#3a9dcf 45%,#38bf73 45%,#38bf73 54%,#80c83b 54%,#80c83b 63%,#cad839 63%,#cad839 72%,#e7ba37 72%,#e7ba37 81%,#e77337 81%,#e77337 90%,#e9411f 90%,#e9411f 100%,#b145c7 100%);
background-image: -moz-linear-gradient(right, #b145c7 9%,#7646d6 9%,#7646d6 18%,#4a5adb 18%,#4a5adb 27%,#4a78e4 27%,#4a78e4 36%,#3a9dcf 36%,#3a9dcf 45%,#38bf73 45%,#38bf73 54%,#80c83b 54%,#80c83b 63%,#cad839 63%,#cad839 72%,#e7ba37 72%,#e7ba37 81%,#e77337 81%,#e77337 90%,#e9411f 90%,#e9411f 100%,#b145c7 100%);
background-image: -o-linear-gradient(right, #b145c7 9%,#7646d6 9%,#7646d6 18%,#4a5adb 18%,#4a5adb 27%,#4a78e4 27%,#4a78e4 36%,#3a9dcf 36%,#3a9dcf 45%,#38bf73 45%,#38bf73 54%,#80c83b 54%,#80c83b 63%,#cad839 63%,#cad839 72%,#e7ba37 72%,#e7ba37 81%,#e77337 81%,#e77337 90%,#e9411f 90%,#e9411f 100%,#b145c7 100%);
background-image: line
@antoniofrignani
antoniofrignani / font-fix.css
Created July 3, 2013 17:51
Fix Google Font Rendering issue for some font [DO NOT USE, IT'S A HACK]
p {
-webkit-transform: rotate3d(-1, -1, -1, 0.01deg);
}
.hexagon {
width: 120px;
height: 60px;
position: relative;
}
.hexagon, .hexagon:before, .hexagon:after {
background: red;
border-radius: 5px
}
.hexagon:before, .hexagon:after {