bulding a debian docker base build for a flask app
Start by pulling down a debian base build. docker pull debian:8.0
.Creating a Dockerfile
for a base build to a python flask app. based on debian 8
Start by pulling down a debian base build. docker pull debian:8.0
.Creating a Dockerfile
for a base build to a python flask app. based on debian 8
I have been looking on a way to auth rest api endpoints that needs to have auth. I will be using Python with flask, flask-restful, yaml, pymongo and passlib. passlib will be used to salt the password that will be stored in mondoDB. A note here is that i will be using mongoDB 3.0 which means that you have to install the un released pymongo 3.0. here is the packets and links you need.
»I have recently started to use a productivity theory called Pomodoro
. The principe with Pomodoro is that you work focused on something for 25 min, having a micro break for 5 min and then continue. After 4 sessions you have a longer break for 15 min. I have been using this in combination with a micro checklist
. What i mean with micro checklist
is to have a check list like this.
Common pitfalls when using template files/support files in the working dir of the script, is easy to miss when you are writing command line tools. In this case using python
. Some of the more annoying mistakes is when you have template files stores and referred to in a script, you assume that the person that will use you script stands in the folder were the script is. lest assume that we are using a file template.html in a folder named foobar. of corse this will not work if you are running the script from somewhere else. I normally stand in the same folder as the script when i am developing a tool. When you then stand in some other folder everything will fail since you are not giving the absolute path to the template files.
I what to show a api template i did to generate api post tests with a random varible lenght hex value as the payload in a http post request. In this case i am using python, in compination with nose, to run my tests. Note you can run this without nose but you will get all prints from the support libs. Nose will supress the prints if the test passes. To change to varible number of tests that you can generate you just change the random_data
input integer. The purpose of this is to be able to check that a REST api can take the random input length of the hex payload. in the testmap you gets a dict that contains a random, int, float, hex, password.
Keeping up with tech. I like read and be aware of what is going on in tech, security, apple, linux, development, testing, and some devops related topics. I have attached a OPML
file from my feedly where i get most of my news if your interested. I am frequently listening to a few podcasts, I’m using a awesome podcast iPhone` app overcast to litsen. The smart speed saves some time, voice boost helps to boost the voice those is the features i think it best for me.
Brew some easy and good cold brew coffee. This can be used for just plain ice coffee, ice latte, and many more. A note it that it will be high in caffeine. What you need is.
»So what do i mean with control temptation @ work
. When working with development you have to get it to a problem and try to solve it. Doing that requires that you can stay focused on the task in hand to get the most out of it. Lets say you take 10 - 15 min to get it to the right flow. During your day you have email, facebook, online newspapers, chat systems like IRC
, HipChat
, Skype
, colleagues and many others things that can make you get out of your productive flow. The result of this will mean for every time you lose the 10 - 15 min to get in to the productive flow, over and over. And you may end up at the end of that day and realizing that you did not get done with what you wanted. That is not fun for anyone.