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
<!-- | |
vertically centered table cell | |
--> | |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<title>Vertically Centered</title> | |
<meta name="warning" content="HC SVNT DRACONES" /> | |
<style type="text/css"> | |
body, table, tr, td { margin: 0; padding: 0; } |
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
<!-- | |
sliding frames, as seen on normative.com | |
--> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Sliding Frames</title> | |
<meta name="warning" content="HC SVNT DRACONES" /> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset/reset-min.css" /> |
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
<!-- | |
scaling background, as seen on normative.com | |
--> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Scaling Background</title> | |
<meta name="warning" content="HC SVNT DRACONES" /> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.6.0/build/reset/reset-min.css" /> |
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
NSString *imagePath = @"/tmp/test.jpg"; | |
CGDataProviderRef imageDataProvider = CGDataProviderCreateWithFilename([imagePath UTF8String]); | |
CGImageRef image = CGImageCreateWithJPEGDataProvider(imageDataProvider, NULL, false, kCGRenderingIntentDefault); | |
CGDataProviderRelease(imageDataProvider); | |
size_t bytesPerPixel = 4; | |
size_t bitsPerComponent = 8; | |
size_t imageWidth = CGImageGetWidth(image); | |
size_t imageHeight = CGImageGetHeight(image); |
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
# howisobamadoing.com / howisromneydoing.com | |
# (c) justinouellette.com MMXII | |
require 'rubygems' | |
require 'sinatra' | |
CACHE_TIME = 3600 # one hour | |
OBAMA_DATA_PATH = 'obama.txt' | |
ROMNEY_DATA_PATH = 'romney.txt' |
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
/* | |
JSTN THEME FOR LIMECHAT 1.0 | |
put this and the other thing in ~/Library/Application Support/LimeChat/Themes/ | |
bg 1a2230 | |
hlight 273146 | |
red e44347 | |
purps 8b84d0 | |
fuscia c2339a |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>1 1 1 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Monaco - 12.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>1 1 1 1</string> |
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
#include "JXBezier.h" | |
#include <math.h> | |
JXUnitBezier JXUnitBezierMake(double p1x, double p1y, double p2x, double p2y) { | |
JXUnitBezier bezier; | |
bezier.cx = 3.0 * p1x; | |
bezier.bx = 3.0 * (p2x - p1x) - bezier.cx; | |
bezier.ax = 1.0 - bezier.cx - bezier.bx; | |
bezier.cy = 3.0 * p1y; | |
bezier.by = 3.0 * (p2y - p1y) - bezier.cy; |
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
- (NSTimeInterval)frameRateForMovie:(QTMovie *)movie | |
{ | |
for (QTTrack *track in [movie tracks]) { | |
QTMedia *media = [track media]; | |
if (![media hasCharacteristic:QTMediaCharacteristicHasVideoFrameRate]) | |
continue; | |
QTTime duration = [(NSValue *)[media attributeForKey:QTMediaDurationAttribute] QTTimeValue]; | |
long sampleCount = [(NSNumber *)[media attributeForKey:QTMediaSampleCountAttribute] longValue]; | |
return sampleCount * ((NSTimeInterval)duration.timeScale / (NSTimeInterval)duration.timeValue); | |
} |
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
// JSTN / 10 June 2014 | |
// I really like Swift so far, but I can't help be a little sad that I still find | |
// myself doing the weakSelf/strongSelf dance to avoid retain cycles. | |
// For a contrived example, suppose we had a class like this with a queue: | |
import Foundation | |
class ParallelMessenger { |
OlderNewer