Skip to content

Instantly share code, notes, and snippets.

View herrbischoff's full-sized avatar

Marcel Bischoff herrbischoff

View GitHub Profile
@herrbischoff
herrbischoff / tunnel.sh
Created April 8, 2015 22:30
SSH tunnel
ssh -f [email protected] -L 2000:personal-server.com:25 -N
@herrbischoff
herrbischoff / video-embed.styl
Last active August 29, 2015 14:18
Fluid Video Embeds
.video-container
position relative
padding-bottom 56.25%
padding-top 30px
height 0
overflow hidden
.video-container iframe,
.video-container object,
.video-container embed
@herrbischoff
herrbischoff / font.styl
Created April 8, 2015 22:25
Set font antialiasing
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
@herrbischoff
herrbischoff / .gitignore
Created April 8, 2015 22:22
WordPress standard gitignore
.htaccess
wp-*.php
xmlrpc.php
wp-admin/
wp-includes/
wp-content/uploads/*
wp-content/upgrade/*
wp-content/cache/*
wp-content/backups/*
sitemap.xml
@herrbischoff
herrbischoff / from-top.js
Created April 8, 2015 22:20
Check Element Position from Top
var viewableOffset = $("#li.test").offset().top - $(window).scrollTop();
@herrbischoff
herrbischoff / email-check.js
Created April 8, 2015 22:18
Email Probability Check
function checkEmail() {
var email = document.getElementById('emailaddress');
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert('Please provide a valid email address');
email.focus;
return false;
}
}
@herrbischoff
herrbischoff / nginx.conf
Created April 8, 2015 22:17
HTTPS for Subfolder
if ($request_uri !~* ^/admin) {
rewrite ^ http://$server_name$request_uri?$args permanent;
}
@herrbischoff
herrbischoff / nginx.conf
Last active August 29, 2015 14:18
Reverse Proxy Configuration
server {
listen 443 ssl;
server_name domain.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
ssl_certificate /etc/ssl/nginx/domain.com.crt;
ssl_certificate_key /etc/ssl/nginx/domain.com.key;
@herrbischoff
herrbischoff / post-formats.php
Created April 8, 2015 22:14
Add Support for Post Formats
/**
* The post formats feature allows you to customize the style and presentation
* of posts. As of this writing, there are 9 standardized post formats that
* users can choose from: aside, gallery, link, image, quote, status, video,
* audio, and chat. In addition to these, the default “Standard” post format
* indicates that no post format is specified for the particular post.
* To add this functionality to your theme, include the following code in your
* functions.php, specifying the post formats you’ll be taking advantage of.
* e.g. If you only want the aside, image, link, quote, and status Post Formats,
* your code should look like this:
@herrbischoff
herrbischoff / clean-header.php
Created April 8, 2015 22:13
Cleanup WordPress Header
remove_action('wp_head', 'feed_links', 2);
remove_action('wp_head', 'feed_links_extra', 3);
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'index_rel_link');
remove_action('wp_head', 'parent_post_rel_link');
remove_action('wp_head', 'start_post_rel_link');
remove_action('wp_head', 'adjacent_posts_rel_link');
remove_action('wp_head', 'check_and_publish_future_post');
remove_action('wp_head', 'wp_print_styles');