View gitlab-ci.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: jakzal/phpqa:alpine | |
cache: | |
paths: | |
- vendor/ | |
stages: | |
- Code Quality | |
coding-standards: |
View calcolo-tasse-bustepaghe.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View WebSerial API test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download from https://bugzilla.mozilla.org/show_bug.cgi?id=926940 the development build with the WebSerial API | |
Screenshot: https://plus.google.com/u/0/+DanieleScasciafratteMte90Net/posts/EED6sbEt2zv |
View rss.opml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="2.0"> | |
<head> | |
<title>FreshRSS</title> | |
<dateCreated>Thu, 26 May 2022 08:36:15</dateCreated> | |
</head> | |
<body> | |
<outline text="Altro"> | |
<outline text="FuturoProssimo" type="rss" xmlUrl="https://www.futuroprossimo.it/feed/" htmlUrl="https://www.futuroprossimo.it/" description="il domani quotidiano."/> | |
<outline text="MGMT Magazine" type="rss" xmlUrl="http://feeds.feedburner.com/MgmtMagazine" htmlUrl="https://mgmtmagazine.com/" description=""/> |
View dashboard-activity-cpt.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Dashboard Widget Activity Custom Post Type | |
Plugin URI: | |
Description: | |
Author: Daniele Mte90 Scasciafratte | |
Version: 1.0.0 | |
Author URI: http://mte90.net | |
*/ |
View reddit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Hide Youtube video from Reddit | |
// @namespace Mte90 | |
// @match https://reddit.com/* | |
// @match https://www.reddit.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description As per title | |
// ==/UserScript== |
View insultatore.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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') |
View convert.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View Customfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VVVScripts < Vagrant.plugin(2, :command) | |
def self.synopsis | |
"Execute script from /config/homebin/" | |
end | |
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]}" ) | |
end |
View snippet.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Based on https://wordpress.org/support/topic/how-to-change-minified-css-file-name/ | |
// 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 = ''; |
NewerOlder