This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**********************************************/ | |
/* | |
/* Darker Skin by Darcy Clarke - 2011 | |
/* | |
/* For how to install, or more themes, check out: | |
/* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* | |
/* Color scheme is based on Joe Bergantine's Specials Board: | |
/* http://joebergantine.com/werkstatt/seestyle | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure these directives are either above the "BEGIN WordPress" | |
# line or below the "END WordPress" line. Also, make sure you test | |
# your site if you use any of the suggestions below. These rules | |
# are very specific to running WordPress so if you also serve some other | |
# static or PHP files under the directory where these rules will live | |
# you may find they won't work. TEST TEST TEST. | |
# disable directory browsing | |
Options All -Indexes | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wp_restrict_editing( $allcaps, $cap, $args ) { | |
//Only for non Admin users | |
if(!current_user_can('administrator')) { | |
// Load the post data: | |
$post = get_post( $args[2] ); | |
// Bail out if the post isn't published' | |
if( 'publish' != $post->post_status) | |
return $allcaps; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function post_type_dir( $param ){ | |
$screen = get_current_screen(); | |
$mydir = '/'.$screen->post_type; | |
$param['path'] = $param['path'] . $mydir; | |
$param['url'] = $param['url'] . $mydir; | |
return $param; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install xcode via App Store first! It takes awhile | |
# install the command-line tools as well | |
# install growl from App Store | |
# eclipse/android | |
open http://www.eclipse.org/downloads/packages/eclipse-classic-42/junor | |
open http://developer.android.com/tools/sdk/eclipse-adt.html | |
# homebrew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_FILES["source"]["name"])) | |
{ | |
try { | |
$facebook->setFileUploadSupport(true); | |
$response = $facebook->api( | |
'/me/photos/', | |
'post', | |
array( | |
'message' => $_POST['message'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app->post('/api/authenticate/authorize/', function() use($app) { | |
$data = $app['request']->get('data'); | |
print_r(array('data' => $data)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Com JQuery */ | |
if( $('#id_do_elemento').length ) { | |
//Codigo | |
} | |
/* metodo tradicional sem JQuery */ | |
if(document.getElementById('id_do_elemento') != null) | |
{ | |
//Codigo | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cp -rfv /etc/zypp/repos.d /etc/zypp/repos.d.old | |
sed -i 's/11.4/12.1/g' /etc/zypp/repos.d/* | |
zypper ref && zypper dup |