Skip to content

Instantly share code, notes, and snippets.

View jentanbernardus's full-sized avatar
:shipit:
Coding everyday keeps the doctor away!

Jentan Bernardus jentanbernardus

:shipit:
Coding everyday keeps the doctor away!
View GitHub Profile
@jentanbernardus
jentanbernardus / gist:2316278
Created April 6, 2012 02:48 — forked from paulirish/gist:1445367
barackobama.com's css
@charset "utf-8";
html, body, 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; font-size: 100%; vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section
{ display: block }
blockquote, q { quotes: none }
@jentanbernardus
jentanbernardus / gist:3023022
Created June 30, 2012 08:55 — forked from DrewAPicture/gist:2243601
WordPress responsive captions
add_filter( 'img_caption_shortcode', 'dap_responsive_img_caption_filter', 10, 3 );
function dap_responsive_img_caption_filter( $val, $attr, $content = null ) {
extract(shortcode_atts( array(
'id' => '',
'align' => '',
'width' => '',
'caption' => ''
),
$attr));
<?php $hsl = rand(0, 240) . ',' . rand(50, 80) . '%,60%'; ?>
<style type="text/css">
a {
color: hsl(<?php echo $hsl ?>);
}
</style>
@jentanbernardus
jentanbernardus / ajaxsubscribe.html
Created July 31, 2012 06:48 — forked from jdennes/LICENSE
Subscribing to a Campaign Monitor list using AJAX
<!-- 1. Take your Campaign Monitor subscribe form as generated from within your account: -->
<form action="http://myaccount.createsend.com/t/r/s/aljhk/" method="post" id="subForm">
<div>
<label for="name">Name:</label><br /><input type="text" name="cm-name" id="name" /><br />
<label for="aljhk-aljhk">Email:</label><br /><input type="text" name="cm-aljhk-aljhk" id="aljhk-aljhk" /><br />
<input type="submit" value="Subscribe" />
</div>
</form>
@jentanbernardus
jentanbernardus / cfinstall.1.0.3mod-min.js
Created October 8, 2012 19:25 — forked from SlexAxton/cfinstall.1.0.3mod-min.js
Chrome Frame install script with 'user=true' as a config value option (no admin needed)
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function(d){if(!d.CFInstall){var e=function(a){return typeof a=="string"?document.getElementById(a):a},f=function(){if(d.a.b)return d.a.c;if(navigator.userAgent.toLowerCase().indexOf("chromeframe")>=0)return!0;if(typeof window.ActiveXObject!="undefined")try{var a=new ActiveXObject("ChromeTab.ChromeFrame");if(a)return a.k(),!0}catch(b){}return!1},g=function(a){try{var b=document.createElement("style");b.setAttribute("type","text/css");b.styleSheet?b.styleSheet.cssText=a:b.appendChild(document.createTextNode(a));
var c=document.getElementsByTagName("head")[0];c.insertBefore(b,c.firstChild)}catch(d){}},h=!1,i=!1,j=function(){if(!i)g(".chromeFrameOverlayContent { display: none; }.chromeFrameOverlayUnderlay { display: none; }"),document.cookie="disableGCFCheck=1;path=/;max-age=31536000000",i=!0},k=function(a){var b=document.createElement("iframe")
@jentanbernardus
jentanbernardus / gist:3923018
Created October 20, 2012 11:19 — forked from luetkemj/gist:2002921
WP: Plugin Header
/*
Plugin Name:
Plugin URI: http://luetkemj.com/
Description:
Author: Mark Luetke
Author URI: http://luetkemj.com
Version: 1.0
*/
@jentanbernardus
jentanbernardus / gist:3930737
Created October 22, 2012 10:04 — forked from mikejolley/gist:1565309
WooCommerce - Filters to add custom currencies and symbols
add_filter( 'woocommerce_currencies', 'add_my_currency' );
function add_my_currency( $currencies ) {
$currencies['ABC'] = __( 'Currency name', 'woocommerce' );
return $currencies;
}
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);
function add_my_currency_symbol( $currency_symbol, $currency ) {
@jentanbernardus
jentanbernardus / responsive_jquery_cycle.html
Created December 4, 2012 04:51
@malsup's jQuery Cycle in a Responsive Layout
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Responsive Cycle</title>
<style>
<?php
/*
Plugin Name: Plugin Boilerplate
Version: 0.1-alpha
Description: This is how I like to make sense of the WordPress plugin architecture
Author: Adam Davis
Author URI: http://admataz.com
Plugin URI: http://admataz.com
Text Domain: admataz-plugin-boilerplate
Domain Path: /languages
<?php
/**
* Enqueue scripts and styles
*/
function load_scripts() {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' );
$dir = get_stylesheet_directory_uri();
wp_enqueue_script( 'jquery-masonry', $dir.'/js/jquery.masonry.min.js', array('jquery'), false, true );