Skip to content

Instantly share code, notes, and snippets.

View andreacoi's full-sized avatar
🎯
Focusing

Andrea Coi andreacoi

🎯
Focusing
View GitHub Profile
@andreacoi
andreacoi / hosts
Created March 31, 2022 08:36 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@andreacoi
andreacoi / .zshrc
Created December 27, 2021 18:49
ZSH - Kali Linux like configuration file
# ~/.zshrc file for zsh interactive shells.
# see /usr/share/doc/zsh/examples/zshrc for examples
setopt autocd # change directory just by typing its name
#setopt correct # auto correct mistakes
setopt interactivecomments # allow comments in interactive mode
setopt magicequalsubst # enable filename expansion for arguments of the form ‘anything=expression’
setopt nonomatch # hide error message if there is no match for the pattern
setopt notify # report the status of background jobs immediately
setopt numericglobsort # sort filenames numerically when it makes sense
SELECT
customer.id_customer AS `ID Cliente`,
CONCAT(LEFT(customer.`firstname`, 1), '. ', customer.`lastname`) AS `Cliente`,
address.city AS `Città`,
address.postcode AS `CAP`,
country_lang.name as `Paese`,
pso.`date_add` AS `Data ordine`,
pso.`reference` AS `ID Ordine`,
#cname.name AS `Categoria`,
product_name AS `Prodotto Acquistato`,
@andreacoi
andreacoi / order-list-ps1624.sql
Last active January 22, 2021 08:29
SQL file per la visualizzazione degli ordini in un range di tempo determinato. PS 1.6.24
SELECT SQL_CALC_FOUND_ROWS
CONCAT(LEFT(c.`firstname`, 1), '. ', c.`lastname`) AS `Cliente`,
`reference` AS `ID Ordine`,
`total_paid_tax_incl` AS `Totale Pagato`,
address.city AS `Città`,
address.postcode AS `CAP`,
country_lang.name as `Paese`,
a.`date_add` AS `Data ordine`,
osl.`name` AS `Status`
FROM `ps_orders` a
@andreacoi
andreacoi / tar-it.php
Created October 29, 2019 08:02
Script to tar all files recursively in a webdir.
<?php
/******************************************************************************************************************
* Source: http://www.emvee-solutions.com/blog/create-tar-files-archive-files-server-using-php-script/
*
* Please note that the script wil by default tar all files and (sub)folders from the directory you uploaded the script to
* into a file named archive.tar. You can overwrite the directory and archive name by calling the script with your own
* parameters, like this (replace the italic text for your own needs):
*
* http://domain.com/archive.php?targetname=achivename.tar&dir=relative/folder/to/put/in/archive/
******************************************************************************************************************/