Skip to content

Instantly share code, notes, and snippets.

View morehawes's full-sized avatar
🌈

Joe Hawes morehawes

🌈
View GitHub Profile
@morehawes
morehawes / wordpress_change_url.sql
Created January 12, 2024 20:54
Change the URL of a WordPress Site
/*
Useful when moving a WordPress Install
💥💥💥💥 ALWAYS BACK-UP YOUR DATABASE!!! 💥💥💥💥
Use at your own risk. It may not take into account all
modifications added by other themes/plugins etc.
It performs a find/replace on the following tables:
@morehawes
morehawes / Tiles.md
Last active January 8, 2024 18:40 — forked from xantiagoma/Tiles.md
Map tiles

Slippy Map Tiles

OpenStreetMap

https://tile.openstreetmap.org/{z}/{x}/{y}.png

Example

@morehawes
morehawes / example-usage.html
Created December 2, 2011 12:46
HTML5 Markup Identify Bookmarklet
<a href="javascript:(function(){var f=document.getElementsByTagName("body")[0],b="article,aside,bdi,command,details,summary,figure,figcaption,footer,header,hgroup,mark,meter,nav,progress,ruby,rt,rp,section,time,wbr,audio,video,source,embed,track,canvas".split(",");for($x in b){var c=f.getElementsByTagName(b[$x]);if(c)for($y=0;$y<c.length;$y++){var a=c[$y];a.setAttribute("style","-moz-box-shadow:inset 0 0 2px red;-webkit-box-shadow:inset 0 0 2px red;box-shadow:inset 0 0 1px red;");var d=0,e=0;if(a.offsetParent){do d+= a.offsetLeft,e+=a.offsetTop;while(a=a.offsetParent)}var a=document.createElement("a"),g=document.createTextNode(b[$x]);a.appendChild(g);a.setAttribute("href","http://dev.w3.org/html5/markup/"+b[$x]+".html");a.setAttribute("target","_blank");a.setAttribute("style","position:absolute;left:"+d+"px;top:"+e+"px;padding:2px;color:white;z-index:1000000;background:red;");f.appendChild(a)}}})();">Run Bookmarklet</a>