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
if docker network ls | grep nginx-proxy; then
echo 'network found'
echo 'network not found';
docker network create nginx-proxy
if docker ps | grep nginx-proxy; then
3runoDesign /
Created Oct 22, 2018 — forked from avataru/
Eloquent relationships cheat sheet
View laravel-pivot-seeder.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 / functions.php
Last active Sep 22, 2018
Create custom page based on URL rewriting
View functions.php
add_filter( 'generate_rewrite_rules', function ( $wp_rewrite ) {
$wp_rewrite->rules = array_merge(
['my-route/?$' => 'index.php?param_internal=1'],
View gist:55f98cc526444c6c732f34a55dcfeca7
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 / 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)
View .htaccess
#Força a utilizar Cache-Control e Expires header
<IfModule mod_headers.c>
Header unset ETag
FileETag None
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Html
3runoDesign / Vagrantfile
Created Jul 18, 2017
Setting vagrant-hostmanager
View Vagrantfile
if Vagrant.has_plugin? 'vagrant-hostmanager'
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.vm.provision :hostmanager
settings = YAML::load(
config.hostmanager.aliases = settings['sites'].map { |item| item['map'] }
puts "hostmanager aliases: " + config.hostmanager.aliases.join(' ')
3runoDesign /
Created Jul 18, 2017
My favorite apps for developers which I use on my "Mac"

My favorite apps for developers which I use on my "Mac"

Yep,i know it's pretty cliché, but I'll make a list of the favorite apps I use on my "Mac". That's right my "Mac", because I'm actually using a Hackintosh.


3runoDesign / bookmarks.html
Created Mar 28, 2017
bookmarks 2015-2016
View bookmarks.html
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<DT><H3 ADD_DATE="1483280883" LAST_MODIFIED="1490426576" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
You can’t perform that action at this time.