Chris Jean
Linux, WordPress, programming, anime, and other stuff
  • Home
  • Linux
  • Development
  • Random Ramblings

Archive for Development

Updating Multiple Git Repositories Easily Using Bash for Loop

by Chris Jean
September 15th, 2009

All of the WordPress themes that I work on for iThemes are managed as Git repositories. Recently, we moved past the 100 repositories mark. That’s a lot of repositories to manage, and unfortunately, too many of those repositories contain duplicated information.

Later on, I might delve into how we use Git to manage our theme repos. For today, however, I’d like to focus on how I quickly and easily pushed up changes to more than a dozen repos in a single, albeit long, Bash command.

I had finished making updates to 16 Flexx repos, and I needed to push all of those changes up. Since I had multiple working repos in that folder, I was lucky that each of these repos began with the text “Flexx”. Also, since they are all part of the same series and need to keep the same version number, that simplified the tagging as all could be tagged as 2.5.0.

Given this information, I simply ran the following command from the directory that contained all the repository directories:

for i in `ls|grep Flexx`; do echo “— Pushing $i”; cd $i; git commit -am ’2.5.0′ && git push && git tag 2.5.0 && git push –tags; cd ..; echo “— Finished $i”; done

There’s a lot going on here, so I’ll break it up and explain what I’m doing.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (0)

I Still Don’t Like Fancy Programming Editors

by Chris Jean
October 27th, 2008

For about eight years now, I’ve been hapily using Crimson Editor. At its simplest, Crimson Editor is nothing more than a fancy Notepad; however, it is so much more than that. While it doesn’t have all sorts of fancy tools that some editors have, it does support customizable syntax highlighting, customizable colors, line number, visible whitespace characters, basic smart indenting, a file/directory navigation pane, project support, and a MDI interface. Those features aren’t really the reason why I use it as almost all programming editors support such features. I use it because it gives me tools that help me program without doing things that hinder my productivity.

Read More→

Categories Development, Random Ramblings
Comments (4)

Tool to Optimize MySQL Configuration and Performance

by Chris Jean
October 23rd, 2008

Web applications developers such as myself often have a hard time keeping up with everything that’s going on. There’s always some new programming or scripting language, new standards, new browsers, new technologies, new paradigms, new social networks, and on and on. Every day, something new happens. The end result of all of this always ends up being very similar: people demand faster applications that deal with ever-increasing amounts of data which end up putting massive stress on the server architecture.

As we toil to improve the performance of the applications and their snappy response times, it becomes easy to forget about how we can tweak settings on a low level to provide massive speed improvements on the front-end. For example, most people don’t know that you can configure MySQL to take better advantage of the resources that the server has available.

By default, MySQL is configured to consume a relatively limited amount of memory resources. Start giving MySQL more memory to work with, and your application’s performance can improve greatly.

Read More→

Categories Development, Linux, Tips 'n Tricks
Comments (1)

Empty uploaded files with Perl

by Chris Jean
July 30th, 2008

I work for a company that has a proprietary CMS software package written in Perl. We have a number of servers that run this code, and everything has been fine for a number of years and many different versions and customizations.  A few months back, something changed. One of our servers started producing completely empty files for all uploads. This affected all of our code, all of our versions, and every site.

After some time debugging and testing, I finally found the problem. Apparently some code was updated, either Perl itself or one of its packages, and that caused my CGI object to be recylced before the upload code ran. When the CGI object gets recylced, all the file handles are closed resulting in reading and saving an empty file.

The solution was deceptively simple. All I had to do was store the CGI object in a persistent variable that has scope throughout the end of the program execution.

Categories Development
Comments (0)

Introducing WP Easy Uploader

by Chris Jean
June 28th, 2008

This time I have a plugin for the masses. WP Easy Uploader will make any WordPress user’s life easier. No longer will you have to rely on FTP to upload new plugins, themes, or random files. Now you can take care of those tasks quickly and easily from the admin screen of WordPress.

For full details, check out WP Easy Uploader’s release page.

Categories Development, WordPress
Comments (12)

WordPress.org’s Plugin Directory Needs Some Changes

by Chris Jean
June 27th, 2008

Starting a little over a month ago, I started submitting plugins to WordPress.org’s Plugin Directory. Overall, the system is great for developers since it offers Subversion and enables the automatic plugin upgrades that the latest WordPress versions support. However, it has some major problems that causes developers like me some headaches.

Read More→

Categories Development
Comments (3)

Introducing WP Developer Assistant

by Chris Jean
June 27th, 2008

Time to release another public plugin into the wild. This plugin is a bit different in that it has nothing to do with how your site looks or operates. As a matter of fact, no one will even know that you have it, but you can rest well knowing that it is just a click away in the admin menu. For you see, WP Developer Assistant is a plugin for developers.

Now some of you may wonder what a developer needs a plugin for. Well, there are lots of reasons. The main one being that it would be a lot nicer if WordPress had a few extra tools that would make a developer’s life a lot easier. For example, being able to run any needed query from inside WordPress, being able to show PHP errors without turning them on for everyone, or uploading files and extracting archives anywhere in the site would be great tools to have, but WordPress doesn’t have anything like that… Until now!

If you are a WordPress developer, you need this plugin. You can find the full details on the WP Developer Assistant page.

Categories Development
Comments (1)
Chris Jean
Copyright © 2012 All Rights Reserved
iThemes Builder by iThemes
Powered by WordPress