Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile
@rasheedamir
rasheedamir / solid principles.md
Last active August 29, 2015 14:11
solid principles
@rasheedamir
rasheedamir / Continuous Delivery.md
Last active August 29, 2015 14:11
Continuous Delivery

Docker

Fact: docker is an abstraction on top of LXC Containers. This means you can run an isolated “virtual machine” (container) within your Linux-based distro. Containers are extremely lightweight and you can start a new container very quickly. You can use containers to run your websites, databases, etc, in a isolated environment. In theory you should be able to use containers to run low-latency operations such as an individual database transaction

12 Factors App!

Integrate with IdP

In order for authentication to work properly both SP(FMU in this case) and the IdP(Säkerhetstjänster) must publish a meta-data document to each other. These documents are needed in order to redirect the User Agent(a user trying to log in) through the authentication flow. They also contain certificate data to sign/validate statements issued between the entities.

Add IdP meta-data to SP

The meta-data for the IdP is published on a URL depending on what environment is needed (test, acctest, prod, etc.). Let's assume we're going for acctest.

  1. Download the meta-data from: https://idp2.acctest.sakerhetstjanst.inera.se/idp/saml
  2. Save this file in the project (e.g. metadata/siths.xml)
@rasheedamir
rasheedamir / Dockerfile
Last active August 29, 2015 14:13 — forked from benschw/Dockerfile
FROM ubuntu
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -s /bin/true /sbin/initctl
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get -y install mysql-client mysql-server
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default
@rasheedamir
rasheedamir / Git Commit Guidelines.md
Created February 11, 2015 13:25
Git Commit Guidelines

Git Commit Guidelines

We have rules over how our git commit messages must be formatted.

Commit Message Format

Each commit message consists of a header, a body and a footer.

<header>
$ sudo vim /etc/init.d/mule
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
apt-get update
# Use docker's install script to install latest version.
curl -s https://get.docker.io/ubuntu/ | sudo sh
SCRIPT