Skip to content

Instantly share code, notes, and snippets.

View viniciusbig's full-sized avatar

Vinicius Arantes viniciusbig

  • CI&T
  • Campinas - SP - Brazil
View GitHub Profile
@viniciusbig
viniciusbig / pagespeed_optimize_images.sh
Created June 19, 2020 14:17 — forked from julianxhokaxhiu/pagespeed_optimize_images.sh
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/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 {} \;
@viniciusbig
viniciusbig / dropboxOrganize.py
Created May 18, 2020 23:51 — forked from dansku/dropboxOrganize.py
Script to organize pictures uploaded from Mobile Devices to Dropbox's Camera Upload folder
################################################################################################
#
# Script to organize pictures uploaded from Mobile Devices to Dropbox's Camera Upload folder
#
# Daniel Spillere Andrade - www.danielandrade.net
#
################################################################################################
import os, time
import glob
@viniciusbig
viniciusbig / frete-gratis.txt
Created October 24, 2019 17:03 — forked from pauloiankoski/frete-gratis.txt
Frete grátis por região no WooCommerce
Para quem quiser liberar Frete Grátis por cidade/região faça o seguinte:
Na administração do seu site clique na barra lateral esquerda em
WooCommerce>Configurações>Entrega>Entrega Local
1º Ative a entrega local
2º Altere o titulo para: Frete Grátis
@viniciusbig
viniciusbig / wp-start.sh
Created September 20, 2019 18:34 — forked from ethicka/wp-start.sh
WordPress Installation with the Roots/Sage Framework and VirtualHost Creation
#!/bin/bash -e
##
# WordPress Installation and VirtualHost Creation
#
# Description: Installs a WordPress website in the ~/Sites folder, creates a homepage,
# cleans up the WP install a bit, deletes the akismet and hello dolly plugins, creates the permalinks,
# clones the roots/sage theme framework to the theme folder, deletes all the other WP default themes,
# installs/runs npm and bower and runs gulp to create the initial assets, adds a custom gitignore file
# to /wp-content, installs the roots/soil plugin, creates a git repo in wp-content, saves the WordPress
@viniciusbig
viniciusbig / 80-keychron.rules
Created September 4, 2019 17:26 — forked from ercoppa/80-keychron.rules
K2 Keychron Ubuntu 18.04
SUBSYSTEMS=="input", ATTRS{name}=="Keychron K2", RUN+="/bin/sh -c 'echo 0 > /sys/module/hid_apple/parameters/fnmode'"
@viniciusbig
viniciusbig / wp.sh
Created January 16, 2019 21:36 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
<?php
/*
Increase or decrease value in CakePHP with little footprint.
Add this to your AppModel.
Usage:
(in Controller)
$this->Model->increase('field_name', 1);
@viniciusbig
viniciusbig / deploy.php
Created September 13, 2018 17:37 — forked from sakanaproductions/deploy.php
PHP Deployer Config File for VPS on Dreamhost
<?php
namespace Deployer;
require 'recipe/laravel.php';
// Project name
set('application', '');
// Project repository
set('repository', 'git@bitbucket.org');
@viniciusbig
viniciusbig / dreamhost-php.md
Created August 9, 2018 01:46 — forked from nissicreative/dreamhost-php.md
Update PHP and install Composer on DreamHost

DreamHost PHP

Make PHP 7 default binary for CLI

ssh <server>
@viniciusbig
viniciusbig / gist:722ca4d79150a031e554a2887a8f9677
Created July 31, 2018 22:26 — forked from diegoprates/gist:5047663
Tradução do jQuery validation plugin oara pt-BR. By https://gist.github.com/FernandoVezzali.
/*
* 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.",