Monthly Archive: January 2016

Submit a form with ajax 0

Submit a form with ajax

This is a basic operation that you might have to do when upgrading an old web app. One solution is using jQuery .serialize() function   Method #1: Sent using CGI params key=value pairs: var...

Wait until document loaded 0

Wait until document loaded

if (document.readyState === "complete") { bindAdminUpload(); } else { addEvent(window, "load", function() { bindAdminUpload(); }); }

NameError: global name 'By' is not defined 0

NameError: global name 'By' is not defined

Problem: Traceback (most recent call last): File "seleniumPhantomJS.py", line 153, in selenium_phantom_web_direct_rtp_create_test("10.65.11.145") File "seleniumPhantomJS.py", line 118, in selenium_phantom_web_direct_rtp_create_test isPresent = is_element_present(driver, By.CSS_SELECTOR, "article.notifier-log") NameError: global name 'By' is not defined [flemieux@atom makito]$ NameError: global...

Excluding files from tar 0

Excluding files from tar

This is what I use to backup the public_html of a site on Virtualmin: tar -czf site-backup-`date +%Y-%m-%d,%Hh%M`.tar.gz ./public_html/ --exclude "./public_html/stats" --exclude "./public_html/awstats*"