Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Dzombak cdzombak

View GitHub Profile
View gist:5086228
# 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
name.com shadiness no more?
View gist:5647387
~
> 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 Jul 17, 2013
NSString and NSMutableString fun
View mutablestrings.m
#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 Sep 15, 2021
watching for my amateur radio license to appear in the FCC's database!
View .last-uls-search-hash
6be5d57c4d0c622216b38c5ea62195a5
@cdzombak
cdzombak / coffee.md
Last active Dec 20, 2015
Notes on Coffee, updated Dec. 2014
View coffee.md

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 Dec 25, 2015
notes on getting started with iOS
View ios.md
@cdzombak
cdzombak / main.m
Created Jan 11, 2014
float comparisons in Objective-C
View main.m
#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 Jan 11, 2014 — forked from migrs/dropbox
/etc/init.d/dropbox
View 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 Jan 3, 2016
Basic nginx configuration to serve Dropbox Public folder
View dropbox.dzombak.com
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;
View things-to-of.applescript
--------------------------------------------------
--------------------------------------------------
-- 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.