This file contains hidden or 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 HTML_ENTITY_MAP = { | |
'&': '&' | |
, '<': '<' | |
, '>': '>' | |
, '"': '"' | |
, "'": ''' | |
, '/': '/' | |
}; | |
// OSWASP Guidlines: &, <, >, ", ' plus forward slash. |
This file contains hidden or 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
// | |
// CTUIImage+Extensions.h | |
// MineSweeper | |
// | |
// Created by Chad Weider on 3/29/12. | |
// Copyright (c) 2012 Chad Weider. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains hidden or 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
@implementation UIImage (CTUIImageExtensions) | |
+ (UIImage *)ct_imageWithPDFNamed:(NSString *)name size:(CGSize)size | |
{ | |
CGFloat scale = 1; | |
CGColorSpaceRef colorspace = NULL; | |
CGContextRef layerContext = NULL; | |
void *layerBytes = NULL; | |
CGPDFDocumentRef iconDocument = NULL; | |
CGImageRef cg_image = NULL; |
This file contains hidden or 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 only screen and (-webkit-min-device-pixel-ratio: 2) { | |
img[src="images/icon.png"] { | |
content: url("images/[email protected]"); | |
} | |
img[src="images/store_small.png"] { | |
content: url("images/[email protected]"); | |
} | |
img[src="images/screen_fail.png"] { | |
content: url("images/[email protected]"); | |
} |
This file contains hidden or 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
== iframeHTML | |
<!doctype html> | |
<html> | |
<head> | |
<%= INCLUDE_CSS %> | |
<%= INCLUDE_JS %> | |
<style type="text/css" title="dynamicsyntax"></style> | |
</head> | |
<body id="innerdocbody" class="syntax" spellcheck="false"> |
This file contains hidden or 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
o /| | |
_ _ __ _ _ _ _ / | | |
/ / / | / _/| / / / / / | |
|__/ /\_/\/ /\_\/ / |_/_/ | |
___/_/ ___/_/ ________/___ | |
/__/ /__/ \__/ |
This file contains hidden or 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
if (x == y) { | |
something_equal(); | |
} | |
else if (x < y) { | |
something_less(); | |
} | |
else { | |
something_great(); | |
} |
This file contains hidden or 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
commit e42f039941e83fa54b615a472f244d3f971c8330 | |
Author: booo <[email protected]> | |
Date: Wed Dec 21 18:18:22 2011 +0100 | |
fix issue #281; remove white spaces | |
diff --git a/node/utils/Minify.js b/node/utils/Minify.js | |
index fd1dd07..70ccc15 100644 | |
--- a/node/utils/Minify.js | |
+++ b/node/utils/Minify.js |
This file contains hidden or 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 random | |
import itertools | |
def bongo_sort(numbers): | |
for (smaller, larger) in itertools.izip(numbers, itertools.islice(numbers, 1, None)): | |
if larger < smaller: | |
random.shuffle(numbers) | |
return bongo_sort(numbers) | |
numbers = [4, 3, 2, 1] |