Skip to content

Instantly share code, notes, and snippets.

@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>
@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 / 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 / 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 / FormatJSON.sh
Created September 7, 2012 16:41
BBEdit Text Filter to "pretty print" JSON
#!/bin/bash
python -m json.tool
@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 / spikeroak.sh
Created December 10, 2016 02:20
A bash script to download and verify spideroak.com's warrant canary file.
#!/bin/bash
#
# spideroak.sh
#
# A bash script to download and verify spideroak.com's warrant canary file.
# Requires GnuPG to be installed ( https://gpgtools.org https://www.gnupg.org )
#
# by Levi Brown
# levigroker@gmail.com
# December 9, 2016
@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 / 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 / ASCII to Hex
Last active May 25, 2021 20:35
A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same.
#!/bin/bash
#
# ASCII to Hex
# https://gist.github.com/levigroker/193ba909e2354de870513eec46c08222
#
# A BBEdit Text Filter script to take textual input and produce hedidecimal array values of the same.
# See http://bbeditextras.org/wiki/index.php?title=Text_Filters
# Levi Brown
# levigroker@gmail.com
# December 8, 2016