FOR IMMEDIATE RELEASE
## AppName vX.X does something interesting
AppName vX.X is on the App Store now, and features the following very interesting feature. This is a summary, so I'm focusing on the lead. Just something to make me want to read the rest. Done.
City, State/Country - [Company/Developer] has released AppName vX.X, available in the Mac App Store. AppName is/does [broad, general strokes]. [A few more specific points about who it's for and why it's of benefit to them].
New features!
// TTF or OTF fonts are supported. | |
// Drag font into project, and copy into target. | |
// Add this to [App]-Info.plist: "Fonts provided by application" | |
// Add all font filenames to this property (i.e. "my_font.ttf" or "fontName.otf") | |
// Use font in your code! (Get the name using the code below; it won't always be the same as the filename.) | |
// Lists all font names | |
for ( NSString *familyName in [UIFont familyNames] ) { | |
NSLog(@"Family %@", familyName); | |
NSLog(@"Names = %@", [UIFont fontNamesForFamilyName:familyName]); |
CREATE FUNCTION get_distance_km(alat double precision, alon double precision, lat double precision, lon double precision) RETURNS double precision | |
LANGUAGE plpgsql | |
AS $$ | |
DECLARE | |
radius_earth FLOAT; | |
radian_lat FLOAT; | |
radian_lon FLOAT; | |
distance_v FLOAT; | |
distance_h FLOAT; | |
distance FLOAT; |
David Foster Wallace - Transcription of the 2005 Kenyon Commencement Address - May 21, 2005
(If anybody feels like perspiring [cough], I'd advise you to go ahead, because I'm sure going to. In fact I'm gonna [mumbles while pulling up his gown and taking out a handkerchief from his pocket].) Greetings ["parents"?] and congratulations to Kenyon's graduating class of 2005. There are these two young fish swimming along and they happen to meet an older fish swimming the other way, who nods at them and says "Morning, boys. How's the water?" And the two young fish swim on for a bit, and then eventually one of them looks over at the other and goes "What the hell is water?"
This is a standard requirement of US commencement speeches, the deployment of didactic little parable-ish stories. The story ["thing"] turns out to be one of the better, less bullshitty conventions of the genre, but if you're worried that I plan to present myself here as the wise, older fish explaining what water is to you younger fish, please do
## | |
# This is a quick script that will format/indent HTML | |
# HTML Tidy is often too destructive, especially with bad HTML, so we're using Beautiful Soup | |
## | |
# USAGE: Designed to be used on the command line, just pipe HTML to it, and it will output | |
# cat file.html | python format_html.py | |
### | |
# Download & Install Beautiful Soup, if you don't have it already: | |
# Go to the Beautiful Soup web site, http://www.crummy.com/software/BeautifulSoup/ | |
# Download the package |
#!/usr/bin/env bash | |
# This is an RVM Project .rvmrc file, used to automatically load the ruby | |
# development environment upon cd'ing into the directory | |
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional. | |
environment_id="ruby-1.9.2-p290@pc-black-label" | |
# | |
# First we attempt to load the desired environment directly from the environment |
var prettyTweetDate = function(tweetDateFromJSON) { | |
var tweetDate = new Date(Date.parse(tweetDateFromJSON)), | |
tweetHours = tweetDate.getHours(); | |
tweetHours = (tweetHours < 13) ? tweetHours : tweetHours - 12; | |
var tweetDateSuffix = function(day) { | |
switch (day) { | |
case 1: case 21: case 31: | |
return "st"; break; |
# Just copy this line into your terminal | |
# Replace "clear ; rake" with whatever command(s) you want to time. | |
start=`date +'%s'` ; clear ; rake ; end=`date +'%s'`; echo \*\*\* Task took `expr $end - $start` seconds to run. | |
# Even better, add this to your ~/.bash_profile (or similar) file: | |
function timer() { | |
start=`date +'%s'`; | |
$@ | |
end=`date +'%s'`; | |
echo \*\*\* Task took `expr $end - $start` seconds to run.; |
<?php | |
/* | |
* File to convert NextBus' XML Feeds to JSON format | |
* that our script will use. | |
*/ | |
// Get route from $_GET['r'] variable, or set to default | |
// TODO: Add in check for valid route | |
$route = (isset($_GET['r']) && (int) $_GET['r'] != 0) ? (int) $_GET['r'] : '501'; |