Skip to content

Instantly share code, notes, and snippets.

View vinicius73's full-sized avatar
🤓
"Those who cannot acknowledge themselves, will eventually fail."

Vinicius Reis vinicius73

🤓
"Those who cannot acknowledge themselves, will eventually fail."
View GitHub Profile
@leandroruel
leandroruel / container-segue-altura-conteudo
Last active August 29, 2015 13:56
com o uso de CSS o código cria um container "seguidor" do conteúdo da página, o elemento vai do topo ao rodapé mesmo com pouco ou nenhum conteúdo.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*,
*::after,
*::before {
box-sizing: border-box;
@vluzrmos
vluzrmos / README.md
Last active August 29, 2015 14:19
Laravel Lumen CORS Middleware
@rodurma
rodurma / MeuComando.php
Last active August 29, 2015 14:20
Exemplo de Command em Laravel + Queue + Delay
<?php namespace App\Commands;
use App\Commands\Command;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldBeQueued;
@maxxscho
maxxscho / EmptyWidget.php
Created March 7, 2012 10:24 — forked from jonathonbyrdziak/CustomWidgetFile.php
Wordpress: Plugin code to create a single widget in wordpress.
<?php
/**
* @package RedRokk
* @version 1.0.0
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Empty_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
@kris-g
kris-g / Twitter Bootstrap Radio Button Form Inputs.html
Created July 13, 2012 22:01
Clean way to bind result value of bootstrap radio buttons to a single form input
<form>
<div class="btn-group" data-toggle-name="is_private" data-toggle="buttons-radio" >
<button type="button" value="0" class="btn" data-toggle="button">Public</button>
<button type="button" value="1" class="btn" data-toggle="button">Private</button>
</div>
<input type="hidden" name="is_private" value="0" />
</form>
@vinicius73
vinicius73 / ci.php
Created August 27, 2012 14:41
Integração Codeigniter com NetBeans
<?php
/**
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
* @property CI_Benchmark $benchmark
* @property CI_Calendar $calendar
* @property CI_Cart $cart
* @property CI_Config $config
* @property CI_Controller $controller
@jonatanfroes
jonatanfroes / Form.html
Created September 29, 2012 16:58
Codeigniter + Jquery File Upload
<!-- configure a url que irá receber os dados -->
<input id="fileupload" type="file" name="Filedata" data-url="<?php echo site_url('admin/portfolio/save_photo/' . $gallery->id); ?>" multiple />
<div id="progress" class="progress progress-striped active">
<div class="bar" style="width: 0;"></div>
</div>
<div id="upload_result"></div>
<hr />
<!-- /end multiple upload -->
@dodopok
dodopok / gist:5038994
Created February 26, 2013 14:55
Formatar Strings PHP para qualquer formato
<?php
function __format($campo='',$mascara=''){
//remove qualquer formatação que ainda exista
$sLimpo = preg_replace("(/[' '-./ t]/)",'',$campo);
// pega o tamanho da string e da mascara
$tCampo = strlen($sLimpo);
$tMask = strlen($mascara);
if ( $tCampo > $tMask ) {
$tMaior = $tCampo;
@vedovelli
vedovelli / gulpfile.js
Created June 3, 2015 17:20
Gulpfile.js para rodar duo() sempre que o javascript especificado for salvo.
/**
* gulpfile para automatizar a compilação feita com o Duo.js.
* Author: Fabio Vedovelli <vedovelli@gmail.com>
* http://vedovelli.com.br/
* Inspirado em https://github.com/mozilla/galaxy.js/blob/master/gulpfile.js
*/
var gulp = require('gulp');
/**
@emtudo
emtudo / DateField.php
Last active February 2, 2016 14:11 — forked from vinicius73/CustomValidatorsServiceProvider.php
Helper para datas Laravel
<?php
namespace App\Support\Validators\Rules;
use App\Support\Helpers\Dates as DateHelper;
class DateField
{
/**
* @param string $attribute