Saturday, February 23, 2013

Online tools

http://en.linoit.com/ - Sticky and Photo Sharing for you
https://www.guerrillamail.com/ - Disposable Temporary E-Mail Address
https://join.me/ - free screen sharing and online meetings
http://gyazo.com/en - screen grabbing tool
http://www.online-convert.com/ - Convert media files online from one format into another
http://caniuse.com - Compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers
http://www.ustream.tv - live streaming platform
http://new.livestream.com/ -  live streaming platform
http://www.online-stopwatch.com/ - Online Stopwatch tool
http://www.hidemyass.com/ - web proxy
http://goo.gl/ - Google URL Shortener
http://webwhiteboard.com - online whiteboard
http://qrcode.kaywa.com/ - QR code generator
http://2epub.com - converts various e-book formats.
http://2zip.org - allows to extract archives online and convert many 'exotic' formats to ZIP.
http://puzzleware.net/codehtmler/default.aspx - is a simple program that translates plain text code into a colorized HTML version of the code
http://www.diffchecker.com/ - online text diff

Online development tools


http://sandbox.onlinephpfunctions.com/ - php playground
http://jsbeautifier.org/ - javascript beautifier 
http://regex101.com/ - regexp playground
http://regexpal.com/ - a JavaScript regular expression tester
http://jsoneditoronline.org/ - json online editor
http://rubular.com/ - regexp playground
http://gskinner.com/RegExr/ - regexp playground
http://www.debuggex.com/ - regexp playground
http://www.regexper.com/ - regexp playground
http://regexponline.com/ - regexp playground
http://jsfiddle.net/ - online editor for snippets build from HTML, CSS and JavaScript
http://sqlfiddle.com/ - a tool for easy online testing and sharing of database problems and their solutions.
http://refiddle.com/ - regexp playground
https://koding.com/ - software development in the browser
http://codepen.io/ - is all about front end code inspiration and education through sharing
http://dabblet.com -  is an interactive playground for quickly testing snippets of CSS and HTML code.
http://cssdesk.com/ - css playground
http://jsdo.it/ - is an online editor where you can try running your codes as you write.
https://tinker.io/ -  is a quick and easy tool for writing and sharing code
http://tinkerbin.com/ - lets you play around with HTML, JavaScript and CSS without creating files or uploading to servers
https://thimble.webmaker.org/en-US/editor - makes it ridiculously simple to create your own web pages. Write and edit HTML and CSS right in your browser. Instantly preview your work. Then host and share your finished pages with a single click. Easy
http://liveweave.com - is a HTML5, CSS3 & JavaScript playground
http://code.google.com/apis/ajax/playground/ - Code Playground
https://compilr.com - online platform that allows developers to write and learn code all from the comfort of their web browser
https://c9.io/ - is an online platform for development; the code is open-sourced on GitHub, free to adapt and use for everyone, anywhere, anytime.
https://api.divshot.com - work easier with twitter Bootstrap
http://www.bestwebfonts.com/ - web fonts
http://editor.method.ac/ - SVG editor
http://cedvel.com/ - application for designing grid systems
http://cssdeck.com/ - is a place where you can quickly create some experiments (or testcases) that involves HTML, CSS, JS code.

Do you know some useful online tools?


Sunday, December 9, 2012

Safe escaping for HTML and URL


 >>> link = 'file.py?fname=a&lname=b&amp=c&sect=d&lt=e'  
 # escape for HTML   
 >>> import cgi  
 >>> cgi.escape(link)  
 'file.py?fname=a&jlname=b&amp=c&sect=d&lt=e'  
 # escape for URL   
 >>> import urllib.parse  
 >>> elink = urllib.parse.quote_plus(link)  
 >>> elink  
 'file.py%3Ffname%3Da%26lname%3Db%26amp%3Dc%26sect%3Dd%26lt%3De'  
 # URL satisfies HTML too: same   
 >>> cgi.escape(elink)  
 'file.py%3Ffname%3Da%26lname%3Db%26amp%3Dc%26sect%3Dd%26lt%3De'  

