Current Topic: website curation
Posted by Michael Alfaro on February 13, 2012
If your linux box doesn’t have this installed, would suggest as a way to make your wordpress site handle significantly more load at a faster rate.
Source link: http://wordpress.org/extend/plugins/apc/
“APC Object Cache provides a persistent memory-based backend for the WordPress object cache. APC must be available on your PHP install.
An object cache is a place for WordPress and WordPress extensions to store the results of complex operations. On subsequent loads, this data can be fetched from the cache, which will be must faster than dynamically generating it on every page load.”
Topics: architecture, development, internet, technology, website curation
Posted by Michael Alfaro on February 8, 2012
Found this today on trying to prototype an app for a client. If you point to an HTML page through the UIWebView, when you switch between portrait and landscape, the HTML page wouldn’t be passed a new width and shows up slightly wider than the view, so some content get’s cut off. The solution was found on stack overflow again: http://stackoverflow.com/questions/3632084/uiwebview-rotation-on-ipad
“Just solved my issue with this by adding this HTML5 Viewport meta tag:
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
to the head section of my HTML, maybe a variation of this meta tag may help?
Although my issue was triggered when my app was started in landscape mode, while yours in portrait mode, it may be a common cause.
I also had another funny issue with the webView in iPad and the common solution seems to be that meta tag:
http://stackoverflow.com/questions/2790482/ipad-simulator-webview-google-maps-api-issue”
Topics: development, internet, mobile, technology, website curation
Posted by Michael Alfaro on February 6, 2012
This link was shared internally a while back by Tim Jaeger. If you’re looking for a lightweight javascript framework for mobile, here’s zepto.js.
Source:http://zeptojs.com/
Zepto.js is a minimalist JavaScript framework for modern web browsers*, with a jQuery-compatible syntax.
The goal: a 5-10k library that handles most basic drudge work with a nice API so you can concentrate on getting stuff done.
Zepto’s primary focus is on mobile devices, where small file sizes and tapping into the latest browser features matter most for fast loading and optimal runtime performance.
*Zepto supports Safari, Chrome, Firefox and Opera and any mobile WebKit-based browser, including iOS Mobile Safari, Android browser, HP webOS browser, Blackberry Tablet OS browser and others. Zepto does not support Internet Explorer.
Topics: Android, development, internet, iPhone, mobile, technology, website curation
Posted by Michael Alfaro on February 6, 2012
It’s tough to tell a user that they’ve hit a file limit after the download is done. Found this on stack overflow to be able to check the file size through javascript before the file get’s uploaded. Here’s the source: http://stackoverflow.com/questions/3717793/javascript-file-upload-size-validation
Yes, there’s a new feature from the W3C that’s supported by some modern browsers, the File API. It can be used for this purpose, and it’s easy to test whether it’s supported and fall back (if necessary) to another mechanism if it isn’t.
And here it is in action: http://jsbin.com/ificu4 Try that with a recent version of Chrome or Firefox.
Here’s a complete example:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<title>Show File Data</title>
<style type='text/css'>
body {
font-family: sans-serif;
}
</style>
<script type='text/javascript'>
function showFileSize() {
var input, file;
if (typeof window.FileReader !== 'function') {
bodyAppend("p", "The file API isn't supported on this browser yet.");
return;
}
input = document.getElementById('fileinput');
if (!input) {
bodyAppend("p", "Um, couldn't find the fileinput element.");
}
else if (!input.files) {
bodyAppend("p", "This browser doesn't seem to support the `files` property of file inputs.");
}
else if (!input.files[0]) {
bodyAppend("p", "Please select a file before clicking 'Load'");
}
else {
file = input.files[0];
bodyAppend("p", "File " + file.name + " is " + file.size + " bytes in size");
}
}
function bodyAppend(tagName, innerHTML) {
var elm;
elm = document.createElement(tagName);
elm.innerHTML = innerHTML;
document.body.appendChild(elm);
}
</script>
</head>
<body>
<form action='#' onsubmit="return false;">
<input type='file' id='fileinput'>
<input type='button' id='btnLoad' value='Load' onclick='showFileSize();'>
</form>
</body>
</html>
Topics: development, internet, technology, website curation
Posted by Michael Alfaro on February 6, 2012
Had this link in my bag of free testing sites for a while, wanted to share with the world. Very similar to the results you can get through firebug network testing, but they can do it from various locations.
http://www.webpagetest.org/

Topics: development, internet, website curation
Posted by Michael Alfaro on February 1, 2012
Home Depot is down for upgrades, check out their page, Awesome :

Topics: design, fun, humor, marketing, website curation
Posted by Michael Alfaro on February 1, 2012
Ran into this when moving a currently working site to a new directory and setting it up as another site. All IIS and web.config settings matched, so couldn’t figure out why every time I tried to go to a page the needed an Oracle connection I kept getting “The specified store provider cannot be found in the configuration, or is not valid.”
Finally remembered that the App Pool itself has “Advanced Settings”, not just the basic ones which I had already checked. The Oracle Instant Client we’re using is 32 bit, thus the 2nd setting in the App Pool >> Advanced Settings >> Enable 32-Big Applications had to be set to True instead of the default of False.
Check it out here:

Topics: development, internet, Microsoft, technology, website curation
Posted by Michael Alfaro on January 27, 2012
This code was shared by a great client of ours, Kevin Ormsby (Web Developer) over at ELS. Wanted to reshare with the world as I’m sure there’s a need for this if we found a need for it.
It will allow you to give the top left coordinates that you’d like the iframe to begin with. And you could eliminate items from the right and bottom by adjusting the over width and height of the iframe itself, thus you can get a perfect iframe until the page you’re pointing to changes
Thanks Kevin!
<style type=”text/css”>
#contact{
width:700px;
height:700px;
overflow:hidden;
}
#contact iframe {
margin-left:-15px;
margin-top:-255px;
border:0;
}
</style>
<div id=”contact”>
<iframe src=”http://www.els.edu/ContactUs” scrolling=”no” width=”600″ height=”840″></iframe>
</div>
Topics: development, internet, technology, website curation
Posted by Michael Alfaro on January 25, 2012
If you’re looking to make particular pages visible to only people that are logged in and letting them know that they need to log in, I found this article that help you achieve that through the page templates:
http://www.wprecipes.com/how-to-restrict-page-view-to-authenticated-users
Here’s the sample code:
if (is_user_logged_in()) {
// You page code goes here
} else {
echo "You must be logged in to view this page.";
}
Enjoy!!!
Topics: development, technology, website curation
Posted by Michael Alfaro on January 9, 2012

Shoutout to Tim Jaeger for sending this out today. If you’re looking for the FB styling to use in IFramed apps within Facebook, you can use Fbootstrapp to get the look and feel with very little effort on your part. Check it out, great resource: http://ckrack.github.com/fbootstrapp/
Bootstrap itself was created by folks at Twitter, so you can check out the original project here: http://twitter.github.com/bootstrap/
Topics: development, interfaces, internet, technology, website curation