Skip to content

Instantly share code, notes, and snippets.

View jondueck's full-sized avatar

Jon Dueck jondueck

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jondueck on github.
  • I am jondueck (https://keybase.io/jondueck) on keybase.
  • I have a public key ASD9Nw4S0vKj1Q_aR4rwEBHCHBxCbyzyGZedrZPqDfI3ugo

To claim this, I am signing this object:

@jondueck
jondueck / Bears.md
Last active October 25, 2019 15:31
Bear kaomoji

bears

Emoticons are fun, but bear emoticons are either scary or cool

Meant for text replacement in OS X. System Preferences > Keyboard > Text

Replace With
font-size: 100%;
font-weight: normal;
-ms-text-size-adjust: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
text-rendering: optimizeLegibility;
-webkit-font-feature-settings: "liga" 1, "kern" 1;
font-feature-settings: "liga" 1, "kern" 1;
-webkit-font-kerning: normal;
font-kerning: normal;
@jondueck
jondueck / functions.php
Created February 2, 2016 20:29
Yearly & Monthly archives for Custom Post Types in Wordpress
function wpa83797_sermons_rewrite_rules(){
add_rewrite_rule(
'sermons/([0-9]{4})/([0-9]{1,2})/?$',
'index.php?post_type=sermons&year=$matches[1]&monthnum=$matches[2]',
'top'
);
add_rewrite_rule(
'sermons/([0-9]{4})/?$',
@jondueck
jondueck / Google Analytics Filter
Last active August 29, 2015 14:23
Google Analytics Filter
(guardlink.org|free-share-buttons.com|free-social-buttons.com|event-tracking.com|buy-cheap-online.info|Get-Free-Traffic-Now.com|gigapeta.com|pornhub-forum.ga|social-buttons\.com|simple-share-buttons.com|best-seo-offer.com|buttons-for-your-website.com|darodar.com|100dollars-seo.com|sitevaluation.org|dailyrank.net|semaltmedia.com|webmonetizer.net|dailyrank.net)
@jondueck
jondueck / page.php
Created June 3, 2015 13:14
Wordpress: If parent is page id, set child page theme
<?php
if (134 == $post->post_parent) {
include (TEMPLATEPATH . '/page-mysubpagetemplate.php'); // Name this for your child page template name
exit();
} else {
// Do something else
// You might want to stick your regular page.php code in here, or alternatively, you could call another template
}; ?>
@jondueck
jondueck / .htaccess
Last active October 29, 2015 15:07
htaccess Starter
RewriteEngine On
RewriteCond %{HTTP_HOST} !^your-site.com$ [NC]
RewriteRule ^(.*)$ http://your-site.com/$1 [L,R=301]
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript image/svg+xml image/x-icon
</ifmodule>
# END GZIP
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP
@jondueck
jondueck / urlencode the_permalink
Created February 27, 2015 01:23
Encode permalinks in Wordpress
@jondueck
jondueck / .htaccess
Created February 23, 2015 14:30
Remove www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^your-site.com$ [NC]
RewriteRule ^(.*)$ http://your-site.com/$1 [L,R=301]