Bookmark, share, and hop your favorite sites with SiteHoppin Toolbar for Firefox!



iPhone Hack - How to Develop Native iPhone Apps with Javascript/HTML!

Posted in A+Featured Hacks, Apple, Consumer, Cool, DoItYourself!, Educational, Entertainment, Gadgets, HOWTO, Hack, cell phones, iPhone, iPhone 3G by max on the September 24th, 2008 at 5:00 pm

Here’s a cool iPhone dev app called PhoneGap that allows you to develop iPhone Apps with Javascript and HTML for webmasters who know nothing about C.

PhoneGap is a free open source development tool and framework that allows web developers to take advantage of the powerful features in the iPhone SDK from HTML and JavaScript. We’re trying to make iPhone app development easy and open. For many applications a web application is the way to but in Safari you don’t get access to the native iPhone APIs, and the that’s the problem we’re trying to solve.
It is written in Objective-C and allows developers to embed their web app (HTML, JavaScript, CSS) in Webkit within a native iPhone app. We’re big advocates of the Open Web and want JavaScript developers to be able to get access iPhone features such as a spring board icon, background processing, push, geo location, camera, local sqlLite and accelerometers without the burden of learning Objective-C and Cocoa.

Here’s an example of how you could access iPhone data using Javascript:

Geo Location
//request location - this triggers a subsequent method call to gotLocation(lat,lon)
getLocation();

//GAP will invoke this function once it has the location
function gotLocation(lat,lon){
$(’lat’).innerHTML = “latitude: ” + lat;
$(’lon’).innerHTML = “longitude: ” + lon;
}

Accelerometer
//You have instant access to the accellerometer data via the accelX, accelY, and accelZ variables
function updateAccel(){
$(’accel’).innerHTML = “accel: ” + accelX + ” ” + accelY + ” ” + accelZ;
setTimeout(updateAccel,100);
}

via hackszine

Download PhoneGap

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Linux Web Server Hack - How to Write Automated Load Balancing Script!

Posted in A+Featured Hacks, Blog, Consumer, Cool, DoItYourself!, Educational, HOWTO, Hack, Web, Wordpress by max on the September 23rd, 2008 at 9:15 am

Well, I have been manually managing the dedicated server for this site for last 2 years or so but I found a better way to automate the server so it doesn’t ever go down due to overload.

One of the common problems in dedicated servers is the fact that load can go out of control and your web server along with it, causing you to hard-restart the server.

A better way to deal with this over-load problem is to shut down the HTTPD server (web server) before your server load gets to something around 2 to 5.

When the server load drops under 2, the script then can restart the server.

By doing this, you save a lot of headaches especially if you get “digged” or simply need the site up as much as possible.

Believe it or not, there’s no script that does this available free online so I made one for all you webmasters:


#!/bin/bash
loadavg=`uptime | awk ‘{print $9}’`
RESTART=”/sbin/service httpd restart”
# bash doesn’t understand floating point
# so convert the number to an interger
thisloadavg=`echo $loadavg|awk -F \. ‘{print $1}’`
if [ "$thisloadavg" -ge "5" ]; then
echo “Busy - Load Average $loadavg ($thisloadavg) “
httpd -k stop
elif [ "$thisloadavg" -le "2" ]; then
echo “Okay - Load Average $loadavg ($thisloadavg) “
pgrep httpd
if [ $? -ne 0 ] # if apache not running
then
# restart apache
$RESTART
echo “restart!”
else
echo “no restart!”
fi
else
echo “waiting…!”
fi

Save this code somewhere such as /root/checkload.sh.

Then add the following to your cron job.  (/etc/cron.d/sa-update for Fedora Linux)

*/1 * * * * root sh /root/checkloadsh

This will run the script every 1 minute to check the load and if load is too high, web server will be turned off, if it’s lower than 2 and web server is off, it will turn the web server on.

There’s a lot of things that can go wrong with your web server whether from extra traffic or whatnot, but this script will be handy and I do recommend it to anyone who’s having trouble with high-load web servers that go down often. (like this blog)

