Skip to content

Instantly share code, notes, and snippets.

View frijole's full-sized avatar
🌯

Ian Meyer frijole

🌯
View GitHub Profile
@dreness
dreness / logfreq.sh
Created September 7, 2021 19:02
macOS log haystack needler
#!/bin/zsh
# set -x
# Reference: https://dreness.com/blog/archives/155773
usage() {
print "$1: Use histograms to explore os_log data.
Usage: $1 [-k logKey] [-l logtime] [-h] [predicate]
-k Calculate frequency of unique values of this log attribute.
@nathancrank
nathancrank / purge.txt
Created December 1, 2018 17:09
Purge Time Machine Snapshots
tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
@mihaelamj
mihaelamj / UIView+Caar.swift
Created October 23, 2018 09:20
caar UIVIew extension for loading .caar files. great with Kite Compositor
import UIKit
//Example from:
//https://github.com/kitecomp/archive-example
//wrapped into a small UIView category
//https://gist.github.com/mihaelamj/79878ba7b7881a12f1652c113adcf5d8
public extension UIView {
public func loadCAARAnimation(named: String, scale : CGFloat = 1.0) -> CALayer? {
@fasiha
fasiha / README.md
Last active December 29, 2024 16:11
Set up RTL-SDR, dump1090, and dump978 for ADS-B/TIS-B/FIS-B/UAT on macOS

Introduction

I’m not very familiar with the aviation jargon (see FAA’s ADS-B FAQ), but ADS-B is a next-gen system where aircraft are equipped with transponders that periodically broadcast their own positions and receive the reports from both other aircraft (direct air-to-air) as well as air-traffic control (ATC) ground transmitters.

There are two separate ADS-B radio bands: the commercial aviation (CA) is at 1090 MHz while the general aviation (GA) is at 978 MHz. If I can be permitted a gross generalization—the former corresponds to big commercial jets and the latter to small private aircraft.

Because ADS-B is designed to democratize airspace situational awareness (in contrast to the older setup, like from films, where a central air-traffic controller is coordinating all these aircraft that can’t see each other), we can buy cheap RF receivers to pick up and decode the messages being broadcast by aircraft and ground towers to get our own picture of the

@warpling
warpling / CircularTextView.h
Last active March 21, 2017 23:26
CircularTextView (as seen in the iOS app Blackbox)
//
// CircularTextView.h
// Wormhole
//
// Created by Ryan McLeod on 5/5/15.
// Copyright (c) 2015 Ryan McLeod. All rights reserved.
//
#import <UIKit/UIKit.h>
@zischwartz
zischwartz / rgb_to_lab.swift
Created March 23, 2016 19:54
Convert RGB to L*ab color space in Swift
//http://stackoverflow.com/a/24201042/83859
infix operator ^^ { }
func ^^ (radix: Double, power: Double) -> Double {
return Double(pow(Double(radix), Double(power)))
}
//Based on https://github.com/d3/d3-color/blob/master/src/lab.js
@mortenbekditlevsen
mortenbekditlevsen / UIDevice+DetectBlur.h
Last active February 23, 2017 16:35
Detecting whether or not the UIVisualEffectView is available and supports the UIBlurEffect
//
// UIDevice+DetectBlur.h
// BlurTest
//
// Created by Morten Ditlevsen on 28/01/15.
// Copyright (c) 2015 Mojo Apps. All rights reserved.
//
#import <UIKit/UIKit.h>
//
// XMLObjectMapper.h
// Copyright (c) 2014 Justin Driscoll All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@steventroughtonsmith
steventroughtonsmith / gist:6763213
Created September 30, 2013 12:39
Non-opaque application windows in iOS 7, with optional blur. Shows the user's wallpaper under the app, with Parallax if supported.
typedef enum _UIBackgroundStyle {
UIBackgroundStyleDefault,
UIBackgroundStyleTransparent,
UIBackgroundStyleLightBlur,
UIBackgroundStyleDarkBlur,
UIBackgroundStyleDarkTranslucent
} UIBackgroundStyle;
@interface UIApplication (UIBackgroundStyle)
-(void)_setBackgroundStyle:(UIBackgroundStyle)style;
@frijole
frijole / RikerIpsum.h
Last active December 15, 2015 04:29
the best placeholder text ever
//
// RikerIpsum.h
//
// Based on http://www.rikeripsum.com
// Created by @frijole on 3/19/13.
//
#import <Foundation/Foundation.h>
@interface RikerIpsum : NSObject