Skip to content

Instantly share code, notes, and snippets.

View stephenash's full-sized avatar

Stephen Ash stephenash

View GitHub Profile
$ python3 script.py
Traceback (most recent call last):
File "script.py", line 27, in <module>
desired_capabilities=capabilities)
File "/private/tmp/py-sel/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 140, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/private/tmp/py-sel/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 229, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/private/tmp/py-sel/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 297, in execute
self.error_handler.check_response(response)

Selenium Standalone 6.7 issue

This error occurs when running [email protected] with the webdriverio's standalone service (most recent version). "wdio-selenium-standalone-service": "~0.0.9",

To repro

  • install npm, node 01H5G8WPacclocal:test bills$ node -v
@stephenash
stephenash / README.md
Created October 1, 2015 17:36
i18next-conv bug

0.1.4

$ npm install [email protected]
$ ./node_modules/.bin/i18next-conv --quiet -l en -s sample.json -t output-0.1.4.po
$ head -1 output-0.1.4.po
msgid ""

$ ./node_modules/.bin/i18next-conv --quiet -l en -s sample.json -t output-0.1.4.mo
$ head -1 output-0.1.4.mo
@stephenash
stephenash / README.md
Created October 22, 2014 21:00
Django on ElasticBeanstalk - HTTP to HTTPS redirects

I needed a way to have my Django ElasticBeanstalk application automatically redirect HTTP requrests to HTTPS. Rick Christianson wrote a post [1] about how to do this by overwriting the wsgi.conf file with one that was slightly modified to support the HTTP to HTTPS redirect.

Building off the shoulders of giants, I wanted to do the same, but not have to keep a copy of the config file in my local source directory. Christianson even points out in his post that if ElasticBeanstalk ever changes it's template for the wsgi.conf file, those updates would not be overwritten and you wouldn't get their benefits. To get around that problem, I used sed to insert the new lines into the wsgi.conf file.

References

  1. http://rickchristianson.wordpress.com/2013/11/02/updating-wsgi-automatically-in-amazon-aws/
  2. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-container_commands