Skip to content

Instantly share code, notes, and snippets.

@b4z81
b4z81 / dabblet.css
Created March 19, 2012 13:15 — forked from JoelBesada/dabblet.css
CSS States
/* CSS States */
body {
background: url(http://dabblet.com/img/noise.png);
background-color: #F5F2F0;
font-family: Georgia, serif;
font-size: 18px;
line-height: 1.6em;
text-shadow: 0 2px 0 white;
color: #222;
}
@b4z81
b4z81 / anchorinclude.js
Created March 30, 2012 09:07 — forked from scottjehl/anchorinclude.js
Anchor-include Pattern
/*
* anchor-include pattern for already-functional links that work as a client-side include
* Copyright 2011, Scott Jehl, scottjehl.com
* Dual licensed under the MIT
* Idea from Scott Gonzalez
* to use, place attributes on an already-functional anchor pointing to content
* that should either replace, or insert before or after that anchor
* after the page has loaded
* Replace: <a href="..." data-replace="articles/latest/fragment">Latest Articles</a>
* Before: <a href="..." data-before="articles/latest/fragment">Latest Articles</a>
@b4z81
b4z81 / effect.css
Created April 5, 2012 08:37
image effects
.polaroid {
position: relative;
width: 220px;
}
.polaroid img {
border: 10px solid #fff;
border-bottom: 45px solid #fff;
-webkit-box-shadow: 3px 3px 3px #777;
-moz-box-shadow: 3px 3px 3px #777;
@b4z81
b4z81 / button.html
Created April 5, 2012 08:51
button effect
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Button effect</title>
<style>
button {
clear: left;
display: block;
@b4z81
b4z81 / gist:2352153
Created April 10, 2012 15:31 — forked from padolsey/gist:527683
versions of IE in JavaScript
// ----------------------------------------------------------
// 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) {}
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?tuosito.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?tuosito2.com [NC]
RewriteRule \.(ttf|svg|eot|woff)$ http://hpmouse.googlepages.com/hotlink.gif [NC,R,L]
@b4z81
b4z81 / replace-text
Created April 12, 2012 13:29
Css Replacement Technique
#replace
{
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@b4z81
b4z81 / ie-css-hacks.css
Created April 15, 2012 08:16 — forked from necolas/ie-css-hacks.css
IE CSS hacks
/*
* Property prefix hacks
*/
/* IE6 only - any combination of these characters */
_ - £ ¬ ¦
/* IE6/7 only - any combination of these characters */
@b4z81
b4z81 / dabblet.css
Created April 17, 2012 09:35 — forked from LeaVerou/dabblet.css
Vertical centering with Flexbox + margin fallback
/**
* Vertical centering with Flexbox + margin fallback
* Lea Verou & David Storey
*/
html, body { height: 100%; }
body {
width: 100%; /* needed for FF */
margin: 0;
@b4z81
b4z81 / htaccess.py
Created April 19, 2012 09:10
improve performance
#1: Prevent Hotlinking
RewriteEngine On
#Replace ?mysite\.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your “don’t hotlink” image url