Skip to content

Instantly share code, notes, and snippets.

View orioltf's full-sized avatar

Oriol Torrent Florensa orioltf

View GitHub Profile
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@nicerobot
nicerobot / dock-spacer.sh
Created January 11, 2012 00:08
Add a space to the Mac OS X Dock. It can be used multiple times for multiple spacers.
#!/bin/sh
# curl -ks https://gist.github.com/raw/1592071/dock-spacer.sh | sh
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'
@LeaVerou
LeaVerou / dabblet.css
Created December 11, 2011 01:59
Checkerboard pattern
/**
* Checkerboard pattern
* (a bit buggy in Webkit, see bug #54615)
*/
background-color: white;
background-image: linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black),
linear-gradient(45deg, black 25%, transparent 25%, transparent 75%, black 75%, black);
background-size:100px 100px;
background-position: 0 0, 50px 50px;
@LeaVerou
LeaVerou / dabblet.css
Created December 11, 2011 01:57
Polka dot pattern
/**
* Polka dot pattern
*/
background: radial-gradient(circle, white 10%, transparent 10%),
radial-gradient(circle, white 10%, black 10%) 50px 50px;
background-size:100px 100px;
@LeaVerou
LeaVerou / dabblet.css
Created December 10, 2011 02:56
Japanese cube pattern */
/* Japanese cube pattern */
background-color:#556;
background-image: linear-gradient(60deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),
linear-gradient(-60deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),
linear-gradient(60deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),
linear-gradient(-60deg, #445 12%, transparent 12.5%, transparent 87%, #445 87.5%, #445),
linear-gradient(30deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a),
linear-gradient(30deg, #99a 25%, transparent 25.5%, transparent 75%, #99a 75%, #99a);
background-size:80px 140px;
@LeaVerou
LeaVerou / dabblet.css
Created December 10, 2011 01:48
Seigaiha
background-color:silver;
background-image:
radial-gradient(100% 150%, circle, silver 24%, white 25%, white 28%, silver 29%, silver 36%, white 36%, white 40%, transparent 40%, transparent),
radial-gradient(0 150%, circle, silver 24%, white 25%, white 28%, silver 29%, silver 36%, white 36%, white 40%, transparent 40%, transparent),
radial-gradient(50% 100%, circle, white 10%, silver 11%, silver 23%, white 24%, white 30%, silver 31%, silver 43%, white 44%, white 50%, silver 51%, silver 63%, white 64%, white 71%, transparent 71%, transparent),
radial-gradient(100% 50%, circle, white 5%, silver 6%, silver 15%, white 16%, white 20%, silver 21%, silver 30%, white 31%, white 35%, silver 36%, silver 45%, white 46%, white 49%, transparent 50%, transparent),
radial-gradient(0 50%, circle, white 5%, silver 6%, silver 15%, white 16%, white 20%, silver 21%, silver 30%, white 31%, white 35%, silver 36%, silver 45%, white 46%, white 49%, transparent 50%, transparent);
background-size:100px 50px;
@LeaVerou
LeaVerou / dabblet.css
Created December 7, 2011 03:33
Previewer test
/**
* Previewer test
*/
background: #f06;
background: linear-gradient(left bottom,
hsla(340, 100%, 50%,.7), yellow);
background: url(http://placekitten.com/330/340);
content: '\2665';
min-width: 100px;
@LeaVerou
LeaVerou / markup.html
Created December 2, 2011 00:46
Illustrating correct & wrong inner border-radius
<div class="outer right"><div>This</div></div>
<div class="outer wrong"><div>NOT this</div></div>
@richardvenneman
richardvenneman / _html5boilerplate.css.sass
Created September 25, 2011 16:18
HTML5 Boilerplate HAML & SASS
/*
* HTML5 ✰ Boilerplate
*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*
* Detailed information about this CSS: h5bp.com/css
*
* ==|== normalize ==========================================================
!!! 5
/[if lt IE 7] <html lang="en" class="no-js ie6">
/[if IE 7 ] <html lang="en" class="no-js ie7">
/[if IE 8 ] <html lang="en" class="no-js ie8">
/[if IE 9 ] <html lang="en" class="no-js ie9">
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
%head
%meta{:charset => "utf-8"}/
/
Always force latest IE rendering engine (even in intranet) &amp; Chrome Frame