Skip to content

Instantly share code, notes, and snippets.

View armcknight's full-sized avatar
🏔️

Andrew McKnight armcknight

🏔️
View GitHub Profile
Your post advocates a
( ) technical ( ) legislative ( ) market-based ( ) vigilante
approach to fighting spam. Your idea will not work. Here is why it won't work. (One or more of the following may apply to your particular idea, and it may have other flaws which used to vary from state to state before a bad federal law was passed.)
( ) Spammers can easily use it to harvest email addresses
( ) Mailing lists and other legitimate email uses would be affected
( ) No one will be able to find the guy or collect the money
( ) It is defenseless against brute force attacks
@armcknight
armcknight / twitter-og-logo.svg
Last active July 24, 2023 19:14
Twitter OG Logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@armcknight
armcknight / twitter-larry-bird-behind-the-scenes.svg
Created July 24, 2023 19:09
Twitter Larry Bird Behind the Scenes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@armcknight
armcknight / twitter-larry.svg
Created July 24, 2023 19:06
Twitter Larry Bird SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@armcknight
armcknight / one-liners.sh
Last active April 25, 2023 20:12
Collection of useful terminal commands
# from @danielpunkass: Here’s my shorthand trick for dumping a binary
# to see the context of where the ObjC methods are implemented, even
# if they don’t export debugger symbols:
otool -ov <binaryname> | grep -A 3 <methodName>
@armcknight
armcknight / sy.md
Created January 31, 2022 20:40 — forked from cornchz/sy.md
Notes from the Mystery Machine Bus - Steve Yegge

Notes from the Mystery Machine Bus

I've spent the past eight years (starting back in June 2004) writing elaborate rants about a bunch of vaguely related software engineering issues.

I was doing all that ranting because I've been genuinely perplexed by a set of "bizarre" world-views held dear by -- as far as I can tell -- about half of all programmers I encounter, whether online or in person.

Last week, after nearly a decade of hurling myself against this problem, I've finally figured it out. I know exactly what's been bothering me.

In today's essay I'm going to present you with a new conceptual framework for thinking about software engineering. This set of ideas I present will be completely obvious to you. You will probably slap yourself for not having thought of it yourself. Or you might slap the person next to you. In fact you probably have thought of it yourself, because it is so blindingly obvious.

@armcknight
armcknight / gurl.fish
Created January 29, 2022 00:59
construct a GitHub URL with a filename and optionally line number/range in the current repo/branch
function gurl -a filePath lineNumber rangeEndLineNumber -d "create a URL for a file on GitHub's website, for the current repo and working branch, optionally with a line number or range"
set branchname (git rev-parse --abbrev-ref HEAD)
set repourl (git config --get remote.origin.url | sed s/\\.git// | sed 's/:/\//' | sed 's/.*github.com/https:\/\/github.com/') # h/t https://gist.github.com/richardmcmillen-examtime/7448300
if test (count $argv) -eq 3
echo $repourl/blob/$branchname/$filePath\#L$lineNumber-L$rangeEndLineNumber
else if test (count $argv) -eq 2
echo "$repourl/blob/$branchname/$filepath#L$lineNumber"
else
echo $repourl/blob/$branchname/$filePath
end
@armcknight
armcknight / gweb.fish
Created January 29, 2022 00:33
Fish shell function to open a file in current local git repo on GitHub's website
function gweb -d "view a file on GitHub's website, in the current repo and working branch"
set branchname (git rev-parse --abbrev-ref HEAD)
set repourl (git config --get remote.origin.url | sed s/\\.git// | sed 's/:/\//' | sed 's/.*github.com/https:\/\/github.com/') # h/t https://gist.github.com/richardmcmillen-examtime/7448300
open $repourl/blob/$branchname/$argv[1]
end
@armcknight
armcknight / ugh
Last active May 25, 2021 21:53
UGH - uncrustify git history
#!/bin/sh
# ugh.sh
#
#
# Created by Andrew McKnight on 11/27/14.
#
# UGH: uncrustify git history.
# Creates a new branch and cherry picks a range of commits, uncrustifying any modified .h/.m files.
@armcknight
armcknight / install_xcode.sh
Last active February 26, 2021 22:35
Install Xcode via command line
#!/bin/sh
#
# install_xcode.sh
#
# Created by Andrew McKnight on 9/24/15
#
# takes a downloaded .dmg containing Xcode and installs it to a specified location/name, or defaults to /Applications and the DMG's filename
#