Friday, January 28, 2011

WinSCP scripting example

From here it's very easy: http://marionote.wordpress.com/2009/12/12/winscp-script-sample/

"c:\Program Files\WinSCP3\WinSCP.exe" /script=c:\winscpscript\testscript.txt /log=c:\winscpscript\log.txt

Then, create a script file (in this example, c:\winscpscript\testscript.txt.)
# Execute with winscp.exe /script=this_filename /log=logfile.txt
option batch abort
option confirm off
# Use the ip address of your SFTP server, instead of 127.0.0.1
open sftp_login_name:the_password@127.0.0.1

#In order to "cd" or "lcd", use these lines.
cd server_side_directory
lcd c:\client_side_directory

# Normal GET
get Get_This_File

# If you want to save as another filename:
get Get_This_File Get_This_File_local

# If you want to remove the remote file after downloading:
get -delete Get_This_File c:\client_side_directory\Get_This_File_local

# Upload sample script line
put upload_this_file remote_filename

# If you want to rename the remote filename after uploading:
mv remote_filename remote_filename_renamed

exit

Wednesday, January 26, 2011

Good Small Business Router

Since I really like the Gargoyle firmware and used it on my WRT54GL I wondered if there was a better quality hardware to use with this firmware to get a better performance and even good enough for small business use.

The answer is yes there is plenty of hardware choice when it comes to this (and many other) open source firmware that matches if not surpasses the quality of competing brands such as snapgear and sonicwall firewalls.

Buffalo WZR-HP-G300NH can be widely found (amazon shipped fast) and fairly cheap for the hardware you get. Note you even get a community firmware with the router already (dd-wrt.com) but I preferred the gargoyle firmware for many reasons (easy interface + great features) so I wanted to upgrade it but it turns out you will need to do a few tricks to get it on this one!

There's a choice of two possible ways to upgrade, using tftp (the method I used) and some other command line method. I normally like the command line but these were new commands to me so I tried the TFTP method and after about 30minutes to an hour I got it! Here's my definitive guide to get it:

1. it is recommended that you connect to the router through a switch (or a router with dhcp turned off - turning it into a switch) this is necessary step for me since my NIC will be turned off until the right upgrade moment has passed.

2. once connected through a switch I played with the arp command on my windows xp PC and figured out that the easiest is to simply do arp -a and copy the mac of your router (for this example purposes I will use 00-23-69-25-aa-aa)

3. now you prepare the arp command in this cmd window while opening another cmd window for tftp. arp -s 192.168.11.1 00-23-69-25-aa-aa is your command that you keep queued up we will need this later.

