Will & Skill Developers

Will & Skill Developers


Thoughts, snippets and ideas from the team at Will & Skill AB, Stockholm.

Hassan Mian
Author

Hassan Mian

Don't let someone else's opinion of you become your reality. - Les Brown

Generate SSH keys

At Will & Skill we use SSH Keys to connect to our servers. To generate a SSH Keys please follow the step below 1. Start Terminal Navigate to your .ssh folder cd ~/.ssh If the folder doesn't exist, create on: mkdir ~/.ssh 2. Generate SSH Key ssh-keygen -t rsa -b 4096 -C "your_email@example.com" 3. View your id_rsa.pub cat ~/.ssh/id_rsa…

Hassan MianHassan Mian

Unique image name

This should be used as default since all our projects stores files on S3 buckets def unique_image_name(instance, filename): # Prepends unique epoch timestamp on image filename directory = 'mysupercoolmodel/image' epoch_time = int(time.time()) path = u"{}/{}-{}".format(directory, epoch_time, filename) return path class…

Hassan MianHassan Mian

Deployment Routines

Take a snapshot of the database. Always have a staging environment and deploy to it before deploying to production environment. Check if latest commits have some migrations. Check if requirements.txt has been updated or any new packages have been installed. Try not to deploy during “heavy” hours. Deploy often and deploy small changes.…

Hassan MianHassan Mian