The Switch HTML5 from Flash

Like many others I always had issues with Flash.. Mostly heated up my system and had crashed on my system often. So I have decided to put all my videos on Fryetech in HTML5. Lucky for us Youtube is supporting HTML5. I believe its still in beta however I like it much more then Flash.

Youtube offers a little bit of code that will automatically switch back to flash on systems that don’t have HTML5 yet. (Code on bottom)

As of this time the only web browsers that support HTML5 that I know about are

Latest Google Chrome
Latest Safari

Here is the code in case you would like to post it on your site.
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEOID" frameborder="0">
</iframe>

Posted in General Tech | Leave a comment

PHP for Python

Are you a Python programmer but you need to learn php or maybe modify php code or vis versa. Below I have put a very basic Python functions to PHP functions list. I will be adding more as I have time and think of them. Please feel free to comment below.

v/$v are variables

Python(Top) PHP (Bottom)

Replying Text

print
echo

Replace
v.replace(‘texttoreplace’,'newtext’)
str_replace(‘texttoreplace’,'newtext’,variable);

Find
v.find(‘texttofind’)
strpos(‘texttofind’,$v);

Len
len(v)
strlen($v);

print Index to Index (remember programming starts with 0 not 1)
v[fromnumber:tonumber]
substr($v,1,3);

Reading File line by line

f = open(‘filename.txt’)
for line in f:
print line

$f = fopen(‘filename.txt’,'r’);
while (!feof($f)){
$line = fgets($f);
echo $line;
}

Putting Strings into a list(Python) or array(PHP)

mylist = []
mylist.append(‘I’)
mylist.append(‘am’)
mylist.append(‘in’)

$mylist[] = "I";
$mylist[] = ‘am’;
$mylist[] = ‘in’;

Putting Strings into a dictionary(Python) or array(PHP) again

cars = {}
cars['a4'] = ‘black’
cars['civic'] = ‘blue’
cars['s4'] = ‘lightblue’

$cars['a4'] = ‘black’;
$cars['civic'] = ‘blue’;
$cars['s4'] = ‘lightblue’;

Posted in Programming | Leave a comment

PdaNet for iPhone

What is PdaNet
PdaNet is a program for internet tethering

To download PDAnet on your iPhone your iPhone must be jailbroken.
To install the iPhone App
Open Cydia then go to search.
Type PDAnet in the search
When you see Pdanet show up tap to open it.
Now install and confirm.

Pdanet should now be install and you can go back to the home screen. Make sure you see the PDAnet icon somewhere on the home screen.

Next launch PDAnet on your iPhone and then click settings.
Since this guide is helping you with the usb mode you want to select USB MODE then tap done.

Below are a couple videos showing you how to get the software for your computer. play windows or macintosh Below to see what the next step is.

PdaNet Desktop Software

Windows Video

Macintosh Video

Posted in Cell Phones and SmartPhones | Leave a comment

iPhone Stuck in Recovery Mode / Loop

As anyone ever had the issue where there iPhone is stuck in a recovery loop?

Well.. If your phone is stuck in recovery and you don’t want to restore or update your phone here is what I normally do.

Download this program called iRecovery.
Mac Users Download Here
PC Users (Google is your friend!)

I have only done this using a Mac so I’m not sure how it works on a PC.

—Mac Users—

After downloading the file above. Move the file to your desktop and uncompress it by double clicking it.

After doing so launch Terminal (Applications > Utilities > Terminal)

In Terminal type the following.
~/Desktop/irecovery -s

Some text should come up looking something like this.

[FT:MSG] VFL Init            [OK]
[FTL:MSG] VFL_Open            [OK]
[FTL:MSG] YAFTL Register  [OK]
[FTL:MSG] FTL_Open            [OK]
Boot Failure Count: 0 Panic Fail Count: 0
Entering recovery mode, starting command prompt

After the starting command prompt type the following. (without quotes)

“setenv auto-boot true”
] “saveenv”
] “/exit”

You can now quit the Terminal program. Restart your phone by holding the home button and power button.

If the phone boots up then you got it!
If goes back into recovery mode / loop then you may have a bigger problem and you may have to restore.

Posted in Cell Phones and SmartPhones | Leave a comment

Download Youtube Videos using Chrome

Download Here
http://www.chromeextensions.org/other/easy-youtube-video-downloader/

Posted in Uncategorized | Leave a comment

SATA/IDE/MiniIDE to USB 2.0

Posted in General Tech | Leave a comment

Change Your Boot Logo on OSX

Change Your Boot Logo on Tiger, Leopard and Snow Leopard.
(Intel CPU Only)

There is a program called bootxchanger. Right now its a free program and works great.

Download it here
http://namedfork.net/bootxchanger

Posted in Mac OS X | Leave a comment

Make Ringtones for your iPhone

Posted in Cell Phones and SmartPhones, Mac OS X, Windows | Leave a comment

MySQL Basic Commands Under Linux

Here is some very basic MySQL commands.

Installing MySQL on Cent OS or Fedora
yum install mysql-server mysql php-mysql

To start MySQL on boot
chkconfig –levels 235 mysqld on

To Start MySQL
service mysqld start

Setting Root Password
SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘yourpassword’);
SET PASSWORD FOR ‘root’@'localhost.localdomain’ = PASSWORD(‘yourpassword’);
SET PASSWORD FOR ‘root’@’127.0.0.1′ = PASSWORD(‘yourpassword’);
DROP USER ”@’localhost’;
DROP USER ”@’localhost.localdomain’;
exit

Login to MySQL Prompt using root
mysql -u root -p

Create Database
create database yourdatabasename;

Adding new user and granting access to database
GRANT ALL PRIVILEGES
ON useryouwant.*
TO ‘yourdatabasename’@'localhost’
IDENTIFIED BY ‘password’
WITH GRANT OPTION;

Delete aka Drop User:
DROP USER theuser@localhost;

Delete aka Drop Database
DROP database thedatabase;

Show Databases
show databases;

Show users
SELECT user FROM mysql.user;

Posted in Linux | Leave a comment

My Thoughts Nexus One Vs iPhone 3GS

Posted in Cell Phones and SmartPhones | Leave a comment