Skip to content

Instantly share code, notes, and snippets.

View ocean90's full-sized avatar
🌊
Surfing the open source wave

Dominik Schilling ocean90

🌊
Surfing the open source wave
View GitHub Profile
@ocean90
ocean90 / gist:1544377
Created December 31, 2011 15:43
Compiling Compass.app on Mac OS X
Tutorial for compiling the Compass.app (http://compass.handlino.com/)
=====================================================================
Java installed?
java -version
Load jRuby (for example JRuby 1.6.5.1 Binary .zip)
http://jruby.org/download
Unzip jRuby to `/usr/local/`
@ocean90
ocean90 / class-custom-feed.php
Last active May 30, 2019 22:16
How to add a custom feed to WordPress
<?php
/**
* Add a custom feed to WordPress.
*
* The feed will be rendered through the wp-includes/feed-rss2.php template
* and avaiable under example.com/feed/{$feed_slug}.
*
* Note: Don't forget to flush the rewrite rules once.
*
* @author Dominik Schilling
@ocean90
ocean90 / gist:3307536
Created August 9, 2012 19:56
Lets PHPUnit use MAMP's MySQL socket
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
@ocean90
ocean90 / post.html
Created September 6, 2012 08:39
Add/load social plugins after 5 seconds
<div class="share-box twitter">
<span>Auf Twitter teilen</span>
<a style="display:none" href="https://twitter.com/share" class="twitter-share-button" data-lang="de" data-dnt="true" data-count="vertical">Twittern</a>
</div>
<div class="share-box googleplus">
<span>Auf Google+ teilen</span>
<div class="g-plusone" data-size="tall"></div>
</div>
@ocean90
ocean90 / gist:1552031
Created January 2, 2012 20:46
Convert px to em
// Default font size
$base-font-size: 16px;
// px2em
// Use: font-size: px2em( 12px, 14px );
@function px2em( $target, $context: $base-font-size ) {
@if $target == 0 {
@return 0;
}
@ocean90
ocean90 / debug.php
Created October 12, 2011 21:29
WordPress function to debug WordPress filters
<?php
/**
* Debug WordPress filters.
*
* Use add_action( 'shutdown', 'ds_debug_filters' ) to display all used
* filters with the functions hooked into the filter.
*
* @author Dominik Schilling
* @license GPLv2
* @link http://wpgrafie.de/262/
@ocean90
ocean90 / class-wordpress-breadcrumb.php
Created September 18, 2011 19:04
Breadcrumb Navigation for WordPress
<?php
/**
* Klasse zum Erstellen einer WordPress Breadcrumb Navigation.
*
* @author Dominik Schilling
* @license GPLv2
* @link http://wpgrafie.de/204/
*
* @version 0.1.1
*/
@ocean90
ocean90 / _assh
Last active March 16, 2017 20:14
#compdef assh
###############################################################################
# -*- mode:sh; -*-
# Time-stamp: <Thu 2017-03-16 15:37 svarrette>
#
# Zsh completion for [assh](https://github.com/moul/advanced-ssh-config)
#
# Copyright (c) 2017 Sebastien Varrette <Sebastien.Varrette@uni.lu>
###############################################################################
# Enable this completion file by adding somewhere in your zsh configuration (most
Extension: ico
wordpress => image/x-icon
apache => image/vnd.microsoft.icon
Extension: asf
wordpress => video/x-ms-asf
apache => application/vnd.ms-asf
Extension: avi
wordpress => video/avi
apache => video/x-msvideo
Extension: divx