Thursday, June 24, 2010

Useful linux commands

Found an old post didn't publish here yet, so here it is.

Useful linux commands:
  • nmap
  • uname -a
  • modinfo
  • edit /etc/fstab to add a mount when booting
  • edit /etc/inittab to change runlevel when booting (id:3:initdefault:)
  • scp somefile user@IP:/home/user/directory
  • [root@localhost ~]# PS1=$
    $   (to change prompt)
  • change hostname (localhost):
    [root@localhost ~]# hostname localhost.localdomain
  • add services to runlevels:
    chkconfig --level <number> <service>
    chkconfig --level 3 httpd
  • tail -f    to keep outputting as the file grows
  • any ideas on how to solve this mail.txt -email theborisedu@gmail.com

Tuesday, June 22, 2010

redirect http to https multiple domains

After the torture of trial and error I have devised a working .htaccess way to redirect http to https while having multiple domains, follow the steps below.

First task is to have the /secure directory secure with https, in this directory create the .htaccess and place this text:
RewriteEngine on
RewriteCond %{http_host} secure.domain.ca [or]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://domain.ca/secure [L,R=301]

You can place this anywhere else that you want redirected (i.e other domains), basically users will try hitting the http and redirect to that domain with https!

Second is having the / domain not secure (if your certificate isn't *. users will get a warning, we don't want that), and it will have different subdomain in this example (www1). In the root directory place this in .htaccess:
RewriteEngine on
RewriteCond %{http_host} ^domain.ca [or]
RewriteCond %{http_host} ^www.domain.ca [NC]
RewriteRule (.*)  http://www1.domain.ca/

And now waiting to see if the mx records work...

Sunday, June 20, 2010

Mercury KPC-6225V Driver download

Noticed that the webcam drivers could be hard to find, so here is a distribution of the Mercury KPC-6225V Driver for download.
Filename: Mercury-PC-CAM-WEBCAM-Driver-KPC-6225V.zip
Size: 607.48 MB
Link: http://www.megaupload.com/?d=BCVB5FR4

Saturday, June 19, 2010

how to stream movies videos ninjavideo

In particular, this will fix the issues some videos are having. For example the sound is off and the picture seems incorrect, also if you hit the 'download' button but want to stream (watch the movie without having to wait for the download to complete).

What you will need is VLC player (of course to work with ninjavideo you need java and older version of divx installed [firefox or chrome is also recommended]).

The simple version: go to My Documents/My Videos in XP or Videos in 7 or Vista (%userprofile%/My Documents/My videos/ or where your directory is located). Navigate to DivX Movies\Temporary Downloaded Files/ and find the movie or video that you want to watch. It will have .part extension simply open this with VLC and hit "Don't repair" if prompted, now you are watching the streaming movie in VLC instead of DIVX!

If you are downloading the movie via the download button, use firefox as it will not work with other browsers I tried. Find the .part file where you are saving the file (Desktop or My Documents/Downloads) and play it with VLC.

Make .part files open with VLC by default for ease of use.

For more info check the post about streaming megaupload.
Let me know what you think in the comments below.