Skip to content

Instantly share code, notes, and snippets.

View salvatorecapolupo's full-sized avatar
🎯
Focusing

Salvatore Capolupo salvatorecapolupo

🎯
Focusing
View GitHub Profile
@salvatorecapolupo
salvatorecapolupo / auto-publish-wordpress.php
Last active May 24, 2022 07:36
Simple auto-publishing plugin, no backend, just set as you like :-) - Used i.e for https://lipercubo.it
<?PHP
/*
Plugin Name: Manual Autopublisher (no backend)
Plugin URI: https://capolooper.it
Description: Quickly and easily auto republish random old posts
Version: 0.1
Author: Salvatore
Author URI: https://capolooper.it
License: GPL2
*/
@salvatorecapolupo
salvatorecapolupo / form.html
Last active May 23, 2022 13:37
PHP utile, molto utile :-)
<html>
<head>
<title>FORM</title>
</head>
<body>
<h1>Inserimento cliente</h1>
<form method="post" action="insert-db.php"> <!-- importante! -->
<table border=1>
<tr>
@salvatorecapolupo
salvatorecapolupo / Esempio con Clienti e Fornitori
Last active May 23, 2022 11:20
Comandi SQL utili. Molto utili :-)
-- riepilogo della sintassi più importante in SQL
-- SQL inizia SEMPRE con ...
CREATE DATABASE nome_database;
CREATE TABLE Customers (
id INT AUTO_INCREMENT PRIMARY KEY,
CustomerName VARCHAR(60) NOT NULL,
ContactName VARCHAR(70) NOT NULL,
Address VARCHAR(100) NOT NULL,
<?PHP
// hide all errors / warning in WP, useful for production websites
// file: wp-config.php
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', false);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
@salvatorecapolupo
salvatorecapolupo / gist:43a96da67bf14f3f3c49dab767d3c8bc
Created July 18, 2021 14:21
Siti dedicati al betting / comparazione quote scommesse
Aggiornato al 18 luglio 2021
@salvatorecapolupo
salvatorecapolupo / palyndrome.js
Created February 22, 2022 09:55
Palyndrome dates generator (Javascript)
function palindrome(str) {
// Step 1. Lowercase the string and use the RegExp to remove unwanted characters from it
var re = /[\W_]/g; // or var re = /[^A-Za-z0-9]/g;
var lowRegStr = str.toLowerCase().replace(re, '');
// str.toLowerCase() = "A man, a plan, a canal. Panama".toLowerCase() = "a man, a plan, a canal. panama"
// str.replace(/[\W_]/g, '') = "a man, a plan, a canal. panama".replace(/[\W_]/g, '') = "amanaplanacanalpanama"
// var lowRegStr = "amanaplanacanalpanama";
// Step 2. Use the same chaining methods with built-in functions from the previous article 'Three Ways to Reverse a String in JavaScript'
@salvatorecapolupo
salvatorecapolupo / Ebook gratuiti per SEO e web-marketing in italiano
Last active July 18, 2021 12:36
Ebook per studiare la SEO ed il web marketing, in italiano. Lista aggiornata al 21 novembre 2019. Suggerisci una risorse (purchè sia gratuita) a s.capolupo@gmail.com, se ti va ;-)
We couldn’t find that file to show.
Elenco di guide che ho scritto e pubblicato sul web in questi anni.
@salvatorecapolupo
salvatorecapolupo / siti-guest-post
Last active March 5, 2021 10:44
Siti che ammettono guest post (aggiornata al 15 settembre 2019)
- fai.informazione.it (basta registrarsi gratuitamente)
- recesiti.wordpress.com (info s.capolupo@gmail.com)
- leultime.info (info s.capolupo@gmail.com)
- medium.com (basta registrarsi)
- linkedin.com (c'è un blog pubblico che si può attivare)
- comunicati.net (basta registrarsi)
- contenutigratis.altervista.org (basta registrarsi, soggetto a moderazione)
- comunicati-stampa.net (basta registrarsi, soggetto a moderazione)
@salvatorecapolupo
salvatorecapolupo / Hello world using Django
Created March 4, 2021 14:43
Come realizzare un semplice hello world usando Django.Per dettagli vedere la guida: https://trovalost.it/guida-django/
HelloWorld/
helloworld/
__init__.py
asgi.py
settings.py
urls.py
wsgi.py
manage.py
-------------------------------------