Skip to main content

PHP APC Performance Improvement

Posted in

I installed PHP APC today was simply shocked by some of the performance gains I was getting by it.

I had a problematic page that was calculating a lot of info (the same info) every time it loaded. Those were costly calculations.

APC gave me about 80ms faster load off the bat. But the performance was REALLY noticeable after a lot of users were hitting the site. (I used Blitz.io to do load testing)

It went from 2.5 second response time with 260 users to 400ms with 260 users. Without APC I had a 600ms load time with only 81 users.

The graphs below really speak for themselves.

TL;DR: caching = win.

No Caching Graph:
no apc

With Caching (APC)
with apc

The Best Second Place PPC Ad I Have Ever Seen

Posted in

I have to give credit to Service Magic, that's brilliant.

Potentially Malicious Fake Advertiser using Wordpress Plugin (adv.zip)

It starts with an innocuous email:

Hi,

I am sorry I have to write you to e-mail from whois information of the domain. But I could not find contact e-mail or feedback form on your site.
We are looking for new advertisement platforms and we are interested in your site %DOMAIN%
Is it possible to place banner on your site on a fee basis?

Best regards,
Nicolas Gauthier

But it quickly turned strange:

Hi!

Thanks for reply to our proposal!
We like your price.We would like to place 160x600 banner.

To pass to the banner control system follow the link http://webmaster.burgoni.com
To enter use the following data:

login: %DOMAIN%
password: %PASSWORD%

NASA Space Shuttle Discovery Flys over Washington DC (Photos)

Posted in

I took these from The Kennedy Center Rooftop.

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Space Shuttle Discovery Flys over Washington DC

Creative Commons License
This work by Kevin Ohashi is licensed under a Creative Commons Attribution-NoDerivs 3.0 Unported License.

Client Side Tweet Parser in JavaScript (jQuery)

Posted in

I just published a simple JavaScript that helps websites comply with Twitter's Display Guidelines. It helps you comply with issues 2,3,4.

It automatically links to urls, hashtags and mentioned usernames. You simply set the div class to 'tweet' (or whatever you change it to in the code) and link to twitter.js. Make sure you also have jQuery(Only tested 1.6.4) loaded before twitter.js. It is a dependency.

https://github.com/kevinohashi/TweetParserJS

Thanks go to Raphael Mudge who helped with some of the regular expressions.

Future improvements: this code isn't perfect by any means. One improvement would be merging the 3 primary functions into one and some conditions. I've also seen some very elegant server side solutions using almost entirely regular expressions from CodeIgniter (see code below).


function parse_tweet($tweet)
{
$search = array('|(http://[^ ]+)|', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '/(^|[^a-z0-9_])#([a-z0-9_]+)/i');
$replace = array('$1', '$1@$2', '$1#$2');
$tweet = preg_replace($search, $replace, $tweet);

return $tweet;
}

High Res Photos from Laboratory for Autonomous Systems Research (LASR) at the Navy Research Laboratory

Posted in

Here is a small sampling of high res photos from the Navy Research Laboratory's brand new Laboratory for Autonomous Systems Research (LASR).

All Photos taken April 2, 2012.

Click on a photo to see high res version.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

How to Make Facebook Like Button on a Website Connect to a Facebook Page

I wanted a simple 'Like' button connected to my facebook fanpage. No stream, no faces, no counts, no nonsense. I couldn't find an easy and obvious way to do it.

I spent more time than I would care to admit trying to figure this out and it turns out to be trivial.

  1. Go to Like Button developer tool.
  2. Set 'URL to Like' to your facebook page (http://facebook.com/FacebookName)
  3. Set 'Width' to '50'
  4. Uncheck 'Send Button'
  5. Choose 'Button Count' for the Layout Style.
  6. Uncheck 'Show Faces'
  7. Get Code, choose iframe version.

The 50 width should cut off the like count box (you can make it bigger/smaller to make sure it works). Simple, easy, like button connected to facebook fanpage.

Screenshot below:

Firefox Inspector Bug (10.0.2)

Posted in

I wanted to report the bug to mozilla but it took me 15 minutes to even find their bugzilla and then it wanted too much of my time and to share my personal info (email address). So I will just post it here instead.

So basically the problem is if you double inspect, you can't escape the inspector and the close box (X) disappears.

Screen shots after the jump.

One of the scummiest link building strategies I've ever seen

Posted in

From: Ryan F (ryanf@ggadget.org)
Date: Thu, Feb 16, 2012 at 11:40 AM
Subject: Featured Tech Site Award
To: -------------

My name is Ryan, and I work at Green Gadget -- a PR6 technology and gadget review site located in Austin, Texas.
The reason I'm emailing you today is because we’ve selected you as an exceptional technology site. We would like to highlight you on our site and present you with an official sidebar badge for your site that will distinguish you as a Featured Tech Site.

Our selection criteria are based on several factors that we feel defines a great tech site. We selected you because we feel your website is a great resource that offers exceptional information on technology.

Attached is the html code to insert the badge. We are very excited to have you as a Featured Tech Site and I look forward to hearing back from you.

Best Regards,

Ryan

First off, who mentions their Page Rank (PR6) in a legitimate award?

There is no mention of what my site even is or any indication that it was viewed. It's all probably automated anyway (or should be considering the lack of anything requiring a human to do since nothing is tailored or personalized in any way).

You want to see the 'award'? It's pathetic.

I hope nobody falls for this bullshit but sadly I am sure some people will. This one should go straight to the spam bin.

144 of the Largest Companies Using Godaddy

I took the top 1500 sites from Alexa.com and checked their registrar. Some companies have already said they were moving (Hi StackOverflow!). Huge thanks goes to Mike St John for his help in querying the registry.

Here are the 144 companies using Godaddy as a Registrar :

woothemes.com
proboards.com
stackoverflow.com
alot.com
wowhead.com
xkcd.com
seriesyonkis.com
exoclick.com
flipkart.com
goodreads.com
twitpic.com
babylon.com
bytes.com
opera.com
foursquare.com
r7.com
thechive.com
realclearpolitics.com
yousendit.com
dreamstime.com
justdial.com
ilivid.com
github.com
multiply.com
imesh.com
optmd.com
wimp.com
youm7.com
urbandictionary.com
amung.us
informer.com
pingomatic.com
networkedblogs.com
histats.com
chicagotribune.com
grooveshark.com
infusionsoft.com
buzzfeed.com
trulia.com
yoo7.com
hawaaworld.com
bearshare.com
slutload.com
piriform.com
incredimail.com
noticias24.com
ioffer.com
buysellads.com

Syndicate content