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 / 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 / HTML
Created October 9, 2012 03:49
IE notification to upgrade your browser. src: http://snipplr.com/view/65171/ie-notification/
<!--[if IE 7]>
<div id="ie-notification" class="hidden">
<div class="container">
<p><b>Your browser seems to be a bit out of date.</b> To view this website properly, please upgrade your browser.</p>
<a href="http://browsehappy.com/" class="button btn-primary" target="_blank">Upgrade</a> <a href="#" id="dismiss-ie-note">Don't show this again</a>
</div>
</div>
<![endif]-->
@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 / mailchimp.css
Created October 21, 2012 14:35
MailChimp Form Embed Code
#mc_embed_signup form {display:block; position:relative; text-align:left; padding:10px 0 10px 3%}
#mc_embed_signup h2 {font-weight:bold; padding:0; margin:15px 0; font-size:1.4em;}
#mc_embed_signup input {border:1px solid #999; -webkit-appearance:none;}
#mc_embed_signup input[type=checkbox]{-webkit-appearance:checkbox;}
#mc_embed_signup input[type=radio]{-webkit-appearance:radio;}
#mc_embed_signup input:focus {border-color:#333;}
#mc_embed_signup .button {clear:both; background-color: #aaa; border: 0 none; border-radius:4px; color: #FFFFFF; cursor: pointer; display: inline-block; font-size:15px; font-weight: bold; height: 32px; line-height: 32px; margin: 0 5px 10px 0; padding:0; text-align: center; text-decoration: none; vertical-align: top; white-space: nowrap; width: auto;}
#mc_embed_signup .button:hover {background-color:#777;}
#mc_embed_signup .small-meta {font-size: 11px;}
#mc_embed_signup .nowrap {white-space:nowrap;}
@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 / devices.css
Created October 24, 2012 02:25
Responsive CSS Boilerplate
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-width : 320px) and (max-width : 480px) {
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {
/* Styles */
@jentanbernardus
jentanbernardus / gist:3944150
Created October 24, 2012 05:20
WP_Query loop with Custom Post Type
$movies = new WP_Query(
array(
'post_type' => 'movie_reviews',
'order' => 'DESC',
'orderby' => 'date'
)
);
<?php while ( $movies->have_posts() ) : $movies->the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
@jentanbernardus
jentanbernardus / index.html
Created October 24, 2012 14:42
A CodePen by Brian Gonzalez. Animicons: Sprite animations using icon fonts - Built with [Glyphs](http://glyphsapp.com), processed with [FontPrep](http://fontprep.com), with a little help from [Font Awesome](http://fortawesome.github.com/Font-Awesome/). Ge
<h1>Animicons</h1>
<h4><span class='quiet'>&diams;</span> Sprite Animations Using Icon Fonts <span class='quiet'>&diams;</span></h3>
<div id='icon-container'>
<!-- Broadcast -->
<span data-start='e000'
data-frames='3'
data-interval='200'>
</span>
@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>
@jentanbernardus
jentanbernardus / snippet_1.php
Created January 7, 2013 00:31
Here is my workaround which you can use to show your Gravity Form outside of wordpress using an iframe: 1) Create a page template and paste in the code from Snippet 1. Do not add any header or footer, you only want to display the form itself. 2) Create a wordpress page with the name/slug = gform2 - If you want a different slug than the template …
<!-- Snippet 1 - This is for the page template page-gform2.php -->
<style type="text/css">
#gform_wrapper_2{font-family:"Trebuchet MS", Arial, Helvetica, sans-serif}
</style>
<?php gravity_form(2,false,false) ?>