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
zoomWithWheel = false; | |
zoomLevel = 1; | |
zoomIncrement = 0.2; | |
document.addEventListener( "mousewheel", function( event ) { | |
if( zoomWithWheel ) { | |
if( event.wheelDeltaY > 0 ) { | |
zoomLevel += zoomIncrement; | |
} |
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
#!/usr/bin/env python | |
# topgrossingfreeapps.py [country code] | |
# us, gb, ch, etc | |
# quick and dirty python script to grab the percentage | |
# of top grossing aps in a given app store which are | |
# currently free | |
import feedparser |
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
<?php | |
/* | |
Plugin Name: Add Short Excerpt Meta | |
Plugin URI: https://gist.github.com/enigmaticape/4751121 | |
Description: Add an additional excerpt box for front page | |
Version: 1.0 | |
Author: Steve Trewick | |
Author URI: http://www.enigmaticape.com | |
License: Public Domain | |
*/ |
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
.gist .line, | |
.gist .line-number { | |
font-size:14px !important; | |
line-height:25px !important; | |
} |
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 <Foundation/Foundation.h> | |
@interface Appcast : NSObject | |
+ ( id ) instance; | |
+ (void) post:(NSString *) message; | |
@end |
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
<?php | |
/* | |
Plugin Name: FU Smart Quotes | |
Plugin URI: https://gist.github.com/4682690 | |
Description: Disable smart quotes | |
Version: 1.0 | |
Author: Steve Trewick | |
Author URI: http://www.enigmaticape.com/blog/the-smallest-possible-wordpress-plugin/ | |
License: Public Domain | |
*/ |
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
#!/usr/bin/env python | |
import sys | |
import collections | |
# Bag em | |
cipher_file = open( sys.argv[ 1 ], 'rb') | |
cipher_text = cipher_file.read() | |
# remove all non alpha and whitespace and force uppercase |
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
#!/usr/bin/env python | |
import collections | |
import sys | |
nums = sys.argv[1:] | |
def factors_of( x ): | |
factors = [] | |
n = x-1 |
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
<?php | |
// ... | |
function eschtml_func( $atts, $content = null ) { | |
return htmlentities( $content ); | |
} | |
add_shortcode( 'eschtml', 'eschtml_func' ); | |
?> |
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
<?php | |
function tokeniseString( $string ) { | |
$regex = "/([[:space:]]+)|([[:punct:]])/"; | |
$opts = PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY; | |
$toks = preg_split( $regex, $string, -1, $opts ); | |
return $toks; | |
} |