Skip to content

Instantly share code, notes, and snippets.

View drewvolz's full-sized avatar

Drew Volz drewvolz

View GitHub Profile
@drewvolz
drewvolz / git_filter_branch_author_committer_rewrite.sh
Created April 16, 2024 02:32
change author and committer date for commit
FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --env-filter \
'if [ $GIT_COMMIT = cadb5e418e72932ce6c0c7c79c07d7cdec0b080b ]
then
export GIT_AUTHOR_DATE="Sun Apr 14 14:00 2024 -0700"
export GIT_COMMITTER_DATE="Sun Apr 14 14:00 2024 -0700"
fi'
@drewvolz
drewvolz / main.yml
Last active December 18, 2022 08:16
workflow for using ipatool to get an artifact
name: ipatool get artifact
on: [push]
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
#!/bin/bash
set -e -o pipefail
price=$1
content=$( curl -s -X GET https://app.bottomless.com/api/open-shop )
count=$( jq -M 'reduce (.[] | select(.products[].variants[].price == '$price' )) as $i (0;.+=1)' <<< "${content}" )
import SwiftUI
struct HomeView: View {
var layout: [GridItem] {
[
GridItem(.fixed(150)),
GridItem(.fixed(150)),
]
}
@drewvolz
drewvolz / hide-inline-github-comments.js
Created December 16, 2019 23:16
hides those github comments in one swoop
document.querySelectorAll('.inline-comments').forEach(c => c.setAttribute('hidden', ''))
@drewvolz
drewvolz / TableViewManager.h
Created June 1, 2019 06:04
/System/Library/PrivateFrameworks/AirPortAssistant.framework/AirPortAssistant
@interface TableViewManager : NSObject <UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate> {
double _cellContentWidth;
double _cellLeftEdgeOrigin;
UIView * _currentFirstResponder;
NSIndexPath * _currentFirstResponderCellPath;
id _delegate;
UIColor * _detailTextColor;
UIColor * _editTextColor;
ManagedTableViewCell * _gLayoutGenericCell;
ManagedTableViewCell * _gLayoutNoBackgroundCell;
@drewvolz
drewvolz / check-format
Last active October 18, 2016 20:56
runner/checker for rust-like formatting for C code
#!/bin/sh
./format-code
changed_files=$(git ls-files -m)
if [ -n "$changed_files" ]; then
echo "The following files are improperly formatted: $changed_files";
exit 1
fi
echo "Code properly formatted"
@drewvolz
drewvolz / format-code
Last active October 18, 2016 20:53
rust-like formatting for C code
#!/bin/sh
if [ -z "$1" ]; then
dir=$(pwd)
else
dir=$1
fi
files=$(find . -name "*.c" -o -name "*.h")
indent -nbad -bap -bbo -bc -br -brf -bli0 -brs -cbi4 -ce -cdw -cli4 -di4 -hnl -i4 -l99 -lc99 -lp -npcs -npsl -nut -ts4 $files

Keybase proof

I hereby claim:

  • I am drewvolz on github.
  • I am drewvolz (https://keybase.io/drewvolz) on keybase.
  • I have a public key ASCSqVmkhbO9HAxsYyZBYNpqVWYjSpJln5rV-lp8JAed8wo

To claim this, I am signing this object:

@drewvolz
drewvolz / .bashrc
Last active February 22, 2016 04:06
# User specific aliases and functions
# This is for use in your standard bash prompt
# Although I do prefer fish...
#Color Definitions
RED="\033[0;31m"
GREEN="\033[0;32m"
YELLOW="\033[0;33m"
BLUE="\033[0;34m"
MAGENTA="\033[0;35m"