tech category archive
I've been more aggressive lately about creating helper scripts and aliases for common tasks, and I liked this find helper enough to want to share it. I find that I often do filename searches like this:
find -iname "*some_word*"
That's not so bad to type, but why not make it even easier for my, and maybe your [...]
by Scott Carpenter on 21 January 2010 at 9:41 pm
permalink |
comments (2) | filed under tech
tagged: bash, regex
I was looking for Python "sequence generator" code earlier today. By that, I'm thinking of a method to increment an arbitrary string of letters and numbers in an orderly way.
I figured there should be code samples out there to make quick work of it, but it was more challenging to find something than expected. Part [...]
by Scott Carpenter on 20 November 2009 at 10:31 pm
permalink |
comments (none) | filed under tech
tagged: code, python
This isn't really specific to WordPress, but it preserves the first comment for WordPress theme management, WordPress is awesome, and I'm specifically using this for WordPress style sheets, so I'm making the connection.
I wrote this script to condense my style sheets into smaller files for faster download times. I'm all about customer service here.
And [...]
by Scott Carpenter on 15 November 2009 at 10:58 am
permalink |
comments (none) | filed under tech
tagged: code, css, python
I'm ditching curly quotes. If you've come across this post via a web search, you probably already know that WordPress replaces apostrophes and double quotes with prettier "curly" versions, like this:
"I'm in double quotes." → “I’m in curly quotes!”
It does this with the best of intentions, I'm sure, and I think the curly quotes [...]
by Scott Carpenter on 4 October 2009 at 11:00 am
permalink |
comments (1) | filed under tech
tagged: wordpress
I was reading slashdot yesterday and some (inane) comments about people's user ID numbers made me curious about the overall distribution of IDs in slashdot discussions. It didn't take long to take what I'd learned about the Beautiful Soup screen-scraping library from writing my Twitter status backup script to get some simple information.
Here's a quick [...]
by Scott Carpenter on 27 June 2009 at 12:57 pm
permalink |
comments (none) | filed under tech
tagged: code, python
To create a tar file containing only a dir structure in GNU/Linux, this seems to work nicely:
tar -cvf filename.tar --after-date YYMMDD *
Where YYMMDD is a date newer than all files in the dir(s) being tarred up. Picking a date in the future should do the job. Tar will include all the directories and none [...]
by Scott Carpenter on 28 January 2009 at 7:55 pm
permalink |
comments (2) | filed under tech
tagged: bash
More fun with Python and regular expressions. Following up on a previous post, I wanted to share a little test regex function I wrote in Python to help me as I work through the regular expression book.
I'm mostly working at the interactive prompt and had been running commands from Python re (the regex module) [...]
by Scott Carpenter on 29 March 2008 at 10:34 am
permalink |
comments (2) | filed under tech
tagged: code, python, regex
I didn't receive a response from Citimortgage about their ghastly PDF files, but on my next visit I was again able to view my statements in Evince, the GNOME PDF viewer. (Although they were still obnoxiously large files for the amount of data represented.)
But then on my next visit after that, the following month's [...]
by Scott Carpenter on 16 February 2008 at 3:28 pm
permalink |
comments (4) | filed under tech
tagged: ghostscript, imagemagick, pdf
One of the challenges you run in to when moving to GNU/Linux is that simple little things may not be supported. For example, updating the firmware on your router. Linksys provides some rinky-dink program to install the firmware from Windows, but doesn't tell you how or if you can do it from GNU/Linux. [...]
by Scott Carpenter on 7 December 2007 at 9:19 pm
permalink |
comments (2) | filed under tech
tagged: hardware, linksys
Let's say you have a project with package Example, and in that package you have:
Example.java // troublemaker!
ExampleUI.java // "form" - extends JFrame
LabelExample.java // extends JLabel
One of the cool things about the Matisse GUI Editor in NetBeans is that you can add LabelExample.java as a [...]
by Scott Carpenter on 10 November 2007 at 8:48 pm
permalink |
comments (none) | filed under tech
tagged: java, netbeans, programming