Skip to content

Instantly share code, notes, and snippets.

# reminder for h.264 + theora <video> preflighting. ignoring stupid webm for now.
# html5 code looks like (yes, the single/double quotes are correct)
# use medieelement.js for flash fall-through
#
# <video width="600" height="450">
# <source src="http://.../screencast.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
# <source src="http://.../screencast.ogv" type='video/ogg; codecs="theora, vorbis"'>
# </video>
# convert mov container to mpeg-4
@cdzombak
cdzombak / gist:5647387
Created May 25, 2013 00:21
name.com shadiness no more?
~
> dig NS chrisdzombak.net
; <<>> DiG 9.8.3-P1 <<>> NS chrisdzombak.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13476
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
@cdzombak
cdzombak / mutablestrings.m
Created July 17, 2013 20:11
NSString and NSMutableString fun
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
NSMutableString *a_mutable = [[NSMutableString alloc] initWithString:@"foo"];
NSString *a_cast_immutable = (NSString *)a_mutable;
assert(a_mutable == a_cast_immutable);
NSMutableString *b = [a_cast_immutable mutableCopy];
@cdzombak
cdzombak / .last-uls-search-hash
Last active September 15, 2021 00:22
watching for my amateur radio license to appear in the FCC's database!
6be5d57c4d0c622216b38c5ea62195a5
@cdzombak
cdzombak / coffee.md
Last active December 20, 2015 08:19
Notes on Coffee, updated Dec. 2014

Drip/Showerhead

For a quick, large batch of coffee on weekday mornings (or busy weekends!), I have recently been using this Bonavita brewer. I usually make around 600-800 mL, using a medium grind, and using a 15:1 water:coffee ratio by mass.

French Press

I just recently got this press. I haven't tried it yet, but I suspect I will end up using it every weekend.

V60

@cdzombak
cdzombak / ios.md
Last active December 25, 2015 06:59
notes on getting started with iOS
@cdzombak
cdzombak / main.m
Created January 11, 2014 03:36
float comparisons in Objective-C
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
NSLog(@"0.1: %@", 0.1f == 0.1 ? @"exactly equal" : @"not exactly equal");
NSLog(@"0.5: %@", 0.5f == 0.5 ? @"exactly equal" : @"not exactly equal");
NSLog(@"1.0: %@", 1.0f == 1.0 ? @"exactly equal" : @"not exactly equal");
}
}
@cdzombak
cdzombak / dropbox
Created January 11, 2014 23:05 — forked from migrs/dropbox
/etc/init.d/dropbox
# /etc/init.d/dropbox
### BEGIN INIT INFO
# Provides: dropbox
# Required-Start: $network $syslog $remote_fs
# Required-Stop: $network $syslog $remote_fs
# Should-Start: $named $time
# Should-Stop: $named $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop the dropbox daemon for debian/ubuntu
@cdzombak
cdzombak / dropbox.dzombak.com
Last active January 3, 2016 01:09
Basic nginx configuration to serve Dropbox Public folder
server {
listen 80;
server_name www.dropbox.dzombak.com;
rewrite ^ http://dropbox.dzombak.com$request_uri? permanent;
}
server {
listen 80;
server_name dropbox.dzombak.com;
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2
-- Added: creation date, due date, start date functionality
-- Empty your Things Trash first.
-- Note that this won't move over scheduled recurring tasks.