Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Vagner Luz do Carmo vluzrmos

🏠
Working from home
View GitHub Profile
@vluzrmos
vluzrmos / gist:da516cde6f303dc343fe
Created Nov 4, 2015 — forked from devster/gist:9545326
Install mscorefonts on debian wheezy
View gist:da516cde6f303dc343fe
# 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 Sep 11, 2015
My Sublime text settings with Material Theme.
View ibdm-sublime-text.settings.json
{
"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 Aug 6, 2015
Example how to remove the eager loading on Eloquent.
View Post.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
/**
* Array of relationships to load.
@vluzrmos
vluzrmos / import_tgz.sh
Last active Aug 29, 2015
Function to import tgz file to mysql.
View import_tgz.sh
import_tgz(){
tar -xOzf $1 | mysql -u ${2:-root} -p${3:-1234}
}
@vluzrmos
vluzrmos / principais_packages.md
Last active Jun 17, 2020
Lista dos principais packages para Laravel citados no 16º Hangout Laravel Brasil.
View principais_packages.md
@vluzrmos
vluzrmos / HasRandomStatementTrait.php
Last active May 12, 2016
Laravel Eloquent Agnostic Random Statement
View HasRandomStatementTrait.php
<?php
trait HasRandomStatementTrait
{
/**
* Random Statements by driver name.
* @var array
*/
protected $randomStatements = [
'mysql' => 'RAND()',
@vluzrmos
vluzrmos / lumen-HasIntendedRoute.php
Last active Aug 29, 2015
Lumen get intended route.
View lumen-HasIntendedRoute.php
<?php
// namespace Your\Awesome\Namespace\Here;
use Illuminate\Http\Request;
/**
* Trait HasIntendedRoute.
*/
trait HasIntendedRoute
View VideoStream.php
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
View App_Http_VideoStream.php
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
@vluzrmos
vluzrmos / .php_cs.php
Created Jul 8, 2015
phpcs-fixer configuration file to Laravel style. Note: rename this to .php_cs and put on root of your project or package.
View .php_cs.php
<?php
$finder = Symfony\Component\Finder\Finder::create()
->files()
->in(__DIR__)
->exclude('vendor')
->notName("*.txt")
->ignoreDotFiles(true)
->ignoreVCS(true);