Skip to content

Instantly share code, notes, and snippets.

@bamb
bamb / HA_test.json
Created January 31, 2021 19:20
ha test
#test file
@bamb
bamb / index.html
Created March 22, 2012 20:34 — forked from AbeEstrada/index.html
HTML: Basic Skeleton
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>title</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/style.css" />
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<style type="text/css">article, aside, figure, footer, header, hgroup, menu, nav, section, summary { display: block; }</style>
@bamb
bamb / EmptyWidget.php
Created March 21, 2012 22:10 — forked from jonathonbyrdziak/CustomWidgetFile.php
php: wp empty widget
<?php
/**
* @package RedRokk
* @version 1.0.0
*
* Plugin Name: Empty Widget
* Description: Single Widget Class handles all of the widget responsibility, all that you need to do is create the html. Just use Find/Replace on the Empty_Widget keyword to rebrand this class for your needs.
* Author: RedRokk Interactive Media
* Version: 1.0.0
* Author URI: http://www.redrokk.com
@bamb
bamb / media.css
Created March 21, 2012 22:08 — forked from mrdanadams/media.css
css: wp rwd fluid grids
@media screen and (max-width: 650px) {
#container, #aside-container, #blog-title, #access { display: block; float: none; width: auto; margin: 0 3% 3% 3%; }
body { font-size: 14px; line-height: 16px; }
}
@bamb
bamb / gist:2153668
Created March 21, 2012 22:06 — forked from bueltge/gist:1575381
JavaScript: jquery rwd remove pixel from image
// remove height, width for responsive design
(function ($) {
$(document).ready(function($) {
$( 'img' ).removeAttr( 'height' ).removeAttr( 'width' );
});
})(jQuery);
@bamb
bamb / gist:2153618
Created March 21, 2012 22:03 — forked from padolsey/gist:527683
JavaScript: detect ie
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@bamb
bamb / detect_mobiles.php
Created March 21, 2012 21:59 — forked from apocratus/detect_mobiles.php
php: detect mobile
<?php
$useragent = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent) || preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|