Skip to content

Instantly share code, notes, and snippets.

View Maurisss94's full-sized avatar
🎯
Focusing

Mauro Balestra Maurisss94

🎯
Focusing
View GitHub Profile
@Maurisss94
Maurisss94 / switch_php_version.sh
Created March 5, 2020 09:19
Script to change rapidly the php version, from x version to y version
#!/bin/bash
showHelp() {
echo ""
echo Missing parameters, Needs two parameters -f --from PHP version, and -t --to PHP version
echo -e '\t' Example:
echo -e '\t' $0 -f 5.6 -t 7.3
exit 1
}
@Maurisss94
Maurisss94 / fix_content_links.php
Last active September 27, 2019 06:43
Replace small links inside the content Wordpress with the permalink
@Maurisss94
Maurisss94 / latex_list.php
Created August 25, 2019 09:47
Generate a text file with a latex formatted list
<?php
header('Content-type: text/plain; charset=utf-8');
$myfile = fopen("output.txt", "w") or die("Unable to open file!");
$tasks = [
'one task',
'two task'
];
@Maurisss94
Maurisss94 / json_to_csv.py
Created May 16, 2019 11:48
Create a csv, from json files.
import json
import csv
import os, os.path
dir_json = './json'
data = {}
for directory, subdirs, files in os.walk(dir_json):
for filename in files:
filepath = os.path.join(directory, filename)
f = open(filepath, 'r')