4. download and locate the right file which is named something like gargoyle_[version#]-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin - get it from Gargoyle download site by choosing Atheros AR71XX from "Select Architecture" menu.

5. in the new cmd window prepare the tftp command which will be something like this: tftp -i 192.168.11.1 PUT gargoyle_[version#]-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
(keep in mind you will either need to move to the directory of download in command prompt or place the file under the default location that you are in.)

6. Finally, unplug the router, plug it back in and execute the arp -s command queued up in step 3, try the tftp command, and again if it was timed out, it worked for me after once failed as you see in the image below but keep in mind there were a lot of playing until this stage so check arp -a if it shows the router as static. Also note I was unable to ping the router even though it uploaded the image so that appears unreliable but once uploaded leave it be for at least 5 minutes to do it's work. Done!

Enjoy!

Sunday, January 23, 2011

Google Chrome's spell check issue

Ever forget the spelling of a word while typing in a web browser?
You notice this red squiggly line under the word to help correct it. See example >>

Spell checkers have made many lives easier, whether you are are still learning English or were born in English speaking family and still have some spelling mistakes from time to time. I'm not sure their real origin but I do remember Microsoft Word's spell checker first, then it was Firefox and Google search, finally now it's Google Chrome... kinda.

This issue happened many different times, you spell a word just wrong enough for Google Chromenot to suggest what you need!
But that's not the funny part, Google search will actually give you the exact word you wanted:

Anyway if you want to see it in action check the video:


Here's what other people had to say: http://www.google.com/support/forum/p/Chrome/thread?fid=127a69ac5fddee0300049a730630fc0f&hl=en

Thursday, January 13, 2011

The Union Synopsis

Ever wonder what British Columbia's most profitable industries are? Logging? Fishing? Tourism? Ever think to include marijuana? If you haven't, think again. No longer a hobby for the stereotypical hippie culture of the ’60s, BC's illegal marijuana trade industry has evolved into a seemingly unstoppable business giant, dubbed by those involved as 'The Union'. Commanding upwards of $7 billion Canadian annually, The Union’s roots stretch far and wide, directly and indirectly affecting all areas of our society. With 65% to 85% of all 'BC Bud' being exported to the United States, it's clear that the BC marijuana trade has become an international issue with consequences that extend far beyond our borders. When there are record profits to be made, who are the players, and when do their motives become questionable?

•Why is marijuana illegal?
•What health risks do we really face?
•Does prohabition work?
•What would happen if we taxed it?
•Medicine, paper, fuel, textiles, food, etc. Are we missing 

something here? Follow filmmaker Adam Scorgie as he dives head first into Canada's most socially acceptable illegal activity. Along the way, Adam demsytifies the underground market and brings to light how such a large industry can function while remaining illegal. By interviewing experts from around the globe, including growers, clippers, police officers, criminalogists, economists, psychologists, medical doctors, politicians and pop culture icons, Scorgie explores the cause and effect nature of the business behind getting high. 

Nobody's innocent in this exploration of an industry that may be profiting more by being illegal. Join Adam Scorgie as he unravels the mystery of The Union. [Source]

www.theunionmovie.com 

Saturday, January 8, 2011

Ajax Upload working example

My application is a little different but the principle should work for most situations.

Here is the coolest ajax upload code, it includes multi upload, continues (meaning you can keep uploading with it after one or multiple you can upload again) it has progress-bar and even the amazing drag-and-drop in firefox and chrome browsers (why use any other browser anyway right?)

Anyway the usual instructions are to include this code where you want the upload button to appear:

<div id="file-uploader-demo1">
<noscript>
<p>Please enable JavaScript to use file uploader.</p>
<!-- or put a simple form for upload here -->
</noscript>      
</div>


Keep in mind the id of the div, the javascript to include can be done anywhere at the top header or even before this div.

Now here is where I differ from the author's instructions because of my needs; place this function included ajax javascript files:

function createUploader(){          
var uploader = new qq.FileUploader({
element: document.getElementById('file-uploader-demo1'),
action: 'upload.php',
debug: true
});        
}

And since the way I generate the forms, the user clicks on a button which triggers onclick and the onreadystatechange will generate responsetext inside the javascript will not execute as usual so I simply add :
setTimeout('createUploader()', 500);

after the:

xmlHttp.onreadystatechange=thefunc;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);

<place above line here>

So this setTimeout waits for half a second and loads the function of the upload button and iframes associated all on it's own!

Hope someone finds this useful, leave a comment if you do, or have questions, etc.

Friday, December 31, 2010

Thursday, December 30, 2010

Wikileaks and Simpsons

After all the buzz around wikileaks I have been following the stories and got reminded of a very funny episode of the Simpsons that resembled this situation.

The Simpsons season 12 episode 06 called "The Computer Wore Menace Shoes" (2000) when Homer got a computer and made a webpage, to get content on it he wrote a rumor about the mayor using money for street paving to build his private pool! (fox published this webpage with all the articles here: www.mrxswebpage.com).

Mr X. is like wikileaks and Homer Simpson is like Julian Assange! great to watch the old episode again, check it out here: www.icefilms.info/ip.php?v=46979.

Enjoy and tell me what you think!

Tuesday, December 28, 2010

How to watch streaming video on icefilms.info

1. Install and open Chrome (or Firefox with greasemonkey)
2. Install the older version of divx web player (also linked from icefilms)
3. Install the quick stream script for icefilms (also linked from icefilms)

You should now be ready to go!

Note: set the "ask to update" preferences of divx player to "once per month" instead of "once per session" because you don't need the new version (always cancel if it asks to update).

Let me know how it goes.

Monday, December 27, 2010

How to delete scan to destination email

HP LaserJet M1522

1. Open the scan software from start>all programs>HP>HP laserjet M1522>Scan

2. Click Setup > Delete existing destination > Next

3. Choose the one to delete click next, confirm and your done!

Friday, December 17, 2010

DivX Streaming website evolution

We came a long way from relativly slow bittorrent downloads which cannot be streamed (because the pieces are not downloaded in-order) and I thought this history is worth mentioning somewhere so here is my version of how it came to be with high quality divx/xvid/avi video streaming websites, also a good way to conclude the end of this year 2010.

1st generation:
It all started when DivX, Inc. created what appeared to be an answer to youtube, a competing video host/streaming site called stage6.
An ambitious idea indeed, actually I thought it was great and hopped it would take off and really be something great. I actually think they could have evolved it further the way youtube started working with copyright holders, record label companies and movie production companies/film studios. Anyway as the webpage says "Stage6 Is No More", they opened up the market for other hosting companies to arise on February 28, 2008 [1] and initially they recommended veoh which did mostly flash based video but with their own spyware software would allow downloading divx, that died in popularity with the HQ lovers like me.

2nd generation:
As it happens stage6 search engine sucked and when it came to copyrighted files (be it music videos, movies or shows) they got deleted often when names were obvious so the tech-savvy users renamed them and posted to private community type sites. One of these sites which I liked a lot was joox (still active). When stage6 announced it goes down, or when it actually went down the search for another host has begun and megaupload (also still active, still the best file host) had the biggest file size limits at the time. This was used with joox for some time until it had some issues and was offline for a long time which brings us to 3ed gen...

3ed generation:
A new search has started and there were (and still are) many websites coming up, going down all the time but this focuses on what I liked the most but in this case it was so widely liked that ninjavideo(no longer active) became a household name like MTV or something. They still used megaupload as the host but they had a very special virtual software that was run on java (not to be confused with javascript), once accepted the warning by opening the "ninjavideo helper" normally followed by a version # which means it was activly being developed, this allowed you to stream divx/xvid avi videos in blazing fast speeds. This special embedding was so good that the only way I found out it uses megaupload is by sniffing the packets and looking up the IP addresses, in other words users would never know where they are hosted.
This was honky dory until the domain name was seized by the united states government on grounds of copyright infringing.

4th generation:
This brings us today to icefilms, yet again using megaupload (notice a common denominator?) and being very useful with searching (google's custom search) and organizing which goes by movies, shows, genre, popularity, real release date and by added to the site date they are all very convenient. There are also great features that I enjoy which is page scraping from imdb, linking to imdb and to youtube for trailers (searches youtube!). All this and even great speed at adding videos from forum posting (unlike ninjavideo's judgment ridden forums). Great speed at new releases and also a great decision is to avoid CAM movies which I hated on ninjavdeo.... just cause it's out there doesn't mean I want this low quality video!
This is all possible with a special "ICE Quick Stream" greasemonkey add-on script which takes the megaupload pages and turns them into embedded divx web player type pages. But I still enjoy using the manual streaming with VLC when installing the plugin script isn't a good option.

Overall this forth generation is the best right now, it does worry me a little that it's using a common denominator (megaupload) but we should change our copyright law's anyway and this will not be a huge concern.

Let me know your thoughts!

Thursday, December 16, 2010

YouTube slow on Rogers Internet throttling

So for some time these has not happend but recently made me quite angry so had presed the print screen button and now reporting back on the internet inequality of Rogers, also known as throttling of bandwidth (or something).


First screen shot shows how slow youtube loads this video Facebook Founder Mark Zuckerberg Interview

Notice the network utilization is very slow to load this youtube video, to prove that it's isolated to youtube we can use the speed test.
Point A is the first attempt, point B is the second, it's between 6 and 10 percent network utilization compared to barely 1 percent with youtube!


[update: it's getting a little faster at times, at least fast enough to keep up with the video...]

Us Now film review and thoughts

Us Now is a documentary film that asks "Can we all govern? Us Now looks at how 'user' participation could transform the way that countries are governed." [vo.do]. I highly recommend seeing it soon as you have a spare hour (and maybe a few minutes to ponder afterwards). [Watch it on watch.usnowfilm.com or youtube/usnowfilm or download using p2p & bittorrent from vo.do/usnow]

While I always knew about collaborating, helping and sharing ideas and work are great in projects such as Wikipedia, Linux and open source software, rideshare and more, I actually never heard of coutchshare, momnet, management of a soccer team (in England) and even amazingly funds and investments through individuals, helping bands get gigs and even albums made by commenting on good tracks and even contributing some money for them to get studio or air time. These examples only scratch the surface of what can, will and IS being done by collaborating, helping and sharing ideas, work and decisions.

These collaboration tools are really amazing when it comes to those individual things described but this can be much more powerful when applied to bigger impact things such as Government spending, policies and so on. There can be many, many useful places to think about collaboration of thoughts, ideas and even work as we see with many, many projects already happening everyday and probably since the dawn of time!

I think this will play a large role in the future of not only our society but dare I say our humanity and civilization as a whole. Sharing our ideas, knowledge and experiences not only makes our life great but it also benefits everyone. The right and qualified people on particular subject matter are always needed but I also think that any average person can have enough experience and knowledge to contribute to those kinds and more of the conversations, topics and help in decision making or simply question things from their perspective. Having devil advocates always proved a good thing in small groups, imagine having the entire world to help in whatever you can imagine! 

This is an amazing time to be alive, our human population is large and growing thanks to our technological,  medical, chemical, biological and, well, all the topics in the world (and the universe) that we have made serious advances in. This is only possible by our collaboration, sharing our knowledge and learning, experimentation and further observation and advancing our science, engineering and so much more!

The only thing that seems a little lacking is the field of our governing ourselves (and religion but I will not get into that). Most of those ideas are from ancient history and even those things that have been adopted are still very lacking. It's very clear that there will be a new way for us to manage ourselves in the future. True democracy will come when we can accept decisions that a majority agrees on, transparent systems using web technologies that are open and standardized. But I'm sure these will be finally tuned as we grow in the new society.

I think it makes a lot of sense to combine some of the ideas from Future by Design which I reviewed much earlier this year. Although it sounded more like a pipe dream at first, after seeing 'Us Now' it makes much more sense when thinking about resources based economy, together with these sharing technologies that really wire us all together, and help decide collectively as opposed to 'mechanically' as they said in Future by Design or how it is done now and for the past 100s of years, decisions are made by few elitists at the top that, for what ever reason, got there...

When we put our minds together we can accomplish anything, think about how the internet, the truly global network connecting all of humanity together can really take this civilization further and into the future into a much better place for all of us. I think many already agree that so many things are wrong in our civilization (money and government being the top problems), so we really all need this type of system and I think it's not a matter of IF it will be implemented but rather, when and how it will happen.

We all know the saying that two heads are better than one, will in this case we have the entire population (that can access the internet - for now 1 or 2 billion).

Let me know your thoughts!

Wednesday, December 8, 2010

how to do a lease take over

Couldn't find the simple step-by-step details so here is what I have so far:

1. Get the credit check application from your leasing company (this is a financial company or manufacturer, ask your dealer if you don't know)
2. Fill the application and send to the company (fax or mail is probably acceptable) = $25 (charged from your usual lease payment method
3. As this happens or before this happens (bear with me as I find out, I will update this step) you need to get your car proof from the provincial ministry (or state organization if in US I assume) to prove the car was not in accidents. = $not sure yet
5. Upon approval I assume the transfer can be done (didn't get this far yet, will update once I do.) = $500 (sent by check from my understanding)

And this is as far as I got so far, if you have any tips or different steps, comments, etc leave them below or privately to my email.
Thanks for visiting!

Sunday, November 21, 2010

How to change IP address

The real answer (for me at least) is different from the most common tutorials on the net, so here's how to do it successfully if you have a cable modem and possibly some DSL (untested) internet service providers.

1. If you have a router gateway, login to your router (this is done by browsing to http://192.168.1.1, use the default password if you don't know it - google search your router model's default password.)

2. Find the MAC address on your router configuration pages, (if you are wired directly to the internet directly from your computer without a router you will need to do this on the computer instead)

3. Change the MAC address even by one digit and Save/commit your changes.

4. Once the saving is done you may require a restart of the router but your IP should now be changed (check via whatismyip.com or similar websites or on the router itself)

Since every router is very different interfaces, default passwords and configurations this is hard to provide in screenshots or otherwise so the major ideas are here but if you have issues feel free to leave a comment.

Saturday, November 20, 2010

MySQL get Query took seconds time taken

Took a bit of time to find this online so here's what I found that works.
This is suppesdly from phpmyadmin (which is where I should've looked) but I was lazy to check there so found it online and worked great!

This is before the query:
list($usec, $sec) = explode(' ',microtime());
$querytime_before = ((float)$usec + (float)$sec);

**query and execution here**

After the query:
list($usec, $sec) = explode(' ',microtime());
$querytime_after = ((float)$usec + (float)$sec);
$querytime = $querytime_after - $querytime_before;

I use functions so this is how I sent back the value:
return array("something" => $something, "qtime" => $querytime);

the function is called normally for outputing the results as well as the time
$thefunction = thefunction(whaterver);

inside the other loop I used this to collect the total queries time together:
$qtime = $thefunction['qtime']+$qtime;

After that, you can output it at the bottom of the page (or where ever):
<?php $strQueryTime = 'Query took %01.4f sec';  echo sprintf($strQueryTime, $qtime); ?>

The final output result will be :
Query took 0.00xxx sec

Let me know what you think in the comments

Thursday, November 18, 2010

Open directory folder via CMD in windows

I had installed the portable xamp version which was great for developing in various places!

Anyway this can apply in many cases but for this case I have to get to inside directory (F:\xamp\xampplite\htdocs\) as you can see it's far inside and takes many clicks, to save time I found a way to get there faster!

Simple: create a text file and type the following:
start xamp\xampplite\htdocs\

Save it as something.bat and place in the root of your flash drive, since they tend to have different drive letters it's best to keep the path relative instead of absolute.

When executed (double click or right click and run) this will open the folder in windows!

Great solution in my opinion, but let me know what you thought (in the comments below)

Appointment Tracking Calendar Program Software CRM

Been developing a CRM (customer relationship management) calendar software application program (in the cloud which means it's web hosted). The main goal of it is to track and manage appointments with additional components for customer relationship management.

It is currently in full production with the company, but we have a private beta version currently open so if you would like to know more please contact me at theborisedu at gmail dot com.

Mainly we are looking for feedback on the current version that we find extremely useful but we can customize the software further for specific needs.

Our main focus are small to medium business that has employees booking appointments for sales people. And if you are interested in a tracking software for both the sales people and employee organizational purpose, professionalism, mobility (anywhere there's a browser and internet: iPhone or other smart phones included).

Whether you (or someone you know) are in those categories and if you currently have a management system for some or all aspects and if you are considering switching or adding components of the business customer relationship managements. Or if you don't have any type of software management use at the moment and looking at options we think we have something great for you!

I would like to to hear from you or that someone you know, about your or their needs for the organization, more about the company and how it operates from a logistics and statistic level, and what kind of the organizing is done at the moment and looking for in the future.

Either leave a comment below or drop us a message (theborisedu at gmail.com) to get more information.

Thanks to everyone.

Wednesday, November 10, 2010

How to use LogMeIn - connecting to remote computers

Found an old tutorial and though it's probably somewhat outdated, maybe you can get a general idea or something...

Last updated: April 5, 2009
You will learn how to:
  • Create a LogMeIn account
  • Log in to LogMeIn
  • Access computers with LogMeIn


Follow this this link; Sign up, then go to step 4.
If the link doesn’t work, then follow the following steps.

  1. On a web browser, type http://logmein.com and hit enter.

  2. Click on Create an account (Fig 1).
 Fig. 1

  1. Click on Sign up under LogMeIn free. (Fig 2)



 Fig 2

  1. Fill in your email twice, enter a password twice, choose Canada, and click Create Account. (Your email and that password will be used to login later – so don’t forget what you entered in this section!)
  1. Check your email and follow the instructions in the email to activate your account.

  2. You will receive an email with a verification link, click it. (fig 3)



Fig 3

  1. Once it is activated, let me know which email you used to register/login and which computers you need access to.

  2. Once I include your email in the permissions you will receive an email with the invitation to access the remote computers. (fig 4)
  Fig 4
  1. Click the link to accept the invitation. Enter you first and last name. (fig 5)


Fig 5
  1. Click Next. Now on the “my computers” page click the down arrow under Profile, and select Secondary user for boris123456@email.com. (fig 6)

   Fig 6

  1. Now you will see all the computers that you can log into. Click the computer name if it is online. You will be prompted for a username and password which will be provided by the administrator.

  2. Once logged into the computer, you can remote control it by clicking the “Remote control” button on the left panel.

  3. Click “ok” and “continue” when and if asked while connecting to the computer.

Sunday, November 7, 2010

How to record audio mp3 from computer

Thought this might be useful to someone...
If you have audio playing on your computer (even without speakers, just audio drivers installed) you most likely can recoding it. It's really simple!

You will need:
  • Working audio drivers (if listening to anything works - you have it!)
  • Audacity
1. make sure your audio works, if you hear any sound from sites like youtube, or even test using the sample music in my music folder, the speakers don't have to be in for this to work. Also check if you see the small speaker icon near the clock.

2. Assuming this works go ahead and install Audacity, once done open it and go to the drop down that will show 'Microphone' (or something else?) choose 'Line in' 

3. click the record button (big red circle near the play and pause) if you start playing something with sound (i.e. youtube, music) you should see the audio waves move on it. If not stop, choose the 'Stereo Mix' and try again recoding audio while it's playing. Every computer seems to have a different one that works for it and some have various options so play around until you get which works for you.

4. once done recoding what ever you can click the stop button (square) and now save by clicking file, "Export as MP3" (this may require some other dll but it's not hard to find on google.) name it and your done!

Now you have your mp3 of music from youtube or other places without relaying on third party websites to convert (although there's nothing wrong with them converting it anyway)
Enjoy and let me know what you think in the comments below

Saturday, November 6, 2010

change text color css onfocus onblur

this one seemed tricky but actually pretty simple, thought this code may look a bit clustered I admit there's probably a neater way since I only needed one place with this I didn't bother cleaning, if you do don't forget to hit me about it!

<input type="text" name="search" class="search" size="15" value="Search..." onKeyPress="if(event.keyCode == 13){ search() }" onblur="if(this.value==''){this.value='Search...'; this.className = 'unfocused';}; " onfocus="this.className = 'focused'; if(this.value=='Search...'){this.value=''};" />

This adds on to the previous post about search input text that will display "search..." and disappear when clicking it, this addition makes the text gray and back to black when use types into the box (on focus)

heres the css:

.search{
color:gray;
}
.focused {
color:black;
}

try it out and let me know how it goes!