Brian Cantoni bcantoni

View ImportExport.pm.diff
1 2 3 4 5 6 7 8 9 10
--- ImportExport.pm.bak 2014-04-01 12:45:00.873266322 -0400
+++ ImportExport.pm 2014-04-01 17:35:53.995130625 -0400
@@ -483,15 +483,14 @@
$tmpl->text(<<'TEXT');
AUTHOR: <$MTEntryAuthor strip_linefeeds="1"$>
TITLE: <$MTEntryTitle strip_linefeeds="1"$>
-BASENAME: <$MTEntryBasename$>
+BASENAME: <mt:IfNonEmpty tag="EntryKeywords"><$MTEntryKeywords$><mt:Else><$MTEntryTitle dirify="1"></mt:IfNonEmpty>
STATUS: <$MTEntryStatus strip_linefeeds="1"$>
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
View markdown.js
1
javascript:var%20text='['+document.title+']('+location.href+')';window.prompt("Copy%20to%20clipboard:%20Ctrl+C,%20Enter",text);void(0);
View friends.php
1 2 3 4 5 6 7 8 9 10
<?php
 
/* friends.php - use Twitter API to export data (CSV format) on people you are following
 
Installation:
1. Install Twitter OAuth PHP library (https://github.com/abraham/twitteroauth)
2. Adjust twitteroauth.php include path below
3. Create Twitter application (https://dev.twitter.com/apps)
4. Fill in 4 Twitter app keys below
5. Adjust $fields array if you want different fields saved
View pushit.php
1 2 3 4 5 6 7 8 9
#!/usr/bin/php
<?php
/* pushit
 
Command-line script for uploading files:
* reduce image file size thru online Smush.it service
* add file signature (md5) to name for uniqueness and long expiration times
* configurable copy command to blog, Amazon S3, etc.
* configurable move original file to local archive
View json-int.php
1 2 3 4 5 6 7 8 9 10
<?php
/* Demonstration of problem with large integers in JSON, and
a couple options for dealing with them as strings instead.
 
ref:
* http://php.net/manual/en/function.json-decode.php
* http://stackoverflow.com/questions/2907806/handling-big-user-ids-returned-by-fql-in-php
*/
 
$json = <<<EOT
View Makefile
1 2 3 4 5 6 7 8 9 10
# Makefile for JS/CSS:
# Uses Closure for JS compiling, YUI for CSS compiling, and JsHint for code quality checking
 
MAKEFLAGS = --no-print-directory --always-make
MAKE = make $(MAKEFLAGS)
 
BUILDDIR = ./.build
 
CLOSUREURL = http://closure-compiler.googlecode.com/files/compiler-latest.zip
CLOSUREDIR = $(BUILDDIR)/closure
View gist:111953
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl
 
$foo = "alert ('foo');";
 
open (FH, ">file.in");
print FH $foo;
close (FH);
 
system ("java -jar yuicompressor-2.4.2.jar --type js <file.in >file.out");
Something went wrong with that request. Please try again.