Skip to content

Instantly share code, notes, and snippets.

View michsch's full-sized avatar

Michael Schulze michsch

View GitHub Profile
@michsch
michsch / gist:1431688
Created December 4, 2011 23:48 — forked from tauren/gist:1045906
Make it safe to use console.log always. How to convert to coffeescript?
// usage: log('inside coolFunc', this, arguments);
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
window.log = function(){
log.history = log.history || []; // store logs to an array for reference
log.history.push(arguments);
if(this.console) {
arguments.callee = arguments.callee.caller;
console.log( Array.prototype.slice.call(arguments) );
}
};
@michsch
michsch / .htaccess
Created December 30, 2011 06:57
.htaccess compression and caching
# BEGIN Compress text files
<IfModule mod_deflate.c>
<FilesMatch "\.(x?html?|php|js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
# END Compress text files
# Expires Header + Removal of ETag
<FilesMatch "\.(ico|png|gif|js|css|jpg|jpeg|swf)">
@michsch
michsch / nomobilezooming.coffee
Created January 26, 2012 20:46
Disable zooming for iPhone using jQuery
jQuery(document).ready ($) ->
###*
* Init function for domready
*
* @return boolean true
###
init = ->
resetViewportMeta()
true
@michsch
michsch / dabblet.css
Created February 19, 2012 18:45
img inline margin-bottom bug
/**
* img inline margin-bottom bug
*/
html * { font-size:100.01%; }
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 87.50%; /* 14px */
background: #efefef;
@michsch
michsch / dabblet.css
Created February 19, 2012 20:49
flexible fluid <figure> and <figcaption>
/**
* flexible fluid <figure> and <figcaption>
*/
html * { font-size:100%; }
body {
background: #efefef;
min-height:100%;
font-size: 85%;
@michsch
michsch / dabblet.css
Created February 28, 2012 20:10
Round corners in Chrome and Safari
/**
* Round corners in Chrome and Safari
*/
/* just layout */
html { font-size: 100.00%; }
html, body { min-height:100%; }
body {
background: #ccc;
font-size: 87.5%;
@michsch
michsch / dabblet.css
Created April 1, 2012 18:03
flexible fluid <figure> and <figcaption>
/**
* flexible fluid <figure> and <figcaption>
*/
html * { font-size:100%; }
body {
background: #efefef;
min-height:100%;
font-size: 85%;
@michsch
michsch / dabblet.css
Created April 1, 2012 18:07
YAML 3col layout with fixed sidebars (left and right)
/**
* YAML 3col layout with fixed sidebars (left and right)
* col1 | col2 | col3
*/
body {
background: #efefef;
}
.ym-wrapper {
@michsch
michsch / dabblet.css
Created April 8, 2012 12:05
100% navigation with display:table
/**
* 100% navigation with display:table
*/
body {
padding: 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 87.50%;
background: #ddd;
}
@michsch
michsch / dabblet.css
Created May 30, 2012 18:02
outer DIV to 100%
/**
* outer DIV to 100%
*/
html * { font-size:100%; }
body {
padding: 0;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
font-size: 87.50%;