Skip to content

Instantly share code, notes, and snippets.

View Mte90's full-sized avatar
Creating new open source stuff that you will like

Daniele Scasciafratte Mte90

Creating new open source stuff that you will like
View GitHub Profile
Mte90 / gitlab-ci.yml
Last active April 24, 2023 09:46
GitLab CI version for WPBP
image: jakzal/phpqa:alpine
- vendor/
- Code Quality
Mte90 /
Last active March 7, 2023 10:14
Calcolo buste paghe da PDF generati da Zucchetti
#!/usr/bin/env python3
from io import StringIO
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.pdfpage import PDFPage
from pdfminer.pdfparser import PDFParser
import sys
import os
Mte90 / WebSerial API test
Last active November 21, 2022 12:47
Firefox WebSerial API Test
Download from the development build with the WebSerial API
Mte90 / rss.opml
Last active May 26, 2022 08:36
My RSS feed
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<dateCreated>Thu, 26 May 2022 08:36:15</dateCreated>
<outline text="Altro">
<outline text="FuturoProssimo" type="rss" xmlUrl="" htmlUrl="" description="il domani quotidiano."/>
<outline text="MGMT Magazine" type="rss" xmlUrl="" htmlUrl="" description=""/>
Mte90 / dashboard-activity-cpt.php
Created September 18, 2015 11:27
Add your cpts to the Widget Activity of the Dashboard in WordPress
Plugin Name: Dashboard Widget Activity Custom Post Type
Plugin URI:
Author: Daniele Mte90 Scasciafratte
Version: 1.0.0
Author URI:
Mte90 / reddit.js
Last active February 18, 2022 11:33
Hide Youtube video from Reddit
// ==UserScript==
// @name Hide Youtube video from Reddit
// @namespace Mte90
// @match*
// @match*
// @grant none
// @version 1.0
// @author -
// @description As per title
// ==/UserScript==
Mte90 /
Last active January 25, 2022 11:27
Insultatore del server Discord dei redditor italiani
#!/usr/bin/env python3
from random import random, randint, choice, shuffle
import discord
from discord.ext import tasks
TOKEN = 'pensavichelomettessianchequavero?'
file = open('insulti.txt', 'r')
Mte90 /
Created December 20, 2021 10:48
Convert mIRC trivia.txt to LakeYS/Discord-Trivia-Bot
#!/usr/bin/env python3
import yaml
with open('trivia.txt', mode="r", encoding="latin-1") as f:
lines = f.readlines()
questions = {}
count = 0
for line in lines:
count += 1
Mte90 / Customfile
Last active December 10, 2021 14:55
2 new commands for VVV
class VVVScripts < Vagrant.plugin(2, :command)
def self.synopsis
"Execute script from /config/homebin/"
def execute
with_target_vms(nil, single_target: true) do |vm|
@env.ui.output "#{$yellow}Executing #{$red}#{ARGV[1]}#{$creset}\n"
vm.action(:ssh_run, ssh_run_command: "/srv/config/homebin/#{ARGV[1]}" )
Mte90 / snippet.php
Created April 30, 2020 16:50
W3TC generate minified filename by checksum
// Based on
// Get all the files, read them, concat them, get a md5 hash, cut at 10 and generate a new filename
// Why?
// W3TC generate the hashname based on the filenames so not invalidate the cache if there are changes
add_filter('w3tc_minify_urls_for_minification_to_minify_filename', 'w3tc_filename_filter', 20, 3);
function w3tc_filename_filter($minify_filename, $files, $type ){
$path_parts = pathinfo( $minify_filename );
$content = '';