This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set status-right "#(cpu.rb)" | |
set status-interval 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getTwitterAvatar( $username, $size = "normal" ) { | |
// mini = 24px, normal = 48px, bigger = 73px | |
$sizes = array( "mini", "normal", "bigger" ); | |
// Check for size, default to normal | |
if( in_array( $size, $sizes ) ) { | |
$variant = $size; | |
} else { | |
$variant = "normal"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rewrote excellent intro to Backbone.js http://arturadib.com/hello-backbonejs/ in CoffeeScript | |
$ -> | |
Backbone.sync = (method, model, success, error) -> | |
success() | |
class Item extends Backbone.Model | |
defaults: | |
part1: 'hello' | |
part2: 'world' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whichTransitionEvent(){ | |
var t; | |
var el = document.createElement('fakeelement'); | |
var transitions = { | |
'transition':'transitionend', | |
'MSTransition':'msTransitionEnd', | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Turns out this function already exists in Sass: mix(fg, bg, %) (http://d.pr/mGqa) | |
// Alpha blending | |
@function blend($bg, $fg) { | |
$r: red($fg) * alpha($fg) + red($bg) * (1 - alpha($fg)); | |
$g: green($fg) * alpha($fg) + green($bg) * (1 - alpha($fg)); | |
$b: blue($fg) * alpha($fg) + blue($bg) * (1 - alpha($fg)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass/utilities/general/clearfix"; | |
$gutter-width: 10px; // All grids systems have the same gutter width | |
$float-direction: left; | |
$left-gutter-width: ceil($gutter-width / 2) !default; | |
$right-gutter-width: $gutter-width - $left-gutter-width !default; | |
$base-line-height: 21px; | |
$show-grid-background: false; | |
@mixin centered { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function pxem($pxval, $base: 16px) { | |
// Function to take a pixel value and divide it by a base value in order to | |
// return the size in ems. Default base value is 16px | |
@return ($pxval / $base) * 1em; // multiply by 1em to convert px to ems. | |
} | |
body { | |
background-color: #DCDBD9; | |
color: #2C2C2C; | |
font: normal 100% Cambria, Georgia, serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.selector { | |
background: #f8ab2f; | |
background: -webkit-gradient(radial, 40% 0, 0, 100% 100%, 100, | |
color-stop(0, rgba(251, 215, 57, 0.5)), | |
color-stop(1, rgba(246, 128, 38, 0.5))), | |
-webkit-gradient(linear, 0 0, 0 100%, | |
color-stop(0, #fbd739), | |
color-stop(1, #f68026)); | |
background: -webkit-linear-gradient(top, rgba(251, 215, 57, 0.5), rgba(246, 128, 38, 0.5)), | |
-webkit-radial-gradient(40% 0, farthest-corner, #fbd739, #f68026); |
NewerOlder