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 | |
# rm -f *.xml | |
# -bash: /bin/rm: Argument list too long | |
find . -name '*.xml' | xargs rm -f |
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
30 13 * * * /home/username/run-me.sh >/dev/null 2>&1 | |
0 * * * * curl --silent --compressed http://example.com/cron.php >/dev/null 2>&1 | |
crontab filename Install filename as your crontab file, | |
crontab -e Edit your crontab file, or create one if it doesn’t already exist. | |
crontab -l Display your crontab file. | |
crontab -r Remove your crontab file. | |
crontab -v Display the last time you edited your crontab file. |
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
#!/usr/local/php5/bin/php -q | |
// Note "-q" in shebang used to suppress header output | |
// PHP4: | |
// /usr/local/bin/php |
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
net stop wuauserv | |
net stop bits | |
net stop cryptsvc | |
ren %systemroot%\System32\Catroot2 oldcatroot2 | |
net start cryptsvc | |
ren %systemroot%\SoftwareDistribution SoftwareDistribution.old | |
regsvr32 wuapi.dll /s |
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
function getUrlVars() | |
{ | |
var vars = [], hash; | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from unicodedata import normalize | |
def remover_acentos(txt, codif='utf-8'): | |
''' Devolve cópia de uma str substituindo os caracteres | |
acentuados pelos seus equivalentes não acentuados. | |
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
javascript:void(document.body.contentEditable=(document.body.contentEditable!='true')) |
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
<script type="text/javascript"> | |
document.oncontextmenu = function(){return false} | |
document.onselectstart = function(){ | |
if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") | |
return false; | |
else | |
return true; | |
}; | |
if (window.sidebar){ |
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
RewriteEngine On | |
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC] | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ - [F] | |
-OR- | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L] |
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
function wpPostXMLRPC($title, $body, $rpcurl, $username, $password, $category, $keywords='', $encoding='UTF-8') { | |
$title = htmlentities($title,ENT_NOQUOTES,$encoding); | |
$keywords = htmlentities($keywords,ENT_NOQUOTES,$encoding); | |
$content = array( | |
'title'=>$title, | |
'description'=>$body, | |
'mt_allow_comments'=>0, // 1 to allow comments | |
'mt_allow_pings'=>0, // 1 to allow trackbacks | |
'post_type'=>'post', |
OlderNewer