Will & Skill Developers

Will & Skill Developers


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

Will & Skill Developers

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


Unique and slugify Django filename

utils.py from django.utils.text import slugify import time import os class UniqueFilenameUtil: def __init__(self, directory): self.directory = directory def unique_filename(self, instance, filename): epoch_time = int(time.time()) slugify_filename = slugify(filename) new_filename = u'{}-{}'.format(ep…

Mohammed HammoudMohammed Hammoud

How to deploy a firebase project

Navigate to your project directory and install firebase-tools: npm install firebase-tools --save Authenticate to firebase firebase login Initialize as firebase project firebase init Deploy to firebase firebase deploy When prompt select the following: ? What Firebase do you want to use? (*Select your project*) ? What directory should be th…

Mohammed HammoudMohammed Hammoud

How to install latest stable ruby version and compass

I encountered a problem earlier today when I tried to install ruby 2.2 on my Ubuntu machine. I tried the default installation guides at https://www.ruby-lang.org/en/documentation/installation/, but as of writing, the ruby-full package provides Ruby 1.9.3, which is an old stable release, on Debian and Ubuntu. There's a lot of ways to insta…

Mohammed HammoudMohammed Hammoud

W&S devops part 2.5 - Testing a django project using drone.io

In the previous post we installed and integrated an instance of drone.io with our github account. Now its time to actually test a real project and send notifications about the build status to a Slack channel. The project I will be using for this tutorial can be found here. It is a super simple project which has a single view and both a u…

Erik SvedinErik Svedin

W&S devops part 2 - Setting up a Continuous Integration (CI) server using Docker and drone.io

Welcome to part 2 in this series where we look at different tools and techniques to help create a better workflow for your development. In this tutorial we'll look at how we can install and configure our very own Continuous Integration server. More specifically we'll be: 1. Installing docker on and drone.io on a server running ubuntu 14.…

Erik SvedinErik Svedin