In: , , On: 2013 / 04 / 24 Short URL: http://ozh.in/w9

As you might know, YOURLS development is now hosted on Github. It's now easy to download the current development snapshot, since Github provides an archive/master.zip.

But not so long ago, YOURLS dev was hosted on Google Code, where there is no such convenient way to download the current SVN trunk as a .zip archive. To generate "nightly builds", I wrote this little script:

  1. #!/bin/bash
  2. # Simple bash script to generate YOURLS nightly builds
  3.  
  4. # Export in a year-month-day directory
  5. PWD="/home/ozh/yourls.org/nightly-builds"
  6. BUILD=$(date +%Y-%m-%d)
  7. svn -q export http://yourls.googlecode.com/svn/trunk/ $PWD/$BUILD
  8.  
  9. # Make package and remove dir
  10. cd $PWD
  11. zip -r -q yourls-$BUILD.zip $BUILD
  12. rm -rf $BUILD
  13.  
  14. # Remove old (>7 days) builds
  15. find $PWD/*zip -mtime +7 -exec rm {} \;

Now you just need to add the script to your cron jobs and call it every night.

As soon as YOURLS 1.6 ships, I'll move the project development from Google to Github (why? long story short: read this). So, I wrote down a little todo list to make sure the transition is as smooth as possible for everyone, which is:

On Github

  • Move in issues and tickets from Google. I wrote a tool for this
  • Move in wiki documents from Google. There are a few tools around, like wikiconvert.py, but in worst case scenario doing it by hand is an option.
  • Neatly organize the wiki on Github with a home page, sidebar, header and footer. Everything is explained in this article.
  • Make a custom CONTRIBUTING.md with a few guidelines (aka RTFM). This one is a very comprehensive start.
  • Create labels for issues: I was thinking bug, enhancement, duplicate, invalid, wontfix, RTFM, PEBKAC, worksforme, possiblewithaplugin.
  • Tag older commits in Git to recreate the same download list as in the original project
  • Maybe clarify the dev and branch strategy, such as in Zenphoto-Development-Process

On Google

Simply mention that the project has moved: modify issues, frontpage and wiki with the adminTabs feature at http://code.google.com/p/YOUR-PROJECT/adminTabs. Example.

Misc downloads

The inability on Github to host files other than your source code bugs me. In YOURLS there are a couple extra files that are available for download, or images used in the wiki documents.

So far the idea I've come up with is: create a branch named downloads and commit those little files there.

And?

Am I missing something? Any idea welcome :)

The fine folks from WPMU DEV are running a cool giveaway for 1 annual membership, a $219 value.

Who ? Win what?

WPMU DEV is a WordPress community that features premium WordPress 24-7 support, plugins, and themes. Members get unlimited access to WPMU DEV plugins and themes, as well as constant access to our talented team of developers. One lucky contestant will earn a one year membership ($219) to all this goodness.

To know more about WPMU DEV you can also check their WordPress.org profile, their blog WPMU.org or one of their most popular plugins, MarketPress.

If you need to know one thing about them: their authors dress like super heroes and read awesome books ;)

Contest rules

That'll be simple:

  1. Create a free account at http://premium.wpmudev.org/join/#signup (real name & real email recommended, obviously)
  2. Leave a comment right here on this post on planetOzh (using the same name and email, obviously, and mentioning your WPMU DEV username)

That's it. Feel free not to leave a boring comment (like, introduce yourself, your favorite PHP function or your best coding moment maybe?) but that's just bonus to make the web a more interesting place.

Nope, no cheesy tweet to spam all over the internet, although one mentioning @ozh and @wpmudev will be greatly appreciated :)

By next Friday 18pm GMT I'll have my kid to draw a random comment number and I'll announce the winner on Twitter.

Good luck everyone!

Here is a story about a guy who tried to speak a language he didn't know. Like Twilight, there are several chapters in that story, but don't worry, it's not about sissy hormone troubled teenagers trying to grasp the meaning of life.

Read More

In: , On: 2013 / 01 / 13 Short URL: http://ozh.in/vw

I have a new face! Move your mouse over me to see, hoo, look, no more glasses! At the end of 2012 I decided I had enough of wearing glasses and went for some laser eye surgery, pew pew. Before: short sighted to the point I would not recognise someone 50 centimeters away when not wearing my glasses. Now: I feel like an eagle with infinite vision!

I've been wearing glasses since the age of 13 and I can tell you It's awesome. New places to discover! Like, at the swimming pool or inside the shower! :) But the best side effect is that, whenever I just remember that I don't need glasses anymore, it brings a big smile on my face and I'm all cheered up for the next minutes :)

My last "new face" was in 2006. Time to change all the gravatars and stuff again!

Open Source Do you know that logo? It's the logo of the Open Source Initiative, a non-profit formed to advocate for the benefits of open source, and de facto, the logo for open source stuff in general.

Personally, I rarely see that logo used anywhere, which is a shame. For the sake of promoting Open Source, and because I like that logo (sort of an open lock, see?), I think it would be great if that logo was much more common that it is today.

Anyway, the other day I stumbled upon the Green Lantern logo and the similarities with the Open Source logo immediately occurred to me. I thought it would be fun to make a mashup of the two, which I did. But then, why stop? So, during the last few days, I've been having some Photoshop fun and made, so far, ten Open Source Super Hero logos. Can you name them all?

shirts

They're all available as nifty Open Source Super Heroes tshirts from Redbubble, an tshirt company responsible for a large share of my wardrobe and provider of awesomeness (seriously, can you handle that coolness?)

Feedback, criticism and suggestions for other Super Heroes welcome!

I was having a look at my Profile page on WordPress.org and wondered how many downloads all my plugins had. Start Menu, Accessories, Calculat.. HEY? What am I doing here?

Bookmarklet Fun

The following Javascript snippet will do the job for you:

javascript

  1. (function () {
  2.     var total = 0,
  3.         count = 0;
  4.     jQuery('p.downloads').each(function (i, e) {
  5.         count++;
  6.         total += parseInt(jQuery(e).text().replace(/,/g, ''));
  7.     });
  8.     total = total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  9.     alert(count + " plugins and " + total + " downloads");
  10. })();

Which makes that bookmarklet: Plugin Count. Drag to your bookmarks or right click and bookmark it, head to your wp.org profile page and trigger the bookmarklet!

plugincount

More Bragginess: Tweet It!

Yeah, a humble alert box won't make the world and your Mom proud of you, right? Tweet Plugin Count!

FYI

Bookmarklets are fun. Two tools will help you:

Have fun!

In: , On: 2012 / 12 / 19 Short URL: http://ozh.in/vq

I wrote a simple WordPress plugin to address a simple problem: every 2 weeks, on every computer I'm working on, I have to login again to my blogs and, oh the annoyance, click the "Remember Me" checkbox because by blogs can't remember to remember me.

remember

Longer auth cookie expiration (one year instead of 2 weeks) and always checked checkbox: that's Always Remember Me.

In: , , On: 2012 / 11 / 30 Short URL: http://ozh.in/vm

I said the other day that I wanted Git t-shirts, because when I like something, I want t-shirts of it. I couldn't find any. So I made some: Git t-shirts

The Git logo by Jason Long has a very permissive license (CC BY) that allows practically anything as long as the author's name is mentionned. And to be extra sure, I also asked him and he confirmed :)

I've ordered numerous shirts from Redbubble and I really like them: tshirt quality and lastability (?) are excellent, there are plenty of awesome designs to chose from, and it's dead easy to upload your own. Ditto.

I've set the Redbubble commission to a low percentage to keep the t-shirt as affordable as possible (I don't give a flying damn about making dollars of money from this, I primarily made that for myself). What are you waiting for? I'm sure a Git t-shirt would look nifty on your Christmas wish-list! :)

In: , , On: 2012 / 11 / 27 Short URL: http://ozh.in/vl

I think I've set up a pretty efficient Git environment on Windows and, as promised in a previous post about my Git initiatic journey, I'm sharing it, hoping it'll be useful to someone. Another quite lengthy post I'm afraid, feel free to grab a cup of something before you start reading.

Read More