Techblog Index

Don’t be ruthless to your processes

It’s a common (while wrong) practice while administering *NIX/BSD servers (or even stations) to terminate hanged processes with the kill command.

Although the name suggests that it will mercilessly murder the process, its more a signal thrower. Signals tell processes to take determinate actions such as pause, continue, terminate, interrupt current work etc.
Read the full article

Solving iPhone speed issues with dynamic paging

NOTE: This article does not teaches how to Jailbreak your iPhone nor how to install Cydia an its apps. There are plenty of info on that out there. Please do not insist.

NOTE: As pointed by Robert, the amount of I/O generated by the swapfile may greatly decrease the iPhone’s SSD lifetime since is designed to be more at rest.

After buying an iPhone 2G from a friend I just couldn’t resists and started hacking all that I could. Put on the latest firmware by the time (3.1.3) and Jailbroke it, put on Saurik‘s Cycorder via Cydia (aptw repository) (also from Saurik) in order to gain movie recording ability but didn’t went any further than that.

Then, as I don’t have a 3G/EDGE plan on my carrier, I decided only to access internet over WiFI but even scrambling APN credentials my little buddy kept connecting to my carrier EDGE network (and thus spending my money on high taxes).

After reading a while I discovered that SBSSettings would give me the option to control EDGE status (enabled/disabled) instead of just jamming credentials (that were being ignored by the carrier anyway). Installed and it just worked like a charm…. BUT… I’ve noticed that my Spingboard page transitions became a little hangy and apps opening and closing started to take much longer than it usual. From SBSSettings pane, I constantly see my memory running out due to iPhone’s lack of memory and lots of apps in background struggling for resources.

iPhone speed issues cartoon

Read the full article

Automating human intervention tasks with Expect

I administrate several servers and SSH password management were a big issue until I changed all my servers logins to use private keys. Things got really nicer when I discovered SSH aliases.

Some of my clients are hosted on shared hostings and some of them doesn’t allow password-less authentication “in behalf of my security”. Well, I can’t really afford opening my password manager, locating it and then copying and pasting back to my terminal. Too much time spent.

I have heard about expect long ago but never quite stopped to look at it since I never really had that need but in this case it came quite handy. Hop in aboard the new less typing world!
Read the full article

Better error handling

Baseball Catcher
Error handling and reporting was always a thing that I knew I wasn’t doing it right. Leaded by PHP’s on-the-fly type casting I used to make functions just return false or null but that was not right because I was hurting the return-type integrity of them.
Read the full article

Brazillian Portuguese (pt_BR) language file released for Simple:Press Forum WordPress plugin

We released today with the help of Bulli Castelo the internationalization file for this wonderful Wordpressw forum plugin.

The language files can be found at the official Simple:Press Forum translations website.

Enjoy!

Typing less with SSH

For me as a Linuxw user I always had to type long lines to start my SSHw sessions. It’s no rocket science, you know, but for he who types thousands of characters each day, each character save is golden.

We usally start our SSH sessions by typing the following command string:

ssh user@domain.tld

I’ve tried to shorten this by adding the domain and its TLDw to my hosts file with a shorter alias like

hname hostname.tld

But obviously that crashed against Apachew Vhostw capability, the request never make it to the other end.

I personally have SSH keys on some of my servers to avoid typing passwords, that is good to prevent against MITMw attacks and keyloggers, but I still have to type the string mentioned lines above.

Then, with 3 lines in a SSH’s configuration file on my home directory (yes, you don’t need to alter the server’s SSH configuration file and yes, you can do that on your shared hosting’s shell account).
Read the full article

Smartly resolving your WordPress pages and posts JavaScript and CSS dependences

Sometimes you want to include page-specific JavaScriptw or CSSw files and ended up in cluttered ifs and else ifs or even creating a creepy new page just for that.

Wordpressw‘s excellent plugin infrastructure with their hooks and actions provides us a beautiful and clean form of including our JavaScript in specific pages.

In this tutorial, we will be using three WordPress functions: get_post_meta() and wp_enqueue_script() and wp_enqueue_style().
Read the full article

5 best practices on developing WordPress plugins

Wordpress Plugins
Wordpress wonders me how it born as a Blogging platform and is growing a powerful CMS platform. Its plugin framework is full of hooks and actions and almost everything can be trapped and modified by plugins.

As WordPress is a Procedural Programmingw oriented platform the function wrapped to the hooks and actions have no scope when called except global this can be hell when developing plugins. We must take extra-care to not compromise our plugin security and compatibility.

In our road developing plugins we learned some lessons, here is our share. Read the full article

Brazillian Portuguese (pt_BR) language file for WP-Filebase released

We have just baked the Brazillian Portuguese pt_BR.po (and .mo) internationalization language files for the great WP-Filebase WordPress plugin from Fabian Schlieper.

This plugin is a great download / file manager that covered just all holes that we need in our clients’ projects. It features a highly configurable theming, internationalization, categorization, download counter, traffic/bitrate limiter and more.

This is certainly a recommended WordPress Plugin for all. Read the full article

Cisco binary games kills your productivity while enriching knowledge

This is one of those Flash games that kills hours of productivity like Desktop Tower Defense, quite educative.

Cisco Binary Game
Read the full article