Skip to content

Instantly share code, notes, and snippets.

Pedro Pizzo de Paula plowzzer

Block or report user

Report or block plowzzer

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
plowzzer / slack_delete.rb
Created Apr 15, 2016 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from into the token quotes at the top of the file.
View slack_delete.rb
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = ( - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
plowzzer / breadcrumbs.php
Created Jul 28, 2016
Breadcrumbs in Wordpress
View breadcrumbs.php
<?// Breadcrumbs
function my_breadcrumbs() {
// Settings
$separator = '<i class="fa fa-angle-right" aria-hidden="true"></i>';
$breadcrums_id = 'breadcrumbs';
$breadcrums_class = 'breadcrumbs';
$home_title = 'Início';
// If you have any custom post types with custom taxonomies, put the taxonomy name below (e.g. product_cat)
plowzzer / navigation_menu_active.php
Last active Sep 9, 2016
Post Type Menu "active"
View navigation_menu_active.php
add_action('nav_menu_css_class', 'add_current_nav_class', 10, 2 );
function add_current_nav_class($classes, $item) {
// Getting the current post details
global $post;
// Getting the post type of the current post
$current_post_type = get_post_type_object(get_post_type($post->ID));
$current_post_type_slug = $current_post_type->rewrite[slug];
View Máscaras Brasileiras JS
/* Máscaras ER */
function mascara(o,f){
function execmascara(){
function mtel(v){
View HTTPS .htaccess Rewrite
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
View Share Social Media Wordpress
<a href="<?php the_title(); ?> - <?php the_permalink(); ?>" title="Tweet this!"></a>
<a href="<?php the_permalink();?>&amp;t=<?php the_title(); ?>" title="Share on Facebook."></a>
<a href="<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>" title="Vote on Reddit"></a>
You can’t perform that action at this time.