For an update to one of my web projects I went looking for a way to get the recent posts as JSON instead of using the RSS feed. I personally find JSON much easier to deal with than RSS, so that’s the route I wanted to take.
Posts Tagged: tips
Can’t take credit for all of this, but I also don’t remember where the code that I started with came from. days_ago is a function that will take two dates and return a more human friendly version of dates. So if you pass today’s date and yesterday’s date it will return “1 day ago.”
A handy little function for your bag of tricks. This PHP function will return a max number of words out of a string, or the whole string if it’s already shorter. This probably could be made shorter, but I was in a hurry when I needed this and went for quick rather than clever.
How did I not try this before today? My normal method of needing two files open was to have the one I’m working on in Netbeans and the other in Notepad++ on separate monitors. Turns out you can drag the tab of an open file outside of Netbeans and it becomes its own window. We’re… Read more »
Working on a statistics plugin I needed a way to group records by the day. Turns out it’s remarkably easy. If you just want to group by year and month take off the DAY() part. This would also be a good query to use WEEK() on to pull records grouped by the week they were… Read more »
As geeky as I am you would think I would have heard about Apple Remote before this week. Maybe it’s because I haven’t been an Apple geek until a few weeks ago. For those of y’all in my shoes, Remote is a program that you run on your iPhone that connects to iTunes on your… Read more »
It’s come up a few times where I’ve needed to get a screen shot from my iPhone. Turns out there are two ways to do it, one of which is built into the phone. Easiest way is to hold down the home button and press the power button. You’ll hear the shutter sound and the… Read more »