Cygwin - Python Compiled Without SSL SupportDownload error on https://pypi.python.org/simple/pip/: unknown url type:
https -- Some packages may not be found!
ImportError: cannot import name HTTPSHandler
I was trying to install pip in cygwin when this happened. Searches say openssl-devel needed to be installed, but it already was. Apparently python was compiled without ssl support.
My solution was to install cygwin-x86 instead of the 64x one.
md5sum: standard input: no properly formatted MD5 checksum lines foundIf you see this error when you're using apt-cyg, it means you need to update apt-cyg.
You need to run the following commands:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
Automatically Remove Long-Running Docker Containers
The following can be used in cron or run with & at the end of the command:
I found this didn’t work: http://www.ahtik.com/blog/removing-detached-docker-containers-automatically/
Docker Run In Crontab"0 5 * * 1 docker run --rm --name=mycontainer ubuntu:13.10 /opt/bin/job"
The above command is an example of how "docker run" would be used in crontab to run once every week at 5am.
- --rm will delete the container once the job is finished running
- --name will name the container and prevent duplicate jobs from running
- You don't need to use "&" at the end, because crons already run in the background.
MySQL Batch Updates Not WorkingLooking at "SHOW PROCESSLIST" and it looks like your queries are running individually instead of in batches like you sent?
This happens because MySQL runs each update statement individually, but you should still be able to see the batches when the queries are in the "init" state.
Use this query to see the batched queries:
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST where state="init";
New Flask Templatehttps://github.com/xen/flask-project-template/
It's also an interesting example of using docker for a flask project.
"Error response from daemon: 404 page not found" - DockerThis required setting the following in my /etc/environment:
When Not to Use Generator Expressionshttp://stackoverflow.com/a/26635939
I found that post very helpful. I didn't know it's a better idea to use a list comprehension rather than a generator expression for "".join().
mod_wsgi + Flask
Here’s my mod_wsgi configuration for a flask app that uses Flask-Admin.
Trailing slashes matter! If you set a trailing slash, it will only set the alias for that directory and not all of the directories below it.