My blog, not to be confused with anyone else's. |
Ross's Musings
Github API again - still useful
Like much of the rest of the open source developing world, we use github.com to host all of our open source code. We've decided that code-review via github Pull Request (PR) works well for our team, using the typical feature-branch, 2nd party merge PR workflow. However, I find it to be a bit of a speed bump for very small, direct bug fixes. In other projects, "senior developers" would tend to just fix those directly on master, but for the culture on this project, that just feels wrong. The process of creating a special purpose branch, committing to it, and pushing it upstream is easy enough. It's only the last step, creating tha actual PR, that requires switching focus to a web browser, finding the right page, typing in the description, and then creating the PR. Github API to the rescue.echo '{"title":"Descriptive title for changes","body":"More explanation","head":"feature-branch-name","base":"master"}' | \ (github response with a hug number of lines of json) |
On a new laptop, and reconfiguration
Found this in my drafts, figured I'd finish it and post, adding some "a year later" comments. So at work I was encouraged to spend some money on a new laptop. We went to 'laptop as workstation' for all us tech types a couple years ago. I've been a ThinkPad guy for a long time, my most recent two being Lenovo branded ones, most recently a T420. As others have observed, there's been a slow, but perceptible decline in some of the qualities that made an IBM ThinkPad a bullet-proof "no brainer" purchase. In particular, since I'm a Linux guy from decades ago (yes, it's plural now), some of the latest models haven't always been as easy to install Linux on, getting all the special bits (sleep, sound, extra buttons, etc.) working correctly. My manager suggested going with a "boutique" supplier, someone who ships with Linux (in this case, Ubuntu) pre-installed. So that's what I did: System76, a Gazelle Professional. First thing I noticed - going from 14" to 15" is significant. Lost the lovely thinkpad keyboard - grumbled a lot about that. But wow, it's fast, and Ubuntu "just works". About a year later - I've done a major OS upgrade on this now. I've gotten reasonably happy with it. There are odd bits (the SD card slot leaves cards sticking waaay out - strange) but overall, happy with it. |
Github API - it's easier than it looks
The Github API docs for teams are nicely complete, with good teaching examples, but lack really explicit, cut & paste examples: a little too "pseudo code" for something I use only sporadically. Recently I needed to add a bunch of repositories to a team in an organization. The web interface only allows one-at-a-time. What a pain for adding more than 40 repos. (We can talk about repo organization at another time. Trust me on that.) So, enough perusing of the docs eventually leads to: From which we see we need a team id, an owner (of what? The repo) and the repo itself.We get the team id from here: curl -s -i -u $GITCREDS https://api.github.com/orgs/Rhaptos/teams The repos are owned by the organization, so we can use that name directly. Putting that together, (after one round of errors from the nginx proxy server, complaining about 'Length Required') we get: curl -s -i -u $GITCREDS -X PUT -H 'Content-Length:0' https://api.github.com/teams/12345/Rhaptos/Products.CatalogMemberDataTool Check the github Organization homepage, and lo and behold, there it is! So, since we have a convenient checkout of all the required repos in src: for r in *; do curl -s -i -u $GITCREDS -X PUT -H 'Content-Length:0' https://api.github.com/teams/12345/repos/Rhaptos/$r ; done Bam! 41 Repos in one team. Easy enough for this bash jockey. |
Python Tip of the Day: logging
If you're going to define your own logger, you really need to define a handler or two, so the logs actually go somewhere. Like a Stream handler, or File handler, perhaps. Just sayin' |
Our new (pocket) eDGe
It's a floor wax! It's a dessert topping! (forgive the ancient SNL reference) Some time ago, before the iPad, there was a company call Entourage that had the vision to see that there was a coming market in tablets, specifically for education. The problem they saw was that the best format for reading (a major educational activity) was the then new ePaper, but a LCD based tablet gave a lot more functionality. So, they did the crazy engineering solution - a dual screen device - a foldering tablet, each leaf being a different screen - one ePaper, one LCD Android tablet. Entourage succumbed to the fate of many pioneers who forge ahead of the market - they had a quirky, not quite polished solution for a problem the market didn't know it had, and they didn't have the size or cachet of an Apple, to create the market. This is a long winded way to say that the last of the Pocket eDGe devices (MSRP $399) recently sold on woot for $79. And I grabbed one. It arrived Friday. I've been playing with it (upgrading the android to a beta 2.2 build, finding what markets are available, what games/apps work, what break) I like it. I'll be posting about it as I try various things over the next weeks. |
Hello World!
Since I've spent better than the last decade of my life helping others contribute to this thing we call the web, that I should finally put a stake in the ground and add my own thoughts to the mix. I'll be posting occasionally here, on topics ranging from Aikido to parenting, public schools, to technology in many forms. I'm trained as a molecular biologist/physical biochemist, but have been a mostly-self-taught computer enthusiast for even longer. |
1-6 of 6