Author Archive

How to add p4 files recursively on UNIX

No Comments »

You would think should have an option to do that automatically. Well… it almost does.

passing -x - to p4 command tells it to use the standard input as arguments.

(type p4 help usage for more info on global options)


find . -type f -print | p4 -x - add

Turning your Mac into web server.

No Comments »

Most web development is done using PHP, MySQL and Apache.

I am going to explain how to get your environment closer to a real web server so you can use it as a development machine.
The PHP that comes with Mac is missing a lot of useful PHP extensions, such as MySQL, GD,  cURL, expat, etc

1. Get the latest PHP package including all the goodies from here

2. Install and configure MySQL (coming soon)


How can I enable [code] syntax highlighted blocks in the comment section of my WordPress?

No Comments »

I have tried various syntax highlighting plugins. The one I liked the most was SyntaxHighlighter Evolved. My only issue with it was that it did not filter the comment sections.

Here is how to fix that:

1. Go to your Dashboard/Plugins
2. Find the SyntaxHighlighter Evolved plugin and click Edit.
3. In the editor scroll down until you find the section with the comment “Register hooks”
4. Insert the highlighted line as shown below
5. Click “Update file”

		// Register hooks
		add_action( 'admin_menu',                   array(&$this, 'register_settings_page') );
		add_action( 'admin_post_syntaxhighlighter', array(&$this, 'save_settings') );
		add_action( 'admin_head',                   array(&$this, 'admin_head') );
		add_action( 'wp_head',                      array(&$this, 'frontend_styling') );
		add_action( 'wp_footer',                    array(&$this, 'maybe_output_scripts'),      15 );
		add_filter( 'comment_text',                 array(&$this, 'parse_shortcodes'),          9 );
		add_filter( 'the_content',                  array(&$this, 'parse_shortcodes'),          9 );
		add_filter( 'widget_text',                  array(&$this, 'parse_shortcodes'),          9 );
		add_filter( 'mce_external_plugins',         array(&$this, 'add_tinymce_plugin') );
		add_filter( 'tiny_mce_version',             array(&$this, 'break_tinymce_cache') );
		add_filter( 'the_editor_content',           array(&$this, 'decode_shortcode_contents'), 1 );
		add_filter( 'content_save_pre',             array(&$this, 'encode_shortcode_contents'), 1 );
		add_filter( 'save_post',                    array(&$this, 'mark_as_encoded'),           10, 2 );
		add_filter( 'plugin_action_links',          array(&$this, 'plugin_action_links'),       10, 2 );

How can I take a screenshot on a Mac?

2 Comments »

If you think you miss your PrtScr button on your Mac you are in for a surprise.
I had to pay about $50 for a software called SnagIt on my PC.
On the Mac majority of the features SnagIt has to offer come standard:

  • Save to Desktop
    • ⌘+Shift+3: Entire screen
    • ⌘+Shift+4: Select area with the mouse, or press <Space> to auto-select a window
  • Save in the Clipboard
    • Control+⌘+Shift+3: Entire screen
    • Control+⌘+Shift+4: Select area (same as above)

That’s it! Simple, right?


How to find the size of folders and files on a Mac?

No Comments »

In Finder select the file/folder you are interested in and press ⌘+I (or alternatively click File/Get Info).

A window like this should pop up, look in the General section for your answer:

File / Get Info

File / Get Info


If World War II was an RTS game.

No Comments »

Oldie, but goodie!

If World War Two had been an online Real Time Strategy game,
the chat room traffic would have gone something like this:

