Skip to content

Instantly share code, notes, and snippets.

View juliocapuano's full-sized avatar
🏠
Working from home

Julio Alberto Capuano juliocapuano

🏠
Working from home
  • Lima, Perú
View GitHub Profile
@juliocapuano
juliocapuano / batch_ocr.gs
Created April 18, 2023 13:49 — forked from kltng/batch_ocr.gs
Google Apps script for performing OCR on all JPEGS found in the specified Drive folder. Extracts text to a Google sheet, where it's mapped to the JPEG's filename.
function extractTextOnOpen() {
//ADD YOUR VALUES BELOW
var folderName = "[YOUR PROJECT FOLDER]";
var sheetId = "[YOUR SHEET ID]";
//Define folder
var folder = DriveApp.getFoldersByName(folderName).next();
var folderId = folder.getId();
@juliocapuano
juliocapuano / migrateorders.php
Created April 3, 2023 16:30 — forked from cfaria/migrateorders.php
Migrate WooCommerce Orders
<?php
//increase max execution time of this script to 150 min:
ini_set('max_execution_time', 9000);
//increase Allowed Memory Size of this script:
ini_set('memory_limit','960M');
// Copies woocommerce orders and users over from source to target.
// I use this on my local machine - loading both db's up there side by side
// could easily adjust the connect strings to connect elsewhere if needed.
@juliocapuano
juliocapuano / composer
Created March 5, 2023 03:41 — forked from matriphe/composer
Composer shell alias to run Composer Docker
#!/bin/bash
docker run \
--interactive \
--rm \
--user $(id -u):$(id -g) \
--volume ~/.composer:/tmp \
--volume /etc/passwd:/etc/passwd:ro \
--volume /etc/group:/etc/group:ro \
--volume $(pwd):/app \
composer "$@"
@juliocapuano
juliocapuano / pagespeed_optimize_images.sh
Created November 11, 2021 23:38 — 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 {} \;
@juliocapuano
juliocapuano / img2ico.php
Created July 31, 2021 19:09 — forked from goncalomb/img2ico.php
Function to create ICO images using the GD library in PHP.
<?php
// Author: Gonçalo Baltazar <me@goncalomb.com>
// I place this code in the public domain.
/**
* Output an ICO image to either the standard output or a file.
*
* It takes the same arguments as 'imagepng' from the GD library. Works by
* creating a ICO container with a single PNG image.
* This type of ICO image is supported since Windows Vista and by all major
@juliocapuano
juliocapuano / laravelmailsettings.txt
Created March 5, 2021 20:47 — forked from BenjaminDurham/laravelmailsettings.txt
Laravel .env Mail settings for app hosted on Linux with GoDaddy workspace email.
.env settings
----------------------------------------------
MAIL_DRIVER=mail
MAIL_HOST=localhost
MAIL_PORT=25
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null
Other info
Get the information of PHP
==========================
$ sudo apt show php
OR
$ sudo apt show php -a
$ sudo apt install php // this will install default php version ( may be 7.2 )
T0 Install Different Versions Of PHP
@juliocapuano
juliocapuano / README.md
Created December 9, 2020 02:25 — forked from denji/README.md
Simple Sentry docker-compose.yml
  1. Download docker-compose.yml to dir named sentry
  2. Change SENTRY_SECRET_KEY to random 32 char string
  3. Run docker-compose up -d
  4. Run docker-compose exec sentry sentry upgrade to setup database and create admin user
  5. (Optional) Run docker-compose exec sentry pip install sentry-slack if you want slack plugin, it can be done later
  6. Run docker-compose restart sentry
  7. Sentry is now running on public port 9000
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel