Skip to content

Instantly share code, notes, and snippets.

View roelven's full-sized avatar

Roel van der Ven roelven

View GitHub Profile
<!doctype html>
<head>
<meta charset="UTF-8" />
<meta name="description" content="Frozen Yoghurt" />
<meta content="width=device-width" name="viewport" />
<title>EFAs</title>
// Remove scripts from the wp script queue:
// credit http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles
function rv_deregister_javascript() {
wp_deregister_script('comment-reply');
wp_deregister_script('l10n');
}
// Replace jQuery 1.4.4 with 1.5 on the frontend
// as seen on http://codex.wordpress.org/Function_Reference/wp_enqueue_script
// Do not do this on the wp-admin, jQuery 1.5 might break functionality at this point (March 2011)
@roelven
roelven / Make comments silent
Created February 13, 2011 00:38
HTML5 Boilerplates' reset CSS converted to SASS
//
// html5doctor.com Reset Stylesheet (Eric Meyer's Reset Reloaded + HTML5 baseline)
// v1.6.1 2010-09-17 | Authors: Eric Meyer & Richard Clark
// html5doctor.com/html-5-reset-stylesheet/
//
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video
margin: 0
padding: 0
border: 0
@roelven
roelven / gist:823973
Created February 12, 2011 18:41
WP rewrites
// In functions.php:
// Get the existing Wordpress rewrite rules, usage: print_r(rv_get_rewrite_urls());
function rv_get_rewrite_urls() {
global $wp_rewrite;
return $wp_rewrite->wp_rewrite_rules();
}
// Flush rewrite rules, trigger on plugin activation
function rv_rewrite_flush() {
@roelven
roelven / gist:814424
Created February 7, 2011 14:20
Roel.conf
## Change this to your own folder
## /Users/Roel/Sites/soundcloud
NameVirtualHost *:80
NameVirtualHost *:443
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
@roelven
roelven / gist:814296
Created February 7, 2011 12:15
.gitconfig
[user]
name = Roelven
email = [email protected]
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = auto
@roelven
roelven / gist:788106
Created January 20, 2011 16:13
.git config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[color]
ui = auto
[color "branch"]
current = yellow reverse
<meta content="SoundCloud" property="og:site_name" />
<meta content="Sounds by Forss on SoundCloud" property="og:title" />
<meta content="http://i1.soundcloud.com/avatars-000000011308-xq0whu-large.jpg?3e8e24" property="og:image" />
<meta content="Sounds by Forss: Musician &amp;amp; Founder/CTO SoundCloud | Shared via SoundCloud" property="og:description" />
<meta content="video" name="medium" />
<meta content="242" property="og:video:height" />
<meta content="460" property="og:video:width" />
<meta content="application/x-shockwave-flash" property="og:video:type" />
<meta content="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fforss&amp;color=3b5998&amp;auto_play=true&amp;show_artwork=false" property="og:video" />
@roelven
roelven / gist:733491
Created December 8, 2010 16:18
transfer a whole dir from one server to another
## transfer a whole dir from one server to another
##
scp -P 31415 -r /var/www/vhosts/roelvanderven.com/subdomains/dump/httpdocs/* [email protected]:/usr/local/www/dump/
@roelven
roelven / gist:718811
Created November 28, 2010 10:47
Print the sanitized page title as #id in the body tag:
//
// I don't like logic in views / template files.
// Here's a first attempt of nicely identifying your pages by page titles.
//
// Yes, I know Wordpress' body_class() does something similar,
// but I like semantics and readable code.
//
// Put this in your functions.php:
// Print the sanitized page title as #id in the body tag: