Skip to content

Instantly share code, notes, and snippets.

@JoshCheek
Last active August 15, 2016 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshCheek/20141283107d33c7d28b7e097f8cfedd to your computer and use it in GitHub Desktop.
Save JoshCheek/20141283107d33c7d28b7e097f8cfedd to your computer and use it in GitHub Desktop.
Scripting the location of ridiculous commits

For Sara https://twitter.com/sarambsimon/status/765197362553761793

Generally used this set of scripts to find stuff:

# A few assumptions in here, glance through it to figure out if you need to swap anything out / add / remove
ruby -r pp -e 'me = "Josh Cheek"; pp Dir["**/.git"].map { |d| File.dirname d }.flat_map { |d| Dir.chdir(d) { remote = %x(git remote --verbose | grep push).chomp; next [] if remote.empty?;  %x(git log --author="#{me}").lines.reject { |line| line =~ /^(Author|Date):/ || line == "\n" }.slice_before { |line| line =~ /^commit/ }.map { |commitline, *messages| [remote, commitline.split.last, messages.join.gsub(/^    /, "")] } } }'

# I redirected the output of the above into a file named "tmp" and then used it like this:

# how many times did I say "fuck"? (135, this excludes my "deleteme" dir)
ruby -r pp -e 'commits = eval File.read("./tmp"); pp commits.select { |proj, sha, message| message[/fuck/i] }.length'

# Well, lets fucking look at them! Add code to fix github links so I don't have to futz w/ it by hand
ruby -r pp -e 'def url(proj, sha) proj.split[1].gsub(/^git@([^:]*):/) { "http://#{$1}/" }.gsub(/\.git$/, "") << "/commit/#{sha}" end; commits = eval File.read("./tmp2"); puts commits.select { |proj, sha, message| message[/fuck/i] }.map { |proj, sha, message| "\e[31m#{url proj, sha}\e[0m\n#{message.gsub(/^/, %(  ))}" }'

First fucking commit

https://github.com/JoshCheek/heroku-buildpack-fuck-everything/commit/e28b875ef313b859784e0c1030782277b21e6879

