Showing posts with label how. Show all posts
Showing posts with label how. Show all posts

Friday, September 20, 2013

How i sent 300k emails through Github’s API in a matter of minutes

To all watchers of the libgdx repository: i’m terribly sorry and hope i didn’t interfer with your work in any way

     This is meant as a cautionary tale about using Github’s API on a repository with quite a few watchers (460 in this case).

     Earlier this year we migrated our code from Google Code to Github. We didn’t have a good migration plan for the 1200 or so issues back then, so we kept them on Google Code. We now have about 1700 issues on the tracker

     Today i finally wanted to tackle the issue tracker migration, using a Python script i found on Github. The script requires one to specify a Github user account that owns the repository the issues will get migrated to. I did a dry run on a fork of the main repo using my Github account, fixed up some issues in the script, and validated things to the best of my abilities. Things looked good.

     Then i ran it on the main repository. Luckily i was watching our IRC channel. After about 4 minutes, people started to scream. They each received 789 e-mails from Github. Every single issue i migrated, and every single comment of each issue triggered an e-mail notification to all watchers of the main repository.

     This wasn’t apparent to me during the dry runs, as i used my own Github account. The script posts all issues/comments with the user account i supplied, so naturally, i did not get any notification mails.

     I stopped the script after 130 issues (4 minutes), and immediately started sending out apologies and a mail to Github support, to which i haven’t received an answer yet. I sent roughly 300k mails through their servers in a matter of minutes. If i hadn’t watched IRC, i’d have send out about 4 million mails to 460 people within an hour.

     Let me assure you that i’m extremely sorry about this incident. I know that things like this can interrupt daily workflows quite a bit, even if getting rid of those mails is not a Herculean task. I’d be rather upset if a repo maintainer pulled something like this on me. Please accept my deepest apologies.

     The lesson for Github API users: think hard about the implications of automating tasks through the Github API if you have more than a few watchers.

     The lesson for Github/API designers: consider safe-guarding against such issues in your API, in case other idiots like me pull off something similar in the future.

Friday, September 6, 2013

Solving my overheating problem.

  So my PC had been randomly shutting down over the past few weeks. It was getting increasingly frustrating. Every time that I did anything requiring above average CPU power, like watching a youtube video longer than 1 minute long, poof, the system would just halt and go into hibernation mode or something. I couldn't get it to wake up without restarting. Frustration central as this is an integral part of my life and trying to do anything continually yielded this powerless result.

  I thought on what was wrong with it for awhile. Having removed the side panel of the tower and targeting a fan on the motherboard I had hoped that this would somewhat remedy the problem. No effect. The system continued to shut down and my efforts appeared to be in vain. What else might be the source of my tormented situation, I'd ponder. Perhaps removing the graphics card, lowering performance boosting settings and sticking to text based applications would discontinue this grievance somewhat. Nope, simply reading a .pdf file with no browser windows open or media files playing still resulting in random shut downs. I was getting ready to just quit computing and move on with life and go become an outdoorsman or an auto-mechanic or something.

  But I didn't give up. I had a closer look in at the motherboard, starting to wonder if pulling out the RAM might extend my pre-hibernation syndrome hindered machine when I noticed this.

  Son of a gun.  I had identified the culprit for sure and at last.  How I hadn't noticed it before(this pic is with the covering fan removed, four screws).  My carelessness and lack of ever using compressed air on this motherboard had obviously led to the heat sinks from the CPU being so covered in dust that it had appeared that I was unintentionally cooking the delicate silicon.

  The poor baby.  I didn't know.

  Although I am grateful of the knowledge I have gained in this whole fiasco and have thus decided to share it with you in in the unfortunate case that someone out there might happen to be dealing with the same problem.

  But how to remedy it.  A trek to the store proves to be quite a pain in my situation at times.  Gathering a can of compressed air could mean an entire days task and I just have not yet developed the patience.

  So my quick fix was, vacuum cleaner.  I gathered up the hose and the cords from a nearby room and readied my extraction by means of touching some supposed grounded material (faucet handles or door catch areas) as I've heard that static-electricity has a tendency to annihilate these nifty circuit boards to an even greater extent of destruction and nullifying disgrace.  I had disconnected that power cord from the tower in an effort to not fry what's left of my brains.

  The whole time vacuuming away at this clogged mess I sat praying that I wasn't making my situation worse by disrupting some much needed component.  After a few minutes of pulling off as much debris as I could with the multiple attachments my situation had dramatically visually improved.


  Not perfect, I know.  I didn't want to poke around at it anymore than necessary and wind up paralyzing my equipment with a Q-Tip and who knows what the effect of rubbing alcohol might be on these things.  The last thing I need is a retarded drunk computer who refuses to wake up further cluttering up my space with a Q-Tip resting in his head.  So I forgo'ed the 99.999% efficiency cleaning job with a safe 99% one, just to be safe.  Reattached the fan, mustering as much confidence that I wouldn't slip and stab the fragile motherboard, and re-installed my low-end graphics card.  And you know what, it appears to have worked.  Watched a Hi-Def movie on it last night (Had to give it a thorough test just to be sure before writing all of this out), ran a couple of Direct X 9 requiring .EXEs and the combination of this blog post and the Chopin playing on Win Amp not causing it to shut down has proven to me that this operation was a success.

Sunday, July 14, 2013

How To Win With Women

Welcome friend.

You have just stumbled upon the best resource you will ever need.

This is the penultimate last stop for all the information that you have been craving about how to win with women.

You are about to go from this guy


To this guy


They don't teach this stuff in schools and I'm 100% sure that to find this information anywhere else would cost you tons of money, but right now you are in luck because you have just found it all right here and right now for free.



!!! CLICK HERE TO ENTER !!!

I'm Michael Johnson and I approve this message. - Michael Johnson 2013