Skip to content

Instantly share code, notes, and snippets.

View pedropxm's full-sized avatar

Pedro Mendonça pedropxm

  • Florianópolis, Brazil
View GitHub Profile
@pedropxm
pedropxm / wp-config.php
Created July 1, 2015 17:58
Wordpress domain config
<?php
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
$url = str_replace('/wp-admin','',"http://". $host. $uri."/");
define('WP_HOME',$url);
define('WP_SITEURL',$url);
@pedropxm
pedropxm / functions.php
Last active August 29, 2015 14:21
Wordpress admin custom CSS
function custom_css() {
echo '<style type="text/css">
/* styles here */
</style>';
}
add_action('admin_head', 'custom_css');
@pedropxm
pedropxm / .htaccess
Last active August 29, 2015 14:16
.htaccess redirect to subdir
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/site/
RewriteRule ^(.*) /site/$1 [L]
@pedropxm
pedropxm / hosts
Created July 10, 2014 12:04
Hosts para bloquear ativação da Adobe
# copyright (c) 1993-2009 microsoft corp.
#
# this is a sample hosts file used by microsoft tcp/ip for windows.
#
# this file contains the mappings of ip addresses to host names. each
# entry should be kept on an individual line. the ip address should
# be placed in the first column followed by the corresponding host name.
# the ip address and the host name should be separated by at least one
# space.
#
@pedropxm
pedropxm / wpcf7.css
Last active December 22, 2015 16:09
Contact Form 7 - Messages CSS
.wpcf7-validation-errors {
border: 0 none !important;
color: #77556A;
display: block !important;
font-size: 14px;
margin: 0 !important;
padding: 10px !important;
}
.wpcf7-mail-sent-ok {
background-color: #FFFFFF;
@pedropxm
pedropxm / estadao.bookmarklet
Last active December 11, 2015 23:58
Bookmarklet para paywall do Estadão
javascript:(function(){var newcss='html{overflow:auto !important;} #pw-mask{display:none !important} #pw-content{display:none !important}';if("\v"=="v"){document.createStyleSheet().cssText=newcss}else{var tag=document.createElement("style");tag.type="text/css";document.getElementsByTagName("head")[0].appendChild(tag);tag[(typeof document.body.style.WebkitAppearance=="string")?"innerText":"innerHTML"]=newcss}})();