Skip to content

Instantly share code, notes, and snippets.

View vluzrmos's full-sized avatar
🏠
Working from home

Vagner Luz do Carmo vluzrmos

🏠
Working from home
View GitHub Profile
@vluzrmos
vluzrmos / gist:da516cde6f303dc343fe
Created November 4, 2015 19:54 — forked from devster/gist:9545326
Install mscorefonts on debian wheezy
# Add this repo to the /etc/apt/source.list file
deb ftp://ftp.debian.org/debian stable contrib non-free
# And run these commands
sudo apt-get update
sudo apt-get install ttf-mscorefonts-installer
@vluzrmos
vluzrmos / ibdm-sublime-text.settings.json
Last active September 11, 2015 10:37
My Sublime text settings with Material Theme.
{
"always_show_minimap_viewport": false,
"bold_folder_labels": false,
"color_scheme": "Packages/User/SublimeLinter/darkula (SL).tmTheme",
"enable_tab_scrolling": false,
"font_size": 13,
"folder_exclude_patterns": [".svn", ".idea", ".hg", "CVS"],
"ignored_packages":
[
"Vintage"
@vluzrmos
vluzrmos / Post.php
Created August 6, 2015 01:37
Example how to remove the eager loading on Eloquent.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
/**
* Array of relationships to load.
@vluzrmos
vluzrmos / import_tgz.sh
Last active August 29, 2015 14:26
Function to import tgz file to mysql.
import_tgz(){
tar -xOzf $1 | mysql -u ${2:-root} -p${3:-1234}
}
@vluzrmos
vluzrmos / principais_packages.md
Last active June 17, 2020 21:48
Lista dos principais packages para Laravel citados no 16º Hangout Laravel Brasil.
@vluzrmos
vluzrmos / HasRandomStatementTrait.php
Last active May 12, 2016 21:06
Laravel Eloquent Agnostic Random Statement
<?php
trait HasRandomStatementTrait
{
/**
* Random Statements by driver name.
* @var array
*/
protected $randomStatements = [
'mysql' => 'RAND()',
@vluzrmos
vluzrmos / lumen-HasIntendedRoute.php
Last active August 29, 2015 14:25
Lumen get intended route.
<?php
// namespace Your\Awesome\Namespace\Here;
use Illuminate\Http\Request;
/**
* Trait HasIntendedRoute.
*/
trait HasIntendedRoute
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@vluzrmos
vluzrmos / App_Http_VideoStream.php
Last active February 14, 2024 22:00
Laravel VideoStream.
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@vluzrmos
vluzrmos / .php_cs.php
Created July 8, 2015 21:09
phpcs-fixer configuration file to Laravel style. Note: rename this to .php_cs and put on root of your project or package.
<?php
$finder = Symfony\Component\Finder\Finder::create()
->files()
->in(__DIR__)
->exclude('vendor')
->notName("*.txt")
->ignoreDotFiles(true)
->ignoreVCS(true);