Monday, November 26, 2012

Configure vim for python

First important stuff after installation of ubuntu:
 sudo apt-get install vim python python-pip python-virtualenv git-core bash-completion  
Create in a home directory config for vim
 $touch ~/.vimrc  
or open global config to apply settings for all
 $sudo vim /etc/vim/vimrc  
and add the following parameters to this files.
 autocmd FileType python set omnifunc=pythoncomplete#Complete  
 autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS  
 autocmd FileType html set omnifunc=htmlcomplete#CompleteTags  
 autocmd FileType css set omnifunc=csscomplete#CompleteCSS  
 autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags  
 autocmd FileType php set omnifunc=phpcomplete#CompletePHP  
 autocmd FileType c set omnifunc=ccomplete#Complete  

Good how-to in russian 

Monday, November 5, 2012

Selenium with python

First of all ensure that python is installed on your PC.
Or you can download it from python.org, use v.2.7.
On ubuntu just run the following commands in terminal:
 $sudo apt-get install python python-setuptools  
 $sudo easy_install pip  
 $pip install selenium  
On windows install python and setup tools from windows installers:
python-2.7.3.msi
setuptools-0.6c11.win32-py2.7
Add PYTHONPATH to envirenmonet variables
 c:>easy_install pip  
 c:>pip install selenium  
Run python interpreter and check that all stuff was installed correctly:
 >python  
 >from selenium import webdriver #import selenium webdriver library  
 >browser = webdriver.Firefox() #start firefox  
 >browser.get('www.qa-notes.blogspot.com')  
You can explore all available methods by using the following command interactively:
 >for method in dir(webdriver): print(method)  
Then you can look at help by:
 >help(webdriver.<methodname>)  
Selenium Python API here selenium-python API
If you want to write robust and maintainable test, you can use 'unittest' module with webdriver
For example:
 import unittest  
 from selenium import webdriver  
 class firstTestSuiteTest(unittest.TestCase):  
   """initialize some stuff here"""  
   def setUp(self):  
     self.browser = webdriver.Firefox()  
   """clean some stuff here after each test"""  
   def tearDown(self):  
     self.browser.close()  
   """each test methods' name should be start with 'test_'"""  
   def test_PasswordValidation(self):  
     browser = self.browser  
     browser.get(URL + 'sing-up')  
     pwdbox = browser.find_element_by_id('passord')  
     pwdbox.sendkeys(pwdGenerator())  
     pwd.click()  
     self.assertIn "Incorrect passowrd", errorMessage  
 suite1 = unittest.TestLoader().loadTestsFromTestCase(firstTestSuiteTest)  
 suite2 = ....  
 suiteN = ....  
 """Prepare all suites all together"""  
 """  
 To skip some tests use anotations before method definition, e.g  
 @unittest.skip("demonstrating skipping")  
 def test_ThisTestWillBeSkipped(self):  
   Blah Blah Blah  
 """  
 fullTest = unittest.TestSuite([suite1, suite2, ..., suiteN])  
 unittest.TextTestRunner(verbosity=2).run(fullTest)  

Tuesday, October 30, 2012

Selenium headless with python

Headless selenium. Will be useful to integrate with CI

Install virtual display and python wrapper for it:
 $ sudo apt-get install xvfb xserver-xephyr  
 $ sudo pip install pyvirtualdisplay  
Usage example:
 from pyvirtualdisplay import Display  
 from selenium import webdriver  
 """visible=0, visible=1 for display or not virual display"""  
 display = Display(visible=0, size= (1024, 768))
 display.start()
 driver= webdriver.Chrome() 
 driver.get('http://www.qa-notes.blogspot.com')
 print 'The title of current page is: ', driver.title  
 driver.quit()
 display.stop()  

Saturday, October 27, 2012

Install Java in Ubuntu 12.04

If there is a problem with java in Ubuntu, remove previous version 
$sudo apt-get purge openjdk*
add new repo and install Oracle Java 7
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
$sudo apt-get install oracle-java7-installer