Now, go install this script, you will never have to worry about your web server dying from high load ever again.

You can also change the value of “2″ in the code to something higher such as 5 or 10, which will wait longer to shut the web server off if load goes high.

I didn’t write the code from scratch, I took 2-3 different scripts and mixed it up so here’s the resources I used for the code:

Load Average Script - This one is the main skeleton I used

Check/Restart HTTPD Script - This one I used to check HTTPD server before trying to restart it.

Cron Task Scheduler - I keep forgetting that the most left number is the minutes, darn.

NOTE - This is a simple solution to keep your dedicated server running on 1 server (like this one), if you can afford more servers, you will need to resort to load balancing the “servers”, load balancing here refers to balancing within 1 server.

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (6 votes, average: 2.33 out of 5)
Loading ... Loading ...


DIY - How to Make a Ghetto Flame Thrower!

Posted in A+Featured DIYs, Consumer, Cool, DoItYourself!, Educational, Entertainment, Gadgets, HOWTO, Projects, Pyro by max on the September 22nd, 2008 at 2:29 pm
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


HDTV Hack - How to Connect your PC to HDTV via HDMI/DVI Cables!

Posted in A+Featured DIYs, Computer, Consumer, Cool, DoItYourself!, Educational, Entertainment, Gadgets, HOWTO, Hack, LCD, home by max on the September 21st, 2008 at 1:45 pm

(Image of DVI Output on the back of your PC)

This weekend, I had the pleasure of hooking up my friend’s new 52″ Samsung LCD HDTV to his new gaming PC.

If you are like most people, you probably already know how to connect your PC to HDTV via an S-Video Cable.

Now, S-Video is perfectly fine for viewing your PC/laptop on your TV but it won’t give you “HD” resolution of 1080p, 1080i, or 720p.

Most S-Video outputs are only capable of producing upto about 1024×768 pixel resolution and that’s analog signals, meaning your signal will get somewhat affected by noise and not the best way to surf the web on your HDTV.

Now let’s say your TV is capable of HD AND you have DVI Outputs on the back of your PC as shown in the image above.

Then, provided you have a Video graphics card capable of 1080p (which means it can pretty much do 1920×1080 pixels on your HDTV), you will be able to get a perfectly crisp 1920×1080 pixels on your HDTV.

Now, to do this, you need a cable depending on how far your PC is from the HDTV.

The simplest way is to get a HDMI-M to DVI-M cable to connect the DVI side to the PC and HDMI to your HDTV.   Here’s a site I found that has really low prices on it. ($32 for 50 feet, I found a 5 foot cable at BestBuy for $60, don’t go there)

(HDMI-M to DVI-M cable)

Once you are connected, you should be able to surf the web pretty easily on your HDTV depending on how far you sit from it.

Here’s a re-cap of what I just told you in simpler terms:

  • S-Video - 1024×768 Maximum resolution, Analog signals (suck)
  • DVI (PC) to HDMI (HDTV) - 1920×1080 Maximum resolution, Digital signals (clean)

Required Hardware:

  • DVI-capable Graphic Card
  • HD-capable TV (HDTV)
  • DVI(male) to HDMI(male) cable

Most people who have bought PC in the last couple years will probably have all the required hardware except the DVI to HDMI cable.   If that’s the case, I highly suggest you to buy one online.  Don’t buy retail, you will pay 3-5 times more for it.

There you have it, now you  know how to take full advantage of your HDTV and watch YouTube and other online videos crisp and clear.  Perhaps you are a genius already at this but for those of you who don’t know, I hope this helps you surf on your HDTV. (and take advantage over the crisp, clear 1920×1080 pixel screen)

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...


DIY - How to Make Scanner Camera with your Flatbed Scanner!

Posted in A+Featured DIYs, Consumer, Cool, DoItYourself!, Educational, Entertainment, Gadgets, HOWTO, Hack, Projects, photography by max on the September 19th, 2008 at 11:06 pm

