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
function remove_core_updates(){ | |
global $wp_version; | |
return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,); | |
} | |
add_filter('pre_site_transient_update_core','remove_core_updates'); | |
add_filter('pre_site_transient_update_plugins','remove_core_updates'); | |
add_filter('pre_site_transient_update_themes','remove_core_updates'); |
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
UPDATE wp_posts SET post_content = REPLACE(post_content, 'olddomain.com', 'newdomain.com'); | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'olddomain.com', 'newdomain.com'); | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'olddomain.com', 'newdomain.com'); |
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
Blob([document.getElementById('myWorker').textContent], { | |
type: "text/javascript" | |
}); | |
myWorker = new Worker(window.URL.createObjectURL(workerData)); | |
myWorker.onmessage = function (e) { | |
console.log('Counting...', event.data); | |
}; |
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
<script id="myWorker"> | |
var i = 0; | |
setInterval(function() { | |
i++; | |
postMessage(i); | |
}, 1000); | |
</script> |
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
//stepsToBeMade.js | |
postMessage("So long, and thanks for all the fish."); |
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
var myWorker = new Worker('/path/operazioniDaEseguire.js'); | |
myWorker.onmessage = function(event) { | |
console.log('Fatto, ecco i dati!', event.data); | |
}; |
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 | |
if (isset($_POST['image'])) { | |
file_put_contents("uploads/".rand().".png",base64_decode(str_replace("data:image/png;base64,","", $_POST['image']))); | |
echo 'Upload completed!'; | |
} | |
?> |
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
function doUpload() { | |
var file = document.getElementById('fileToUpload').files[0]; | |
var dataUrl = ""; | |
// Create an image | |
var img = document.createElement("img"); | |
// Create a file reader | |
var reader = new FileReader(); | |
// Set the image once loaded into file reader | |
reader.onload = function(e) | |
{ |
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 | |
if (isset($_FILES['myFile'])) { | |
// Example: | |
move_uploaded_file($_FILES['myFile']['tmp_name'], "uploads/" . $_FILES['myFile']['name']); | |
echo 'Upload completed!'; | |
} | |
?> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Take or select photo(s)</title> | |
<script type="text/javascript"> | |
function fileSelected() { | |
var count = document.getElementById('fileToUpload').files.length; | |
document.getElementById('details').innerHTML = ""; | |
for (var index = 0; index < count; index ++) | |
{ |