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
/* | |
This is pretty much the smallest you can make the firefox screen without programmatically setting the width. | |
Chrome and Safari prevents you from going below 400px. An iPhone is 320px, and the smallest Android about 240px IIRC. | |
The site is pretty much useless like this, so... have an egg. | |
*/ | |
@media only screen and (max-width: 92px) { | |
body * { | |
display: none; | |
} |
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
SET @oldurl = 'dev1.nollfyranoll.se'; | |
SET @newurl = 'pilgrimsvagen.se'; | |
UPDATE wp_posts SET POST_CONTENT = replace(POST_CONTENT, @oldurl, @newurl); | |
UPDATE wp_posts SET GUID = replace(GUID, @oldurl, @newurl); | |
UPDATE wp_options SET OPTION_VALUE = replace(OPTION_VALUE, @oldurl, @newurl); |
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
.center { | |
width: 980px; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
html, body { | |
overflow-x: hidden; /* Prevents horizontal scroll */ | |
} |
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
// | |
// Easy lil' sorting thingamajig. Mad creds to Antonio Navarro of 040. | |
// | |
function sort_array_on_value($array_to_sort, $sort_on_value, $descending = false) { | |
$sortArr = array(); | |
foreach ($array_to_sort as $key => $value) { | |
$sortArr[$key] = $value[$sort_on_value]; | |
} |
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
<a target="_blank" href="https://twitter.com/intent/tweet?text=YOUR-TITLE&url=YOUR-URL&via=TWITTER-HANDLE">Tweet</a> | |
<a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=YOUR-URL">Share on Facebook</a> | |
<a target="_blank" href="https://plus.google.com/share?url=YOUR-URL">Plus on Google+</a> | |
<a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url=YOUR-URL&title=YOUR-TITLE&summary=YOUR-SUMMARY&source=YOUR-URL">Share on LinkedIn</a> | |
<a target="_blank" href="http://pinterest.com/pin/create/button/?url=YOUR-URL&description=YOUR-DESCRIPTION&media=YOUR-IMAGE-SRC">Pin on Pinterest</a> |
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
#!/usr/bin/env bash | |
# Remote database credentials | |
RDBNAME="" | |
RDBUSER="" | |
RDBPASS="" | |
# Local database credentials | |
LDBNAME="" | |
LDBUSER="" |
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
// ----------- | |
// Debugger that shows view port size. Helps when making responsive designs. | |
// ----------- | |
function showViewPortSize(display) { | |
if(display) { | |
var height = jQuery(window).height(); | |
var width = jQuery(window).width(); | |
jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>'); | |
jQuery(window).resize(function() { |
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
.replace(/<(?:.|\s)*?>/g, '') | |
.replace(/ä/gi, 'ä') | |
.replace(/Ä/gi, 'Ä') | |
.replace(/ö/gi, 'ö') | |
.replace(/Ö/gi, 'Ö') | |
.replace(/å/gi, 'å') | |
.replace(/Å/gi, 'Å') | |
.replace(/&/gi, '&') | |
.replace(/”/gi, '\"') | |
.replace(/"/gi, '\"') |
NewerOlder