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 }
.button {
border:1px solid #1D4253;
color:#FFFFFF;
text-shadow:0 -1px 0 #004e68;
font-size:12px;
display:inline-block;
margin:8px 0;
text-align:center;
-moz-border-radius:5px;
-webkit-border-radius:5px;
@jentanbernardus
jentanbernardus / html
Created June 17, 2012 06:30
Simple jQuery Toggle Javascript snippet
<a href="#" id="toggleButton">Click Here</a>
<div id="toggleSection">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script type="text/javascript" src="js/toggle.js"></script>
@jentanbernardus
jentanbernardus / jarallax.js
Created June 21, 2012 20:45
Jarallax is an open-source javascript library which makes adjusting css based on interaction easy. With Jarallax it's easy to create a parallax scrolling website.
/*!
* jaralax library
* version: 0.2.1 public beta
* http://jarallax.com/
*
* Copyright 2012, Jacko Hoogeveen
* Dual licensed under the MIT or GPL Version 3 licenses.
* http://jarallax.com/license.html
*
* Date: 2/29/2012
@jentanbernardus
jentanbernardus / browser-update.js
Created June 25, 2012 20:39
Browser-update.org notification script
//browser-update.org notification script, <browser-update.org>
//Copyright (c) 2007-2009, MIT Style License <browser-update.org/LICENSE.txt>
var $buo = function(op,test) {
var jsv=5;
var n = window.navigator,b;
this.op=op||{};
//options
this.op.l = op.l||n["language"]||n["userLanguage"]||document.documentElement.getAttribute("lang")||"en";
this.op.vsakt = {i:9,f:13,o:12,s:5.1,n:20};
this.op.vsdefault = {i:7,f:3.6,o:10.6,s:4,n:10};
@jentanbernardus
jentanbernardus / The Internet Explorer 6 Countdown
Created June 25, 2012 22:06
Join in moving Internet Explorer 6 users to a modern browser. Follow these steps to help your site visitors be free of Internet Explorer 6. Source: http://www.ie6countdown.com/join-us.aspx
<!--[if lt IE 7]> <div style=' clear: both; height: 59px; padding:0 0 0 15px; position: relative;'> <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a></div> <![endif]-->
@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 / functions.php
Last active September 28, 2017 15:37
WordPress functions.php Template with 15 Essential Custom Functions (source:http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/)
<?php // custom functions.php template @ digwp.com
// add feed links to header
if (function_exists('automatic_feed_links')) {
automatic_feed_links();
} else {
return;
}