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
/*Grid*/ | |
@gutter: 3.05514158%; | |
@col: 5.532786885%; | |
.grid1 { width: @col; } | |
.grid2 { width: @col*2 + @gutter; } | |
.grid3 { width: @col*3 + @gutter*2; } | |
.grid4 { width: @col*4 + @gutter*3; } | |
.grid5 { width: @col*5 + @gutter*4; } | |
.grid6 { width: @col*6 + @gutter*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
<!DOCTYPE> | |
<html> | |
<head> | |
<title>Clipp - More text than an element can fit? Clipp it!</title> | |
<style> | |
body,html { | |
margin: 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
window.jQuery || document.write('<script type="text/javascript" src="javascripts/libs/jquery-1.9.1.min.js"><\/script>') |
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
var params = { | |
method: 'artist.getInfo', | |
api_key: '9bd9ee', | |
user_id: '3016', | |
format: 'json', | |
nojsoncallback: 1, | |
auth_token: '7215' | |
}; | |
function sortObject(o) { |
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
#eyebrow { display: none !important; } | |
body.with-eyebrow { padding-top: 49px !important; background: none !important; } | |
body.with-eyebrow #global-nav { top: 0 !important;} | |
body.with-eyebrow #subnav-refresh {top: -71px !important; } | |
body.with-eyebrow #view-holder {margin-top: -71px !important; } |
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
redis-cli KEYS "prefix:*" | xargs redis-cli DEL |
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
- (BOOL)stringContainsEmoji:(NSString *)string { | |
__block BOOL returnValue = NO; | |
[string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock: | |
^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { | |
const unichar hs = [substring characterAtIndex:0]; | |
// surrogate pair | |
if (0xd800 <= hs && hs <= 0xdbff) { | |
if (substring.length > 1) { | |
const unichar ls = [substring characterAtIndex:1]; |
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
## The Problem | |
Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.) | |
## The temptingly easy but ultimately wrong solution: | |
Alter the port the script talks to from 8000 to 80: | |
}).listen(80); |