Skip to content

Instantly share code, notes, and snippets.

View hawkapparel's full-sized avatar

Christian Tamayo hawkapparel

View GitHub Profile
When you setup WP you (the webserver) may need write access to the files. So the access rights may need to be loose.
chown www-data:www-data -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r--
After the setup you should tighten the access rights, according to Hardening WordPress all files except for wp-content should be writable by your user account only. wp-content must be writable by www-data too.
| Name | Location | permission |
| ------ | ---------- | -----------: |
| Name | ./ | permission |
| Name | ./wp-includes/ | permission |
| ------ | ------ | -----: |
| Cell | Cell | $10 |
| Cell | Cell | $20 |

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

upload_max_filesize=100M (Default 2M)
memory_limit=128M (Default 16M) (En caso de que no le de el tiempo de procesar un archivo tan grande)
post_max_size=100M (Default 8M)
memorystorage
http://stackoverflow.com/questions/7267354/javascript-memory-and-html5-localstorage-limitations-on-smartphones
// by default it takes ua string from current browser's window.navigator.userAgent
var parser = new UAParser(),
result = parser.getResult();
if(result.device.type == undefined) {
console.log('PC');
window.location.href = "http://www.movistar.com.pe/hogar/tv/gol-peru-cmd/-/tab/app-futbol-movistar";
}
else if(result.device.type == 'mobile' || result.device.type == 'tablet') {
console.log('Mobile/Tablet');
//SCRIPT PARA CAMBIAR URLS EN WORDPRESS
//Con este script se actualiza las urls de la BD cuando se cambia de servidor un proyecto wordpress
//UPDATE wp_posts SET guid = replace(guid, 'URL_ACTUAL','URL_LOCAL');
UPDATE wp_posts SET guid = replace(guid, 'http://tuurldeproduccion.com.pe/','http://localhost/tuproyecto');
UPDATE wp_posts SET post_content = replace(post_content, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto');
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto');
UPDATE wp_options SET option_value = replace(option_value, 'http://tuurldeproduccion.com.pe/', 'http://localhost/tuproyecto')
WHERE option_name = 'home' OR option_name = 'siteurl';
var a = [];
for (var i = 0; i < 152; i++) {
if (i <= 9){
console.log("menor o igual a 9");
a[i] = $("<a class='wawa'>").attr("href","http://www.serebii.net/pokemongo/pokemon/00" + i + ".png").attr("download","img.png").appendTo("body");
//saveFile("http://www.serebii.net/pokemongo/pokemon/00" + i + ".png");
}
if (i > 9 && i <= 99){
console.log("decenas");
a[i] = $("<a class='wawa'>").attr("href","http://www.serebii.net/pokemongo/pokemon/0" + i + ".png").attr("download","img.png").appendTo("body");