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
#!/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 | |
} |
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 | |
function fix_links_content($content) | |
{ | |
if (is_single() && get_post_type() === 'post') { | |
$content = preg_replace_callback('(\/\?p=[0-9]*)', | |
'replace_query_string_url', $content); | |
} | |
return $content; |
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 | |
header('Content-type: text/plain; charset=utf-8'); | |
$myfile = fopen("output.txt", "w") or die("Unable to open file!"); | |
$tasks = [ | |
'one task', | |
'two task' | |
]; |
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
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') |