Skip to content

Instantly share code, notes, and snippets.

View theodorocaliari's full-sized avatar
💻

Theodoro Caliari theodorocaliari

💻
View GitHub Profile
@theodorocaliari
theodorocaliari / git.md
Created October 19, 2020 11:20 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@theodorocaliari
theodorocaliari / Spotify crack.md
Created September 17, 2020 21:13
Spotify crack no ads
  • Mac: "/private/etc/hosts"
  • Windows: "C:\Windows\System32\drivers\etc\hosts"
0.0.0.0 adclick.g.doublecklick.net
0.0.0.0 adeventtracker.spotify.com
0.0.0.0 adnxs.com
0.0.0.0 adnxs.comadplexmedia.adk2x.com
0.0.0.0 ads-fa.spotify.com
0.0.0.0 ads.spotify.com
@theodorocaliari
theodorocaliari / git_svn_bash_prompt.sh
Created February 28, 2020 12:06 — forked from woods/git_svn_bash_prompt.sh
Set color bash prompt according to git/svn branch, and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
# USAGE:
@theodorocaliari
theodorocaliari / gist:bcb6d8fb2362860f0d88a70b1e39d0df
Created November 23, 2016 19:06 — forked from laras126/gist:1240755
filter gallery shortcode
<?php
// Filter the gallery shortcode defaults
// http://wordpress.stackexchange.com/questions/4343/how-to-customise-the-output-of-the-wp-image-gallery-shortcode-from-a-plugin
add_filter( 'post_gallery', 'my_post_gallery', 10, 2 );
function my_post_gallery( $output, $attr) {
global $post, $wp_locale;
static $instance = 0;
$instance++;
@theodorocaliari
theodorocaliari / wysiwyg-meta-box.php
Created November 3, 2015 12:12 — forked from bainternet/wysiwyg-meta-box.php
How to add a Wordpress WYSIWYG editor to a meta box.
<?php
define('WYSIWYG_META_BOX_ID', 'my-editor');
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different
define('WYSIWYG_META_KEY', 'extra-content');
add_action('admin_init', 'wysiwyg_register_meta_box');
function wysiwyg_register_meta_box(){
add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post');
}
/*!
* quantize.js Copyright 2008 Nick Rabinowitz.
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
// fill out a couple protovis dependencies
/*!
* Block below copied from Protovis: http://mbostock.github.com/protovis/
* Copyright 2010 Stanford Visualization Group
* Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php
# All Agents
User-agent: *
Disallow: /blogs.dir
Disallow: /cgi-bin
Disallow: /wp-content/cache
Disallow: /wp-content/languages
Disallow: /wp-content/mu-plugins
Disallow: /wp-content/plugins
Disallow: /wp-content/upgrade
Disallow: /wp-admin
<?php
/**
* Include the following code in your theme functions.php;
* but first you need to include PHP Console library using one of the methods
* described in PHP Console documentation.
*/
$phpConsole = PhpConsole\Handler::getInstance()->isStarted();
// This check makes sure PHP Console is instantiated only once.
if ( $phpConsole == false ) {
<?php
/*
Here's a couple of metaboxes that I've recently created using this system
*/
$subpostings = redrokk_metabox_class::getInstance('subpostings', array(
'title' => '(optional) Subscription for Postings',
'description' => "As an optional feature, you have a complete api at your disposal which will allow you the ability to offer and manage member posts. In addition to these settings, you may need to create the associated pages for accepting posts from your frontend.",
<?php
// Add Password, Repeat Password and Are You Human fields to WordPress registration form
// http://wp.me/p1Ehkq-gn
add_action( 'register_form', 'ts_show_extra_register_fields' );
function ts_show_extra_register_fields(){
?>
<p>
<label for="password">Password<br/>
<input id="password" class="input" type="password" tabindex="30" size="25" value="" name="password" />