Gianluigi "A35G"

Web Developer, PHP Coder & Martial Arts addict

Often one needs to develop, for business or other, scripts or functionality to integrate or interact with projects developed by other coders.

On this page, I will share scripts or pieces of code that I hope will be of help to someone.

Check Google FCM Token

Is your device's Token for Push Notifications valid yet? Check it out now!

Hosted on: Gist - Language: PHP



Code base for an Easter Egg

Pieces of code useful for sketching an easter egg in a website or a web app.
By entering a word or a sequence of characters / symbols / or other, it is possible to perform a function if the condition is true; In case of 5 second pause between typing and the other, the sequence is emptied.

Hosted on: JSFIDDLE - Language: Javascript



CSV to VCF - Convert file for import Contacts

Transform a CSV file with contacts generated from an old Android in a VCF files to import them into the new device.

Hosted on: Gist - Language: PHP



Base URL

Get the address of the website or web application.

Hosted on: Gist - Language: Javascript



Custom Script to manage Error Log

A script useful for keeping track of log and error, on servers that do not provide them to its users.

Hosted on: Gist - Language: PHP



Script to calculate exactly a date for tax payments in Italy

Through a date given as input, it returns the same date or the first date to make a payment by a deadline.

A check is performed on the specified date, to see if the same appears as Italian festivity.

Hosted on: Gist - Language: PHP



How to detect if an external library has loaded

Useful for small or large projects, to create widget or script to be integrated into third party pages.

This script, as an example, checks to see whether the jQuery library has loaded and otherwise shall load the library in the page.

Hosted on: JSFIDDLE / Gist - Language: JavaScript - Library: No-Library



Custom HTML Forms and buttons into Bootbox Dialog

If one needs to understand how to interact with the dialog of Bootbox to create a custom window, this is the code for you.

The example creates a dialog with three 'input radio' and two buttons...one of these buttons is enabled only when you select one of the 'input radio' and based on your choice, you will have different answers to video.

Hosted on: JSFIDDLE - Language: JavaScript - Library: jQuery, Bootstrap, Bootbox



Create and append fields dynamically

Create, append and remove fields dynamically with jQuery

Hosted on: JSFIDDLE - Language: JavaScript - Library: jQuery



Search and replace words with blacklist

Search and replace words (using random characters) contained in a text, using blacklists

Hosted on: Gist - Language: PHP



Check Link and Filter text

A function simple and quick for a dummy control on a text for the presence of any link.
Useful for a first check on the body of an e-mail composed by a contact form.

Hosted on: Gist - Language: PHP



Taggable options by Select2

Example of using Select2.

Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.

Hosted on: JSFIDDLE - Language: JavaScript - Library: jQuery, Select2



Order anchors list from content page with search

Dynamic lists with title/text by content div/page with search.

Hosted on: JSFIDDLE - Language: JavaScript - Library: jQuery

Web Developer, PHP Coder & Martial Arts addict

Living in the amazing South of Italy: Salento.