Can barely type word :(

https://github.com/JoshCheek/heroku-buildpack-fuck-everything/commit/0cb7a38fdcbe5b77052fbc4eab51c75b5a191ab9

<3

https://github.com/pd/dotfiles/pull/4/commits/51b12f7b059ca35906dcff827fc3824233ae6e4e

Remove a note I made for myself that got turned into code and fucked the build

https://github.com/JoshCheek/seeing_is_believing/commit/e77832a2a8255ac16ecf9e6609939d2608d8a427

Uhm. Got the tests passing. JavaScript is stupid.
1. "use strict" is a fucking liar. Language to appease with competence bordering on gaslighting.
2. Aside from the new function syntax, everything is so fucking verbose, and its stdlib is reminiscent of C.
3. What's with this compilation thing? Didn't "dynamic" languages emerge as a response to this shit?
4. I drew an adorable comic to appease my frustrations, but the iPhone cant get it sent.
5. Fuck the iPhone -.-
6. Not in the mood.
7. Srsly.

https://github.com/JoshCheek/synseer/commit/08437ed4cbde570dd634570bfbae266a7431586f

Fuuuuuck, Seriously, its been like 3 or 4 hours now. Fuck Gulp.

https://github.com/JoshCheek/space_cadet/commit/01e63d6d02cc780fc09e7026699bbac0f5b8ad5f

Objects win, fuck your ADTs

https://github.com/JoshCheek/space_cadet/commit/c6c32af737be306d847753df3b6cb033bc6cbcf9

DO NOT DEPLOY THIS!
-------------------

It has one piece missing (prod middleware), but my family just showed up
and now I have to go entertain them for a bit, won't get to come back
and work on this for probably another 6 hours or so.
...

https://github.com/JoshCheek/miniature-octo-ironman/commit/e23b70e633a1407b2417ef317374b256d1a78614

...
OTHER THOUGHTS
==============

I'm writing Github flavoured markdown,
but I'm not actually sure if it will get rendered as such in the PR.
Esp since git considers leading octothorpes as comments and not headers,
and removes them...

Guess we'll see... bottoms up, friends!

https://github.com/pry/pry/commit/d8490e8f5325e8c7499634d9bcc64962fc6d7082

I am dead

https://github.com/JoshCheek/heroku-buildpack-for-cmake-and-pkg-config/commit/888a4a4e883299d83af493ec7b7e5d6c1dcd4427

Try ....yet-a-fucking-gain

https://github.com/JoshCheek/heroku-buildpack-for-cmake-and-pkg-config/commit/0260869b0e66e06ad4829b4a43aa3d72c5e2c882

Fuck, idk

https://github.com/JoshCheek/heroku-buildpack-for-cmake-and-pkg-config/commit/9867b7d04f749cea70b9ba6465295498914b1c2a

Uhhhhh shits blowin up, see if this works

https://github.com/JoshCheek/heroku-buildpack-for-cmake-and-pkg-config/commit/c874f60d8711a14b80e5bf341f4cc586889fad97

Add cmake... CROSS YAH FINGAHZ!!

https://github.com/JoshCheek/heroku-buildpack-for-cmake-and-pkg-config/commit/991fbae2979dfbd368169446c6373966e9e26905

JavaScript: Fucking ASCII bullshit

https://github.com/JoshCheek/language-sampler-for-fullpath/commit/63885fd539cd2ad0754f58d60c7afe1db6173a1e

Update vimrc

leader w -> seriously, vim, fucking write the file, goddamit
leader v -> vim, paste like you're a competent program, pls

http://github.com/JoshCheek/dotfiles/commit/c6f4033a8e1105b6ab9e197164ed7578bfb0c092

sigh well, it's working, just fucking annoying

http://github.com/JoshCheek/dotfiles/commit/de1767ee966e47a9a08a08d646fa9d4b7bc4e896

Uhm. Fuck if statements, lets just roll with this!

I've been awake way too long >.<

http://github.com/JoshCheek/day-dream-in-Ruby/commit/748b50aad916bc1f627707638bf718000be44c49

Mildly less bullshit implementation of guessing the correct syntax

http://heroku.com/synseer/commit/5f46fe67922d8f0a51421c59e14f1d590b76a348

Uhm, stuff

My reserve of "get shit done" seems to be depleated >.<

http://github.com/CodePlatoon/daily/commit/8e0b44b5de271c48ccbada8b39adf12a19d9c2a2

wat

http://github.com/JoshCheek/obfuscated/commit/22f492987b604a2ce42d2903bed8e91c1a268a48

Uhm..

http://github.com/JoshCheek/obfuscated/commit/5a239eb21cde4c671e5b4f7bac3474320d4a9b58

Uhhhh... hope this doesn't break all the things

http://github.com/turingschool/today/commit/8b97e671d0b3b1f26fffb73a7e4c427c6823cbbf

All the other boys try to chase me, but here's my number, so Ice cream maybe?

Hmm, this relationship sounds like it has a rocky road ahead of it.

http://github.com/turingschool/today/commit/829f0137bce06226553b3b0cfe3aab98f5fa1078

About to salt the earth -.-

http://heroku.com/synseer/commit/63a6e4073ee33db4e3b947fbfbbdaf4a2f7184a0

Back to here again -.-

http://github.com/JoshCheek/miniature-octo-ironman/commit/9a3e424980a67db8aae17d10c367838feefebba5

O.o eeetz alieeeve!

Can't believe it was that easy!

http://github.com/JoshCheek/day-dream-in-Ruby/commit/2a05379e3d16b698d8a7f46d311b96889ea3c2c4

Hearts for humans!

...and robots O.o

http://github.com/turingschool/today/commit/23b7d3c7fd79a9be9bf3cd358d403743382bb7d2

Holy shit, there are like a million things happening all around me O.o

https://github.com/JoshCheek/partially_implemented_sales_engine/commit/0dd6340ed20382ccffb1dcd23655939bc6aaad50

Frontend: lol, idk

http://github.com/JoshCheek/ruby_slippers_for_the_cobblers_children/commit/6208d4e5358041529ab219979ea03374f67bec2e

Add executable strings

Omg, I am writing this on the plane and someone walks by and bumps me 3 times per minute :(

http://github.com/JoshCheek/ruby_slippers_for_the_cobblers_children/commit/9dc3ec259bb679e72793b43f027ed8ae3801bc7a

Omg, I don't even know what's happening >.<

http://github.com/JoshCheek/mrspec/commit/1a4e9ba4ed4ff8e9f6e4ef3939b2882e71c14d47

Ohhh mah god! Life, y'all, it's fkn beautiful sometimes

http://github.com/JoshCheek/dotfiles/commit/dd5cd125be58ba65b002067f461a41d5a29f259a

Do note that I sometimes have good commit messages, too ^_^ https://twitter.com/r00k/status/647409661352787968

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment