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 BulmaWalker.php
namespace App\Lib;
use Utils;
class BulmaWalker extends \Walker_Nav_Menu
private $cpt; // CPT, is current post a custom post type
private $archive; // Stores the archive page for current URL
public function __construct()
lucasprogamer / main.js
Created May 21, 2018
CF7 Bulma Ajax-loader icon
View main.js
* when cf7 ajax-loader
* @param {[type]} form [description]
* @return {[type]} [description]
wpcf7.submit = function( form ) {
if ( typeof window.FormData !== 'function' ) {
avataru /
Last active Oct 4, 2019
Eloquent relationships cheat sheet
lucasprogamer / WP .htacess cache controll
Last active Oct 30, 2017
Add after # END WordPress.
View WP .htacess cache controll
#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 /
Last active Jan 12, 2019
Convert RAW to JPG

Sheel para converter fotos .CR2 para .jpeg

CodeVachon / gulpfile.babel.js
Last active Nov 25, 2017
React Setup with Babel, Gulp, and Browserify
View gulpfile.babel.js
import gulp from 'gulp';
import browserify from 'browserify';
import source from 'vinyl-source-stream';
import buffer from 'vinyl-buffer';
import eslint from 'gulp-eslint';
import exorcist from 'exorcist';
import browserSync from 'browser-sync';
import watchify from 'watchify';
import babelify from 'babelify';
import uglify from 'gulp-uglify';
amochohan / 01_Laravel 5 Simple ACL
Last active Aug 29, 2019
Laravel 5 Simple ACL - Protect routes by an account / role type
View 01_Laravel 5 Simple ACL

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.


Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

timkinnane / dynamic_image_downsize.php
Created Feb 2, 2015
Filter the output of image_downsize() to return dynamically generated images for intermediate or inline sizes. Long description in php doc block.
View dynamic_image_downsize.php
* Filter the output of image_downsize() to return dynamically generated images for intermediate or inline sizes.
* <p>Because Wordpress generates all image sizes on first upload, if you change
* theme or size settings after the upload, there won't be a matching file for
* the requested size.<br/>
* This filter addresses the problem of the default downsize process laoding
* a large file and scaling it down in the browser if it doesn't find the right
* size image. This can cause large files to be loaded unnecessarily and will
wkw / WordPress On-Demand Custom Image Sizes
Created Aug 7, 2014
Add this to your WordPress functions.php if you are using many custom image sizes (add_image_size(...)) to prevent the creation of all the sizes upon image upload. This will only generate a custom size the first time it is requested.
View WordPress On-Demand Custom Image Sizes
/* ======================================================================================
//! -- On Demand Image Sizing --
Experimental code for generating custom image sizes on demand.
From the author...
"When an image is then requested in a particular size,
which is not yet generated, it will be created only that once."
====================================================================================== */
tillsanders / intro.markdown
Last active Sep 27, 2019
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)
You can’t perform that action at this time.