Skip to content

Instantly share code, notes, and snippets.

@levigroker
levigroker / com.levigroker.degrees_keepalive.plist
Last active January 8, 2022 19:39
Launch Agent to keep Degrees.app alive after a crash.
<!--
Launch Agent to keep Degrees.app alive after a crash.
Created May 9, 2016 by Levi Brown
https://gist.github.com/levigroker/b172287d1e84d4945d995108c10f79c8
Add to `~/Library/LaunchAgents/com.levigroker.degrees_keepalive.plist`
`cd ~/Library/LaunchAgents`
`launchctl load com.levigroker.degrees_keepalive.plist`
Copyright (c) 2016 Levi Brown <mailto:levigroker@gmail.com>
@levigroker
levigroker / keybase.md
Last active September 20, 2019 04:27
Keybase.io Proof of Identity

Keybase proof

I hereby claim:

  • I am levigroker on github.
  • I am levigroker (https://keybase.io/levigroker) on keybase.
  • I have a public key ASA5Qo_hEJl43QrIZMrJSeu4IVBEPmXD-MAr19Uo2wGUZQo

To claim this, I am signing this object:

@levigroker
levigroker / OrientationRespectfulNavigationController.h
Last active October 12, 2015 21:39
OrientationRespectfulNavigationController
//
// OrientationRespectfulNavigationController.h
//
// Created by Levi Brown on 11/15/12. @levigroker
// This work is licensed under a Creative Commons Attribution 3.0 Unported License
// http://creativecommons.org/licenses/by/3.0/
// Attribution to Levi Brown (@levigroker) is appreciated but not required.
//
/*
@levigroker
levigroker / JSON Format.sh
Last active November 16, 2023 22:00
BBEdit Text Filter to "pretty print" JSON
#!/bin/bash
# JSON Format - BBEdit Text Filter to "pretty print" JSON
# https://gist.github.com/levigroker/3777091
# 2023-11-16
JQ_E="jq"
which "$JQ_E" >/dev/null 2>&1
[ $? == 0 ] || { echo "ERROR: Please ensure '$JQ_E' is installed. 'brew install $JQ_E' (see https://jqlang.github.io/jq/ )" >&2; exit 1; }
$JQ_E --sort-keys --tab .
@levigroker
levigroker / KeychainItem.h
Created September 7, 2012 22:54 — forked from dhoerl/KeychainItemWrapper.h
KeychainItem
/*
File: KeychainItem.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
KeychainItem by Levi Brown is licensed under a Creative Commons Attribution 3.0 Unported License.
To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/
Based on a work at https://developer.apple.com/library/ios/#samplecode/GenericKeychain
Some ARC conversion modifications were made based on: https://gist.github.com/1170641
Under the terms of this license, the above attribution and license statements are to remain
@levigroker
levigroker / FormatJSON.sh
Created September 7, 2012 16:41
BBEdit Text Filter to "pretty print" JSON
#!/bin/bash
python -m json.tool
@levigroker
levigroker / com.levigroker.unhide_library.plist
Created September 7, 2012 16:30
Shell script to change the flags on the user's Library directory so it appears in the Finder once again.
<?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>Label</key>
<string>com.levigroker.unhide_library</string>
<key>LingonWhat</key>
<string>/Users/levi/Library/Automation/unhide_library.sh</string>
<key>ProgramArguments</key>
<array>
@levigroker
levigroker / gist:2630702
Created May 7, 2012 21:50
Override deprecation compiler warning
#ifdef DEBUG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[TestFlight setDeviceIdentifier:[[UIDevice currentDevice] uniqueIdentifier]];
#pragma clang diagnostic pop
#endif
@levigroker
levigroker / RemoteDataServiceTest.m
Created January 19, 2012 23:46
Sample GHUnit Asynchronous Test
#import <GHUnitIOS/GHUnit.h>
@interface RemoteDataServiceTest : GHAsyncTestCase { }
@end
@implementation RemoteDataServiceTest
- (BOOL)shouldRunOnMainThread
{
// By default NO, but if you have a UI test or test dependent on running on the main thread return YES.
@levigroker
levigroker / hook_error.html
Created August 23, 2011 19:21
Jenkins GitHub POST commit hook error message
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>Apache Tomcat/7.0.19 - Error report</title>
<style type="text/css">
<!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}-->
</style>
</head>