Thursday, July 24, 2014

Pull Request from Command Line

Ever wanted to create a Pull Request on Github with having to put up with the web interface and their little ajaxy crap? Well now you can.

In this post I'll you show how to submit a pull request from command line and attach a little build status image to it and then schedule a build for your branch on your CI all with one command.

First install "hub" it's just better than "git", and alias git to use hub in your favorite .bash file:

Add this to your .bash file as well:

alias gpr='echo -e "$(git log -1|tail -n+5|sed '\''s/  *//'\'')\n\n![build status](http://CI_SERVER_BUILD_IMAGE)" | git pull-request -F - ; bj'

"gpr" stands for "git pull request" obviously. If you don't have a CI_SERVER_BUILD_IMAGE I've made one in PHP on top of Apache that works with Jenkins, look here for another blog post about it soon.

The above alias just gets the last commit log and uses it as the pull request's title, the body of the pull request will just be the build status image:

Just run "gpr" and your pull request will be submitted with your current branch.

Also if you're interested in running an automated job on your CI server (Jenkins). I'd recommend using "JunkIt", it's a command line interface to Jenkins which allows you to schedule a build on your CI server. It's aliased as "bj" above, see

Friday, July 11, 2014

Just Say Hi! on OkCupid!

Ok after many trials and errors I discovered the best way to reach out to someone on OkCupid is by sending them a quick message. But of course, we shall not forget that this is always a numbers game. So the more messages you send the better. When you get the initial response that usually means there is some interest from the other side. Then you can dive in and carry on the conversion to wherever you may decide to lead or be led by as it may be. Either way the important bit is that initial mass messaging technique, which I will be discussing here.

It is time-consuming to message lots of people who mostly are not going to respond to you anyway. To make it easier I made this bookmark which you can simply click to auto-message someone a quick "Hi!". Feel free to change the message to anything you like, this is not copyrighted, yet.

I found it most effective when combined with a "rush-hour" time period, like Friday evenings. It's also even more effective if you search for people who are currently online.

Without further ado here is the code that you can save as a bookmark. Then click the bookmark when you're on a profile page to auto-message that person. What I usually do is do one search and open up a bunch of profiles in new tabs, then I go to all tabs one at a time, click the bookmark button and immediately go to the next tab and repeat:


Here is what the code does (written in Javascript), if you're interested:
setTimeout(function() {
}, 2000);

  • opens up Compose dialog
  • waits 2 seconds for the animation to finish
  • types "Hi!"
  • clicks on the "send" button