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
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 https://api.slack.com/web#authentication 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 = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@plowzzer
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];
@plowzzer
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)
View Máscaras Brasileiras JS
/* Máscaras ER */
function mascara(o,f){
v_obj=o
v_fun=f
setTimeout("execmascara()",1)
}
function execmascara(){
v_obj.value=v_fun(v_obj.value)
}
function mtel(v){
View HTTPS .htaccess Rewrite
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
View Share Social Media Wordpress
TWITTER:
<a href="http://twitter.com/home/?status=<?php the_title(); ?> - <?php the_permalink(); ?>" title="Tweet this!"></a>
FACEBOOK:
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>&amp;t=<?php the_title(); ?>" title="Share on Facebook."></a>
REDDIT:
<a href="http://www.reddit.com/submit?url=<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>" title="Vote on Reddit"></a>
STUMBLEUPON:
You can’t perform that action at this time.