Skip to content

Instantly share code, notes, and snippets.

Bruno Fernando dos Santos Silva 3runoDesign

Block or report user

Report or block 3runoDesign

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View docker.shell
#!/bin/bash
if docker network ls | grep nginx-proxy; then
echo 'network found'
else
echo 'network not found';
docker network create nginx-proxy
fi
if docker ps | grep nginx-proxy; then
View install_zsh.sh
#!/bin/bash
homestead up
homestead ssh
apt-get update
#Additional Packages
apt-get install -y zsh
@3runoDesign
3runoDesign / README.md
Last active Jan 12, 2019
Convert RAW to JPG
View README.md

Sheel para converter fotos .CR2 para .jpeg

@3runoDesign
3runoDesign / EloquentCheatSheet.md
Created Oct 22, 2018 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet
View EloquentCheatSheet.md
View laravel-pivot-seeder.php
<?php
use Guiaa\Models\Segments;
use Guiaa\Models\SegmentTags;
use Guiaa\Models\Tags;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class SegmentTagsSeeder extends Seeder
{
@3runoDesign
3runoDesign / functions.php
Last active Sep 22, 2018
Create custom page based on URL rewriting
View functions.php
<?php
// https://codex.wordpress.org/Class_Reference/WP_Rewrite
// https://codex.wordpress.org/Rewrite_API/flush_rules
// https://codex.wordpress.org/Plugin_API/Action_Reference/generate_rewrite_rules
add_filter( 'generate_rewrite_rules', function ( $wp_rewrite ) {
$wp_rewrite->rules = array_merge(
['my-route/?$' => 'index.php?param_internal=1'],
$wp_rewrite->rules
@3runoDesign
3runoDesign / README.md
Created Aug 8, 2016
Basic grid style based on Bootstrap and built on Bourbon and Neat.
View README.md

The goal is not to build a grid equal to the Bootstrap, but initial help to the grid without the use Bootstrap or Foundation.

View gist:55f98cc526444c6c732f34a55dcfeca7
<?php
function attachments_per_post( $where ){
if( is_user_logged_in() ){
if( isset( $_POST['action'] ) ){
// library query
if( $_POST['action'] == 'query-attachments' ){
$where .= ' AND post_parent != 0';
}
}
@3runoDesign
3runoDesign / intro.markdown
Created Feb 4, 2018 — forked from tillsanders/intro.markdown
Laravel: drag-and-drop repositioning with auto-save of DB entries
View intro.markdown

Laravel: drag-and-drop repositioning with auto-save of DB entries

Use case: Database entries are represented in a table. By grabbing and moving a row up or down the table, you can change the entries' order/position. The changes are submitted automatically via ajax.

  • Uses jQueryUI (custom download: sortable is needed)
  • newly created elements are added to the top (see route /jobs/create)
@3runoDesign
3runoDesign / Procfile
Last active Sep 22, 2017
Deploy Heroku [Laravel 5.2.*]
View Procfile
web: sh app_boot.sh
worker: php artisan queue:listen
You can’t perform that action at this time.