Skip to content

Instantly share code, notes, and snippets.

View roelven's full-sized avatar

Roel van der Ven roelven

View GitHub Profile
javascript:(function(){ document.querySelector('body').style.backgroundColor = '#EEEEEE'; }());
@roelven
roelven / .bash_profile
Created October 27, 2015 16:19
Useful Git stuff
##
## Add awesome git functions to check differentiation between branches:
##
## See http://stackoverflow.com/questions/53569/how-to-get-the-changes-on-a-branch-in-git
##
function parse_git_branch {
/usr/bin/git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
function print_branch {
@roelven
roelven / ogp.html
Created October 24, 2012 23:36 — forked from pathawks/meta.html
Open Graph for Jekyll
{% capture header %}
{% if page.title %}
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ page.title }} – {{ site.title }}" />
{% if page.url %}
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
{% endif %}
{% else %}
<meta property="og:type" content="website" />
@roelven
roelven / example.com.conf
Created August 1, 2012 19:11
Nginx + Wordpress conf
## Based on http://themesforge.com/featured/high-performance-wordpress-part-3/
# W3TC config rules based on http://elivz.com/blog/single/wordpress_with_w3tc_on_nginx/
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
# Tell nginx to handle requests for the www.engin.ex domain
server_name www.blomandblom.com blomandblom.com;
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# via http://www.paulund.co.uk/set-expire-headers-in-htaccess
# ----------------------------------------------------------------------
#
# These are pretty far-future expires headers
# They assume you control versioning with cachebusting query params like:
# <script src="application.js?20100608">
# Additionally, consider that outdated proxies may miscache
#
@roelven
roelven / Gemfile
Created July 4, 2012 13:09
Config for a static site on Heroku
# Gemfile
source "http://rubygems.org"
gem "rack"
javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());
@roelven
roelven / gist:2987639
Created June 25, 2012 09:35 — forked from matthewhudson/gist:1603502
Integrate Open Graph with Tumblr
<meta property="og:site_name" content="{Title}" />
<meta property="fb:app_id" content="FB_APP_ID" />
<meta property="fb:admins" content="FB_ADMIN_ID" />
<meta property="og:description" content="{MetaDescription}" />
<meta property="og:locale" content="en_US" />
{block:IndexPage}
<meta property="og:image" content="{PortraitURL-128}" />
<meta property="og:title" content="SITE_NAME" />
<meta property="og:type" content="blog" />
<iframe src="http://handigekasten.nl/widget.html" width="240" height="355" frameborder="0"></iframe>
<meta content="record, sounds, share, sound, audio, tracks, music, soundcloud" name="keywords" />
<meta content="Listen to Devon + AxL - Hotel Stoccarda by AxL: traccia dubstep, grazie per l'ascolto! | Create, record and share the sounds you create anywhere to friends, family and the world with SoundCloud, the world's largest community of sound creators." name="description" />
<link href="http://sandbox-soundcloud.com/axl" rel="author" />
<meta content="width=device-width" name="viewport" />
<meta content="chrome=1" name="X-UA-Compatible" />
<meta content="iframe" name="medium" />
<meta content="soundcloudplayer:sound" property="og:type" />
<meta content="player" property="twitter:card" />
<meta content="http://sandbox-soundcloud.com/axl/devon-axl-hotel-stoccarda" property="og:url" />
<meta content="Devon + AxL - Hotel Stoccarda" property="og:title" />