Skip to content

Instantly share code, notes, and snippets.

View soubrunorocha's full-sized avatar

Bruno de Souza Rocha soubrunorocha

  • Scaffold Education
  • Bauru, SP - Brazil
View GitHub Profile
@soubrunorocha
soubrunorocha / install_mysql8_silent.sh
Created July 27, 2018 14:31
Installing MySQL 8 in silent mode on Ubuntu ( Without prompting )
#update and install some dependencies
sudo apt-get update && apt-get upgrade -y;
sudo apt-get install -y debconf-utils zsh htop libaio1;
#set the root password
DEFAULTPASS="rootpass"
#set some config to avoid prompting
sudo debconf-set-selections <<EOF
mysql-apt-config mysql-apt-config/select-server select mysql-8.0
@AALMA
AALMA / massInsertOrUpdate.php
Last active September 25, 2020 07:04 — forked from RuGa/massInsertOrUpdate.php
Mass (bulk) insert or update on duplicate for Laravel 4/5
<?php
namespace App\Traits;
use DB;
use Carbon\Carbon;
trait MassInsertOrUpdate
{
protected $insert_or_update_chunk_size = 1000;
@brunogaspar
brunogaspar / macro.md
Last active May 1, 2024 07:24
Recursive Laravel Collection Macros

What?

If a nested array is passed into a Laravel Collection, by default these will be threaded as normal arrays.

However, that's not always the ideal case and it would be nice if we could have nested collections in a cleaner way.

This is where this macro comes in handy.

Setup

@Repox
Repox / PaginationController.php
Created November 3, 2016 11:05
Laravel 5 Pagination with transform
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class PaginationController extends Controller
{
@ejholmes
ejholmes / resume.md
Last active May 22, 2023 01:11
My Resume

GitHub | LinkedIn | Blog

I'm a passionate full stack developer with extensive experience with both server side and client side MVC frameworks. My development stack of choice includes Git, Ruby on Rails, SASS, CoffeeScript, CSS3 and HTML5. I'm a firm believer in test driven development, continous integration and code review, and always strive to write beautiful and elegant code that solves complex problems easily.

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream