Skip to content

Instantly share code, notes, and snippets.


Rodolfo Buaiz brasofilo

View GitHub Profile
brasofilo / nginx.conf
Created May 10, 2020 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
brasofilo /
Created Nov 14, 2018 — forked from tzmartin/
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')[OFFICE_FILE_URL]

<iframe src='[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>

OneDrive Embed Links

View WordPress Shortcode with ob_start()
function custom_query_shortcode($atts) {
// [loop the_query="showposts=100&post_type=page&post_parent=453"]
// Defaults
"the_query" => ''
), $atts));
View gist:a79aedb18fb55510ab4d
Plugin Name: Post Meta Revisions
Description: Revisions for the 'foo' post meta field
Version: 1.0
Author: John Blackbourn
Plugin URI:
View jGfeed.js
* jGFeed 1.0 - Google Feed API abstraction plugin for jQuery
* Copyright (c) 2009 jQuery HowTo
* Licensed under the GPL license:
* URL:
View repeatable-fields.php
add_action('admin_init', 'add_meta_boxes', 1);
function add_meta_boxes() {
add_meta_box( 'repeatable-fields', 'Audio Playlist', 'repeatable_meta_box_display', 'post', 'normal', 'high');
function repeatable_meta_box_display() {
global $post;

#Stay Standalone

A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.

View gist:6398219
<input type="text" name="my-theme-options[color]" id="color" />
<input type='button' class='pickcolor button-secondary' value='Select Color'>
<div id='colorpicker' style='z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;'></div>
// Color Picker for js file
$('.pickcolor').click( function(e) {
colorPicker = jQuery(this).next('div');
input = jQuery(this).prev('input');
View plugin-class-demo.php
<?php # -*- coding: utf-8 -*-
* Plugin Name: Plugin Class Demo
* Description: How I am using the base class in plugins.
* Plugin URI:
* Version: 2012.09.29
* Author: Thomas Scholz
* Author URI:
* License: GPL
* Text Domain: plugin_unique_name
View t5-wp-load-order.php
* Plugin Name: T5 WP Load Order
* Description: Hooks into every action and creates a list of available variables, constants, functions, classes and files.
* Plugin URI:
* Version: 2012.11.05
* Author: Thomas Scholz
* Author URI:
* Licence: MIT
* License URI:
You can’t perform that action at this time.