*Hitler[AoE] has joined the game.*
*Eisenhower has joined the game.*
*paTTon has joined the game.*
*Churchill has joined the game.*
*benny-tow has joined the game.*
*T0J0 has joined the game.*
*Roosevelt has joined the game.*
*Stalin has joined the game.*
*deGaulle has joined the game.*
Roosevelt: hey sup
T0J0: y0
Stalin: hi
Churchill: hi
Hitler[AoE]: cool, i start with panzer tanks!
paTTon: lol more like panzy tanks
T0JO: lol
Roosevelt: o this fockin sucks i got a depression!
benny-tow: haha america sux
Stalin: hey hitler you dont fight me i dont fight u, cool?
Hitler[AoE]; sure whatever
Stalin: cool
deGaulle: **** Hitler rushed some1 help
Hitler[AoE]: lol byebye frenchy
Roosevelt: i dont got **** to help, sry
Churchill: wtf the luftwaffle is attacking me
Roosevelt: get antiair guns
Churchill: i cant afford them
benny-tow: u n00bs know what team talk is?
paTTon: stfu
Roosevelt: o yah hit the navajo button guys
deGaulle: eisenhower ur worthless come help me quick
Eisenhower: i cant do **** til rosevelt gives me an army
paTTon: yah hurry the fock up
Churchill: d00d im gettin pounded
deGaulle: this is fockin weak u guys suck
*deGaulle has left the game.*
Roosevelt: im gonna attack the axis k?
benny-tow: with what? ur wheelchair?
benny-tow: lol did u mess up ur legs AND ur head?
Hitler[AoE]: ROFLMAO
T0J0: lol o no america im comin 4 u
Roosevelt: wtf! thats bullsh1t u fags im gunna kick ur asses
T0JO: not without ur harbors u wont! lol
Roosevelt: u little biotch ill get u
Hitler[AoE]: wtf
Hitler[AoE]: america hax, u had depression and now u got a huge fockin army
Hitler[AoE]: thats bullsh1t u hacker
Churchill: lol no more france for u hitler
Hitler[AoE]: tojo help me!
T0J0: wtf u want me to do, im on the other side of the world retard
Hitler[AoE]: fine ill clear you a path
Stalin: WTF u arsshoel! WE HAD A FoCKIN TRUCE
Hitler[AoE]: i changed my mind lol
benny-tow: haha
benny-tow: hey ur losing ur guys in africa im gonna need help in italy soon sum1
T0J0: o **** i cant help u i got my hands full
Hitler[AoE]: im 2 busy 2 help
Roosevelt: yah thats right ***** im comin for ya
Stalin: church help me
Churchill: like u helped me before? sure ill just sit here
Stalin: dont be an arss
Churchill: dont be a commie. oops too late
Eisenhower: LOL
benny-tow: hahahh oh sh1t help
Hitler: o man ur focked
paTTon: oh what now biotch
Roosevelt: whos the cripple now lol
*benny-tow has been eliminated.*
benny-tow: lame
Roosevelt: gj patton
paTTon: thnx
Hitler[AoE]: WTF eisenhower hax hes killing all my sh1t
Hitler[AoE]: quit u hacker so u dont ruin my record
Eisenhower: Nuts!
benny~tow: wtf that mean?
Eisenhower: meant to say nutsack lol finger slipped
paTTon: coming to get u hitler u paper hanging hun cocksocker
Stalin: rofl
T0J0: HAHAHHAA
Hitler[AoE]: u guys are fockin gay
Hitler[AoE]: ur never getting in my city
*Hitler[AoE] has been eliminated.*
benny~tow: OMG u noob you killed yourself
Eisenhower: ROFLOLOLOL
Stalin: OMG LMAO!
Hitler[AoE]: WTF i didnt click there omg this game blows
*Hitler[AoE] has left the game*
paTTon: hahahhah
T0J0: WTF my teammates are n00bs
benny~tow: shut up noob
Roosevelt: haha wut a moron
paTTon: wtf am i gunna do now?
Eisenhower: yah me too
T0J0: why dont u attack me o thats right u dont got no ships lololol
Eisenhower: fock u
paTTon: lemme go thru ur base commie
Stalin: go to hell lol
paTTon: fock this sh1t im goin afk
Eisenhower: yah this is gay
*Roosevelt has left the game.*
Hitler[AoE]: wtf?
Eisenhower: sh1t now we need some1 to join
*tru_m4n has joined the game.*
tru_m4n: hi all
T0J0: hey
Stalin: sup
Churchill: hi
tru_m4n: OMG OMG OMG i got all his stuff!
tru_m4n: NUKES! HOLY **** I GOT NUKES
Stalin: d00d gimmie some plz
tru_m4n: no way i only got like a couple
Stalin: omg dont be gay gimmie nuculer secrets
T0J0: wtf is nukes?
T0J0: holy ****holy****hoyl****!
*T0J0 has been eliminated.*
*The Allied team has won the game!*
Eisenhower: awesome!
Churchill: gg noobs no re
T0J0: thats bull**** u fockin suck
*T0J0 has left the game.*
*Eisenhower has left the game.*
Stalin: next game im not going to be on ur team, u guys didnt help me for ****
Churchill: wutever, we didnt need ur help neway dumbarss
tru_m4n: l8r all
benny~tow: bye
Churchill: l8r
Stalin: fock u all
tru_m4n: shut up commie lol
*tru_m4n has left the game.*
benny~tow: lololol u commie
Churchill: ROFL
Churchill: bye commie
*Churchill has left the game.*
*benny~tow has left the game.*
Stalin: i hate u all fags
*Stalin has left the game.*
paTTon: lol no1 is left
paTTon: weeeee i got a jeep
*paTTon has been eliminated.*
paTTon: o sh1t!
*paTTon has left the game.*

  • 2009: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
  • 2005: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec