Skip to content

Instantly share code, notes, and snippets.

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

Enrico Succhielli telefonosuci

🏠
Working from home
  • Alpenite
  • Arezzo
View GitHub Profile
@telefonosuci
telefonosuci / observer_script.txt
Last active September 8, 2023 08:35
Print trace when a node of a specific type is appended to the dom
<script>
const checkNodeType = Node.COMMENT_NODE;
const observer = new MutationObserver((mutationsList, observer) => {
for (const mutation of mutationsList) {
if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
for (const addedNode of mutation.addedNodes) {
if (addedNode.nodeType === checkNodeType) {
@telefonosuci
telefonosuci / css-lego-minifigure-maker.markdown
Created January 29, 2019 09:29
CSS LEGO Minifigure Maker

CSS LEGO Minifigure Maker

Swap heads, change colors, take it apart, and rebuild it! #LegoLove

A Pen by Josh Bader on CodePen.

License.

@telefonosuci
telefonosuci / index.html
Created December 24, 2018 19:09
🍕 Pizza Loader 🍕
<svg viewBox="0 0 122 122" xmlns="http://www.w3.org/2000/svg">
<defs>
<g class="whole" id="pizza">
<circle cx="61" cy="61" r="61" fill="#FFB800"/>
<circle cx="61" cy="61" r="55" fill="#FFDE31"/>
<g fill="#CD2D36" stroke="#FEA202" stroke-miterlimit="10" stroke-width="2">
<circle cx="61" cy="29.11" r="8" />
<circle cx="38.45" cy="38.45" r="8" />
<circle cx="29.11" cy="61" r="8" />
<circle cx="38.45" cy="83.55" r="8" />
@telefonosuci
telefonosuci / index.html
Last active September 6, 2018 15:33
Responsive Table Demo
<style>
/*
Max width before this PARTICULAR table gets nasty. This query will take effect for any screen smaller than 760px and also iPads specifically.
*/
@media only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
/* Force table to not be like tables anymore */
table,
thead,
@telefonosuci
telefonosuci / filedb.php
Created January 17, 2018 16:46
Read data from file txt
<?php
$my_database_txt = 'numeri.txt';
$array_righi = file($my_database_txt);
print_r( $array_righi);
$A=explode("|",$array_righi[0]);
$B=explode("|",$array_righi[1]);
$C=explode("|",$array_righi[2]);
@telefonosuci
telefonosuci / mysql.php
Created January 17, 2018 16:44
PHP MySQL connection and select
<?php
// Create connection
$conn = new mysqli("localhost", "root", "");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}