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
//--------------------------------- | |
// Modify these taxonomy pages to show all posts | |
// and sort them alphabetically | |
//--------------------------------- | |
add_filter('posts_orderby', 'mashcat_alphabetical'); | |
add_filter('post_limits', 'mashcat_limits'); | |
function mashcat_alphabetical($orderby) { | |
if(!is_admin() && (is_tax('foreign-apis') || is_tax('api-tags') || is_tax('mashup-tags'))) { |
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
input[data-onoff]:empty { | |
margin-left: -9999px; | |
} | |
input[data-onoff]:empty ~ label { | |
position: relative; | |
float: left; | |
height: 22px; | |
line-height: 22px; | |
text-indent: 50px; |
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 a shorter way to do it with css */ | |
[class*="btn"] { | |
min-width: 100px; | |
padding: 1em; | |
border-radius: 1em; | |
} | |
.btn--twitter { | |
color: #fff; | |
background: #55acee; | |
} |
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
# Compiled source # | |
################### | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # | |
############ |
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, '\"') |
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
<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
// | |
// 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
.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
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); |
OlderNewer