Skip to content

Instantly share code, notes, and snippets.

View inquinity's full-sized avatar

Robert Altman inquinity

View GitHub Profile
#!/bin/bash
# This script is authored by Robert Altman, OptumRx
# robert.altman@optum.com
# Version 1.2.1
# Requirements:
# * Docker Desktop, or docker cli
# * jq formatter - https://jqlang.github.io/jq/
@inquinity
inquinity / util.c
Created October 6, 2014 14:12
Objective C utilities
static NSString *binaryRepresentation(int value)
{
long nibbleCount = sizeof(value) * 2;
NSMutableString *bitString = [NSMutableString stringWithCapacity:nibbleCount * 5];
for (int index = 4 * nibbleCount - 1; index >= 0; index--)
{
[bitString appendFormat:@"%i", value & (1 << index) ? 1 : 0];
if (index % 4 == 0)
{
@inquinity
inquinity / .bash_aliases
Last active August 29, 2015 14:07
OS/X bash files
# Suggestions from StackOverflow:
# 1. functions and aliasses should go in ~/.bashrc and ~/.bash_profile or ~/.profile should source ~/.bashrc
# 2. sourcing one from the other makes life much easier. For safety, I have my .bash_profile check first, like this: if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
# Alias formats
# alias la='ls -a'
# alias ll='ls -la'
# alias lf='ls -aleO@'
alias h=history