Kipkay from Make shows us how to make a Scanner Camera with your flatbed scanner.  Above is a dog taken with the Scanner Camera.  Kind of a nifty way to make interesting images.

via make

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Google Chrome Tips - Dev and Beta Channel Introduced!

Posted in A+Featured Hacks, Consumer, Cool, DoItYourself!, Educational, Google, Google Chrome, HOWTO, Hack, browser by max on the September 19th, 2008 at 10:58 am

In case you don’t know, there’s a program you can download that will let your Google Chrome Browser be updated with the “Dev” mode, which gets you updates as soon as they are available. In the “Beta” normal mode, updates will be delayed until they are considered “stable”.

Subscribing to the Dev channel

1. Download and run the Google Chrome Channel Chooser (http://chromium.googlecode.com/files/chromechannel-1.0.exe).
2. Click the circle next to Dev.
3. Click Update to save your choice.
4. Click Close.
5. In Google Chrome, click the wrench menu and choose About Google Chrome.
Note: On Windows Vista, updates from the About box require Service Pack 1. With 0.2.149.29 (the current release), on demand updates do not work in Vista SP1 if User Account Control is disabled.
6. Click Update Now to install the current Dev channel release.
7. Restart Google Chrome.

via Chrome Hacks

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Eee PC Hack - How to install Ubuntu Eee for ASUS Eee PCs!

Posted in A+Featured Hacks, Computer, Consumer, Cool, DoItYourself!, Educational, Gadgets, HOWTO, Hack, Linux, Operating System, Projects, Ubuntu by max on the September 18th, 2008 at 11:57 pm

In case you have bought an ASUS Eee PC with Windows, there’s a special version of Ubuntu, customized just for the Eee PC models.

This allows you to install the Ubuntu on Eee PCs without too much headache as it has already been configured for the factory hardware.

Ubuntu Eee is not only Ubuntu optimized for the Asus Eee PC. It’s an operating system, using the Netbook Remix interface, which favors the best software available instead of open source alternatives (ie. Skype instead of Ekiga). Sounds great! How can I help out? Please consider contributing with knowledge or money. And while you’re at it, please become a fan on Facebook and add yourself to the map of users

Here’s some resources for Ubuntu Eee for all you Eee PC lovers:

Ubuntu Eee Official Site

How install Ubuntu Eee

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...


DIY - How to Make Inexpensive Solar Cell Panels!

Posted in A+Featured Earth, Consumer, Cool, Design, DoItYourself!, Earth, Eco-friendly, Educational, Energy, Gadgets, HOWTO, Hack, Projects, Solar by max on the September 18th, 2008 at 10:54 pm

Well, it took me all day to get all my sites running today, there’s was a massive DoS attack by some hackers I had to take care of.

With that cleared away, here’s how to make some inexpensive solar cell panels.

Mike Davis is an astronomer. To practice his hobby away from the light-pollution of cities, he bought some land in a remote part of Arizona. But there was a problem: No electricity…. But he’s a resourceful fellow. He built some home-made solar panels using inexpensive blemished and damaged solar cells from eBay!

via treehugger

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...


Eee PC Hack - How to run Mac OS X on Eee PC!

Posted in A+Featured DIYs, Computer, Consumer, Cool, DoItYourself!, Educational, Entertainment, Gadgets, HOWTO, Hack, Operating System, Projects by max on the September 17th, 2008 at 8:00 pm
Eee PC Hack - How to run Mac OS X on Eee PC!

Eee PC Hack - How to run Mac OS X on Eee PC!

Wow, someone has figured out a way to run Mac OS X on an Eee PC!  Of course, you cannot use your sound, WiFi, LAN, and pretty much anything of necessity but it’s cool simply due to the fact that you are running Mac OS X on a PC.

While many would question why you’d want to go to the trouble of installing OS X when there are many Windows and Linux distributions available out of the box? Maybe you’re looking for a challenge. Installing OS X on non-Apple hardware provides plenty of chances to flex those (very metaphorical) geek muscles.

via wired

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3 out of 5)
Loading ... Loading ...