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 linear-gradient( $start: #f1f1f1, $from: 0%, $stop: #d9d9d9, $to: 100% ) { | |
background: $start; | |
background: -webkit-gradient(linear, left top, left bottom, from(ie-hex-str($start)), to(ie-hex-str($stop))); | |
background: -moz-linear-gradient(center top, $start $from, $stop $to); | |
background: -moz-gradient(center top, $start $from, $stop $to); | |
background: -webkit-linear-gradient(top, $start $from,$stop $to); | |
background: -o-linear-gradient(top, $start $from,$stop $to); | |
background: -ms-linear-gradient(top, $start $from,$stop $to); | |
background: linear-gradient(to bottom, $start $from,$stop $to); | |
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str($start)}', endColorstr='#{ie-hex-str($stop)}',GradientType=0 ); |
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 os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
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
NSFont *normalFont = [NSFont systemFontOfSize:12]; | |
CGRect renderFrame = CGRectMake(0, 0, 300, 50); // box to render the text into | |
static NSLayoutManager *layMan = nil; | |
if (!layMan) { | |
layMan = [NSLayoutManager new]; | |
} | |
CGFloat lineHeight = [layMan defaultLineHeightForFont:normalFont]; // calculate the expected height of a line | |
NSDictionary *attrDict = [NSDictionary dictionaryWithObject:normalFont andKey:NSFontAttributeName]; |
NewerOlder