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 / compress.sh
Created June 16, 2012 13:51
Shell: Find PNG images and compress with PNGOUT
# Get PNGOUT from here: http://www.jonof.id.au/kenutils
find . -regex ".*\.\(png\)" | while read FILE; do
pngout -y "$FILE"
done;
@ocean90
ocean90 / fixit.sh
Created May 6, 2012 17:08 — forked from christoph-jerolimov/fixit.sh
GetMama remove script
#!/bin/bash
#
# Copyright 2012 Christoph Jerolimov, Dominik Schilling
#
# 0) No, i did not developed this for myself/my server. ;-)
# 1) I strongly recommend you to reinstall all your server software,
# inclusive the whole operating system like linux, unix, etc. If you
# use a web hosting service, backup your data and request your
# provider for a fresh system. If this is not possible feel free to
# try this script.
@ocean90
ocean90 / load-jquery-in-footer-php53.php
Created March 3, 2012 20:51
WordPress: Print jQuery in footer on front-end.
@ocean90
ocean90 / fbcbfwss.php
Last active September 5, 2024 01:29
WordPress Plugin: Filename-based cache busting for scripts/styles.
<?php
/**
* Plugin Name: Filename-based cache busting
* Version: 0.3
* Description: Filename-based cache busting for WordPress scripts/styles.
* Author: Dominik Schilling
* Author URI: https://dominikschilling.de/
* Plugin URI: https://gist.github.com/ocean90/1966227/
*
* License: GPLv2 or later
@ocean90
ocean90 / remove-comment-ips.php
Created February 15, 2012 14:40
Remove Comment Author IPs
<?php
/**
* Plugin Name: Remove Comment Author IPs
* Version: 0.1.0
* Description: Removes the IP addresses of comment authors on a scheduled time.
* Author: Dominik Schilling
* Author URI: http://wphelper.de/
* Plugin URI: https://gist.github.com/1836266
*
* License: GPLv2 or later
@ocean90
ocean90 / seo-monitor-googleplus.php
Created February 13, 2012 20:28
wpSEO Monitor um Google+ Einkreisungen ergänzen.
<?php
/*
* Plugin Name: wpSEO Monitor Addon: Google+ Kennzahl
* Plugin URI: https://plus.google.com/101675293278434581718/posts/2E88QNTcXjE
* Description: Ergänzt den wpSEO Monitor um Google+ Einkreisungen. In wpSEO 3.0.3 bereits fester Bestandteil des Plugin.
* Version: 0.3
* Author: Dominik Schilling
* Author URI: http://wpgrafie.de
* License: GPLv2
*
@ocean90
ocean90 / plugin.php
Created February 2, 2012 12:25
Remove gravatar from the WordPress Toolbar
<?php
/*
* Entfernt das Gravatar aus der Toolbar.
* @link: http://talkpress.de/artikel/wordpress-admin-bar-datenkrake-missbrauch
*/
/* < PHP 5.3 */
function ds_add_hide_avatar_filter() {
add_filter( 'pre_option_show_avatars', '__return_zero' );
}
@ocean90
ocean90 / all-in-one.php
Created January 8, 2012 23:28
Gist to WordPress
/**
* Hook into the backend and load scripts and
* init metabox.
*/
function ds_gist2wordpress_admin() {
add_action( 'wp_ajax_gist', 'ds_gistify' );
add_action( 'admin_print_scripts-post.php', 'ds_gist_js' );
add_action( 'admin_print_scripts-post-new.php', 'ds_gist_js' );
@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 / gist:1549988
Created January 2, 2012 09:13
Custom border radius mixin for Compass
// Custom Border Radius
@mixin _border-radius($radius: 5px, $vertical-radius: false) {
@if $vertical-radius {
// Webkit doesn't understand the official shorthand syntax for specifying
// a vertical radius unless so in case there's several we only take the first.
@include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius),
not -moz,
-webkit,
not -o,