Skip to content

Instantly share code, notes, and snippets.

View rodrigore's full-sized avatar

Rodrigo Guzmán rodrigore

  • Santiago, Chile
View GitHub Profile
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
--- Actions ---
$Copy <C-C> <C-Ins>
$Cut <C-X> <S-Del>
$Delete <Del>
$LRU
$Paste <C-V> <S-Ins>
$Redo <C-S-Z> <A-S-BS>
$SearchWeb
$SelectAll <C-A>
$Undo <C-Z> <A-BS>
<?php
/**
* Automatically alias Laravel Model's to their base classname.
* Ex: "App\Models\User" now can just be accessed by "User"
*/
if (! function_exists('aliasModels')) {
function aliasModels() {
$finder = new \Symfony\Component\Finder\Finder();
$finder->files()->name('*.php')->in(base_path().'/app');
// ...
let webpack = require("webpack");
mix.webpackConfig({
plugins: [
// Choose the language you want to keep (Ex: "fr")
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/)
]
});
@huytd
huytd / .tmux.conf
Created February 24, 2017 18:03
Clean setup
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g prefix C-x
unbind-key C-x
bind-key C-2 send-prefix
bind \ split-window -h -c '#{pane_current_path}'
bind / split-window -v -c '#{pane_current_path}'
# Copy-paste integration
@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@bonsaiviking
bonsaiviking / lua.vim
Last active April 4, 2022 14:38
A Vim indent file for the Lua scripting language. Install as ~/.vim/indent/lua.vim
" Vim indent file
" Language: Lua
" Maintainer: Daniel Miller <daniel@bonsaiviking.com>
" Original Author: Daniel Miller <daniel@bonsaiviking.com>
" Last Change: 2014 Feb 6
" Only load this indent file when no other was loaded.
if exists("b:did_indent")
finish
endif
@dsbraz
dsbraz / Vagrantfile
Created December 4, 2013 20:46
Vagrant com provisionamento via Ruby code
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", path: "provision.rb"
end
@fideloper
fideloper / CodeTest.php
Created November 11, 2013 13:55
Example testing with in-memory SQLite database
<?php
/**
* Intention:
*
* "testing" environment has a SQLite database configured
* Run migrations against --env=testing
*
* Separate seeds run here per test method will delete the SQLite
* code tables, and re-create them with codes that fit the needs
@fideloper
fideloper / install.sh
Last active October 30, 2023 20:03
Vagrant Provisioning Script for PHP applications. This installs a LAMP stack.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'