Instantly share code, notes, and snippets.

View gist:8bbfcfc3e7b07de7897b8e88c6d567ef
# Panel
Elizabeth Brady, Director Audience Engagement, People, @sheerling
Brian Kroski, Former Chief Digital Officer, AMI, @briankroski
Garrett Bewkes, Publisher, National Review, @egbewkes
Linda Li, Director, Global Strategy and Dev, NYT @multilinda
## Biggest Challenges for the Year
- Linda Li (NYT): NYT has 2.6 million digital subscribers — need to change the perception about how consumers feel about the company as a brand; convincing people to pay for news.
View Boxy Tomorrow Theme Configuration
{
"color_scheme": "Packages/User/SublimeLinter/Sunburst (SL).tmTheme",
"font_face": "Operator Mono",
"font_options":
[
"gray_antialias"
],
"font_size": 21,
"ignored_packages":
[
View gist:14e04ebfa734b13e720f
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX']);
_gaq.push(['_trackPageview']);
setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);
setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])",30000);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
View gist:94107399237599755f07
// == Create a simple hash based on a file checksum
function sr_version_hash($file) {
if(!$file) return false;
$full_path = get_template_directory() . $file;
return hash_file('CRC32',$full_path);
}
View gist:2b5aa2953759c53e6da5
<?php
// change to repo directory, run a git pull and echo the output
echo shell_exec("cd /your/repo/path/here && git pull");
die("done " . mktime());
View gist:9260407
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
if ( navigationType == UIWebViewNavigationTypeLinkClicked ) {
NSString *urlString = request.URL.absoluteString;
// Set the pattern to search the request URL for
NSRange range = [urlString rangeOfString:@"mobile.example.com"];
if (range.location != NSNotFound) {
NSLog(@"%s", "This link matches the pattern and will be loaded in-app within the UIWebView.");
return YES;
} else {
NSLog(@"%s", "This link does NOT match the pattern and will be loaded in Safari.");
View navigate-all
/* = Adjust next/previous links to include multiple post types */
/*
* Replacement for get_adjacent_post()
*
* This supports only the custom post types you identify and does not
* look at categories anymore. This allows you to go from one custom post type
* to another which was not possible with the default get_adjacent_post().
* Orig: wp-includes/link-template.php
*
View gist:6799419
<!-- non-retina iPhone pre iOS 7 -->
<link rel="apple-touch-icon" href="apple-touch-icon-57x57.png" sizes="57x57">
<!-- non-retina iPad pre iOS 7 -->
<link rel="apple-touch-icon" href="apple-touch-icon-72x72.png" sizes="72x72">
<!-- non-retina iPad iOS 7 -->
<link rel="apple-touch-icon" href="apple-touch-icon-76x76.png" sizes="76x76">
<!-- retina iPhone pre iOS 7 -->
<link rel="apple-touch-icon" href="apple-touch-icon-114x114.png" sizes="114x114">
<!-- retina iPhone iOS 7 -->
<link rel="apple-touch-icon" href="apple-touch-icon-120x120.png" sizes="120x120">
View jquery.infinitescroll.sr.js
/*
--------------------------------
Infinite Scroll Behavior
Simply Recipes Mobile Style
: Infinite scroll waits for a one-time manual trigger
--------------------------------
by Jesse Gardner, http://plasticmind.com
*/
$.extend($.infinitescroll.prototype,{
View gist:5262783
javascript:(function(){ p=prompt('Search this domain for:',''); if(p){ document.location.href='http://www.google.com/search?q=site:'+document.location.href.split('/')[2]+' '+escape(p)} })();