Skip to content

Instantly share code, notes, and snippets.

View jelmerdemaat's full-sized avatar

Jelmer jelmerdemaat

View GitHub Profile
Here I stand head in hand
Turn my face to the wall
If she's gone I can't go on
Feeling two-foot small
Everywhere people stare
Each and every day
I can see them laugh at me
And I hear them say
@jelmerdemaat
jelmerdemaat / .bashrc
Last active August 29, 2015 14:03
Useful Terminal aliases
# Move around quicker
alias ..="cd .."
# Show pretty file list using `list`
alias list="ls --color=always -s -h -g --sort=extension"
# Useful application shortcuts
alias chrome="google-chrome"
@jelmerdemaat
jelmerdemaat / SassMeister-input-HTML.html
Created January 29, 2014 19:42
Generated by SassMeister.com.
<time>29<sup>th</sup> of January</time>
<p>Without Compass is significantly faster.</p>
@jelmerdemaat
jelmerdemaat / code.htm
Created January 8, 2014 14:09
ARC code
<!--BEGIN ARC CODE - DO NOT MODIFY BELOW THIS LINE-->
<a href="http://www.partner.viator.com/en/5694?EMAIL=&SUBPUID=TRAVELCOMPAN">
<img src="http://www.arcmarketplace.com/img/201310affBannActFull.jpg" border="0" alt="Shop thousands of destination activities worldwide!" />
</a>
<!--END ARC CODE - DO NOT MODIFY ABOVE THIS LINE-->
@jelmerdemaat
jelmerdemaat / interactive_image-v4.php
Last active December 29, 2015 11:09
Code for new custom field type
<?php
class acf_field_interactive_image extends acf_field
{
// vars
var $settings, // will hold info such as dir / path
$defaults; // will hold default field options
/*
@jelmerdemaat
jelmerdemaat / smartresize.js
Created November 22, 2013 23:29
Custom cross-browser smartresize() event
// smartresize() function
// http://www.paulirish.com/2009/throttled-smartresize-jquery-event-handler/
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
// usage: log('inside coolFunc',this,arguments);
// http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
log.history = log.history || []; // store logs to an array for reference
log.history.push(arguments);
if(this.console){
console.log( Array.prototype.slice.call(arguments) );
}
};
@jelmerdemaat
jelmerdemaat / post-has-content.php
Last active November 7, 2016 09:29
If WordPress post has content
<?php the_post(); if(trim($post->post_content) != "") : ?>
<div class="main-content">
<?php the_content(); ?>
</div>
<?php endif; ?>
@jelmerdemaat
jelmerdemaat / animation.scss
Created October 16, 2013 09:12
SASS cross-browser animation mixins
@mixin keyframes( $animationName ) {
@-webkit-keyframes $animationName {
@content;
}
@-moz-keyframes $animationName {
@content;
}
@-o-keyframes $animationName {
@content;
}
@jelmerdemaat
jelmerdemaat / gist:6411336
Created September 2, 2013 10:12
Sublime better paste key mapping (Windows)
[
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" }
]