Dive into the archives.
- Cutting text , handy php function
I know everybody knows how todo it, but cutting text according to text length is needed almost in any content driven website to avoid breaking design. here is my handy function for cutting text:
function wordcutter($string , $cutnum) {
$wordcutter = strlen($string);
if ($wordcutter > $cutnum) {
$titlecut = substr($string, 0, $cutnum);
$titlecut .= ‘…’;
echo $titlecut;
} else {
echo $string;
}
}
- Handy CSS trick i found on the web
If you build websites that let users upload avatars or image and you wondered how facebook maintain that ratio for images? here is a css snippet that knows how to keep your avatars at ratio scaled to any size:
.avatar img
{
float:left;
vertical-align:middle;
margin-left:0px;
border: solid 1px #CCCCCC;
top:50%;
max-width:60px;
width: expression(this.width > 60 ? 60: true);
max-height:65px;
height: expression(this.width > 70 ? 70: true);
}
You […]
- Build your own Video streaming community for 0$
I’ve been fiddling with flash for a long time and i always knew that if you want to stream a video properly you need a flashcast server that costs more then a malibu home, turns out that most of the big companys out there use free opensource tools todo so, and now someone finally grouped […]
- Start modding your website to iphone!
Macosxtips.com has posted a great note about modding your blog to be best viewed on an iphone, its great for any website that wants an iphone friendly stylesheet.
Check it out
PHP START
$iphone_stylesheet = str_replace(â€.cssâ€, “_iphone.cssâ€, get_bloginfo(’stylesheet_url’));
?>
- Terminal OSX Tip that i wasnt aware of, Handy for developers
In my journey discovering new shortcuts and stuff on my Macbook OSX i found a handy shortcut and utility that i wished i knew long time ago. Its called ‘Connect to server’ under the terminal app.
When i started developing on my macbook i needed alot of ssh shell access to my dev and prod server […]
- Experimenting with Amazon S3 Service
Recently i started experimenting with Amazon’s simple storage service S3. The idea is that the service cost is free and you only pay for usage, if you got a huge bandwidth crunching site you can use amazon’s s3 server farm to host videos,pictures and even your .pid mysql database. they charge you by the usage […]
- Cross browser testing done right
As a web dev and a designer i’v been struggling with testing cross browser testing for along time.
Im using a mac so half of the browsers out there i can easily run on my osx. but there is one dreadful browser that isnt running well on osx. you guessed it. IE!, on all of its […]
- Choosing the right technology as ingredient for a successful web application
I must start with a declaration that what im about to write is my own perspective on things and experience of working in startup company’s that failed or prevailed. that expeirence showed me the weak points of bad planning and the selection of a proper technology to start with is an ingredient and even in […]
- Safari hangs while logging into Gmail
When i tried to log into gmail using my safari fresh install on my macbook intel that i just bought, the whole page hanged on the LOADING screen after login, i tried every possible thing that google suggested as clearing the cache, resetting safari, clearing cookies and restarting osx. nothing was working until i came […]
- My server farm pictured!
I hope this is not my servers… Amazing pictures of the worse datacenter you can imagine.
sad but true…More pictures here
