Skip to content

Instantly share code, notes, and snippets.

View protorob's full-sized avatar

protorob

View GitHub Profile
@protorob
protorob / style.css
Last active June 20, 2023 21:38
Artomultiplo's Generatepress Woocommerce Starter Child
/*
Theme Name: Artomultiplo GP Child
Template: generatepress
Theme URI: https://generatepress.com
Author: Roberto Enrique Briceno Garcia
Author URI: https://artomultiplo.eu
Description: A woocommerce optimized GP child
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@protorob
protorob / cart.php
Created October 29, 2019 17:26
Artomultiplo's Generatepress Cart Mods (cart.php)
<?php
/**
* Cart Page
*
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@protorob
protorob / artowoo.sh
Last active March 13, 2020 08:38
Bash Sript to Automate the Configuration of the Artomultiplo's Woocommerce Starter Kit
#!/bin/bash -e
# Start allways the same
wpuser='yourusername'
wpuseremail='yourname@yourdomain.tld'
wpuserpass=$(date +%s | sha256sum | base64 | head -c 16)
dpprefix=$(date +%s | sha256sum | base64 | head -c 6)
clear
@protorob
protorob / woocommerce-add-sku-on-order.php
Created December 27, 2019 16:50
Add SKU to items in order email - woocommerce
function artomultiplo_add_sku_woocommerce_emails( $output, $order ) {
// set a flag so we don't recursively call this filter
static $run = 0;
// if we've already run this filter, bail out
if ( $run ) {
return $output;
}
@protorob
protorob / scrap.py
Created November 21, 2019 17:53
Scrapper for a website
# Import libraries
import requests
from bs4 import BeautifulSoup
website = 'https://www.sito.it/bombon/bomboniere-matrimonio.html?p='
output_file = open('bomboniere.csv', 'w+')
counter = 1
@protorob
protorob / remove-bg-from-files-in-a-folder.py
Last active May 14, 2019 09:17
A simple Python script to batch remove backgrounds from images in a directory
# This script asumes that you have two directories
# One directory called "origin" with your original images
# Another directory valled "results" that is going to be filled with your processed images :-)
# The name of the directories should be exactly like that "origin" and "results" respectively
# The script also need a remove.bg API key, so you should get one of those
# https://www.remove.bg/api
# it also require "requests" to be installed (see python-requests.org)
import requests
import os
@protorob
protorob / findwords.py
Last active May 2, 2019 08:36
Python scrypt for finding pairs of words that behave in curious ways
#inserire il file del vocabolario
words = open("zingarelli.txt", "r")
# cambiare questo valore per stabilire il numero di lettere delle parole (dev'essere un numero % 2 = 0)
maxlenght = 6
wordarray = []
for word in words:
if len(word) == maxlenght + 1:
import html
just_open = open('art.csv', 'r')
output_file = open('freshnclean.csv', 'w')
i = 0
for row in just_open:
if (i >= 0 and i < 5000):
lariga = html.unescape(row)
// ==UserScript==
// @name Get div contents and print it to console on OAM course
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.myatoma.com/Simulatore/*
// @require https://code.jquery.com/jquery-2.2.4.min.js
// ==/UserScript==
@protorob
protorob / standardplugs.sh
Last active January 28, 2019 19:14
Standard Plugin Install for WP-CLI
#!/bin/bash -e
# Defining Database Variables:
echo "=================================================================="
echo "We're going to install the standard plugins and Generatepress:"
echo "Plugins to be installed in no particular order:"
echo " - The Seo Framework"
echo " - SiteOrigin Page Builder with Official Extra Widgets and Livemesh ones"
echo " - Widget CSS Classes"