Skip to content

Instantly share code, notes, and snippets.

Chris Dzombak cdzombak

Block or report user

Report or block cdzombak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#!/usr/bin/env bash
set -u
EMAIL_SUBJECT="[] Website"
cdzombak /
Created Jun 11, 2019
Mastodon health checks, run every minute via cron on a separate server
#!/usr/bin/env bash
set -u
NOW=$(date +"%F %T %Z")
if curl -s | grep -c OK > /dev/null ; then
cdzombak / listening
Created May 31, 2019
simple cross-platform wrapper for lsof/netstat to tell what processes are listening for network connections
View listening
#!/usr/bin/env python3
import argparse
import platform
import subprocess
import sys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
# by codl <>
# put this in /usr/libexec/netdata/charts.d
# chown root:netdata and chmod +x
sidekiq_check() {
redis-cli get 'stat:processed' > /dev/null 2> /dev/null
cdzombak /
Last active Apr 12, 2019
youtube-dl wrapper for downloading videos direct to the correct Plex collection on my plex Mac Mini
# all sorts of more advanced features are available, but this is a start:
if [ -z $1 ]; then
echo "Syntax: $0 VIDEO_URL"
exit 1
View apple-iphone-batteries-slack-transcript.txt
it makes sense, and I suspect you’d see something similar on any device with a worn battery (edited)
basically everything battery powered changes clock speeds based on battery voltage level and whether you’re plugged in (_edit:_ also based on workload, so you’re not running at full speed and burning battery power when you’re not doing anything) (edited)
you can’t run a CPU at full speed when the battery voltage is low (edited)
so it follows that when the battery is worn out (and its top voltage is presumably lower), performance is consistently lower
the phone knows about battery age/wear, and takes that into account for the user-facing battery percentage meter
cdzombak / cdz.dump1090.plist
Created Jan 29, 2017
launchd plists for dump1090 and the QEMU Pi emulator. Will require changing to use your OS X username. See:
View cdz.dump1090.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
cdzombak / CDZScalingButton.h
Created Jan 21, 2017
A UIButton with a nice scaling effect when the user touches down on it.
View CDZScalingButton.h
// CDZScalingButton.h
// ScalingButton
// Created by Chris Dzombak on 10/17/15.
// Copyright © 2015 Chris Dzombak. All rights reserved.
@import UIKit;
View FileURL.swift
// FileURL.swift
// Created by Chris Dzombak on 11/16/16.
import Validated
public typealias FileURL = Validated<URL, FileURLValidator>
public struct FileURLValidator: Validator, _FileURL_Validating {
View Swift

Hello Everyone,

The Swift 3 release is nearing completion, so it is time to look back on the release, learn from what happened, and use it to shape what we (the Swift community) do in the year ahead. Overall, Swift 3 is going to be an absolutely amazing release, and it is impressive how much got done. Thank you to everyone who contributed to making it happen. Instead of diving into a flurry of new proposals immediately, it is important to take stock of where we are, and look at the bigger picture.

Metapoint: this email is ridiculously long and covers multiple topics. Instead of replying to it directly, it is best to start new threads on individual topics that you’d like to discuss. Just tag them with “[Swift 4]” in the subject line.

Swift 3 Retrospective

Every year of Swift’s development has been completely different from the previous one, and I expect Swift 4 to continue this trend. With a goal of learning and improving year over year, here are some observations & retrospective about Swi

You can’t perform that action at this time.