Skip to content

Instantly share code, notes, and snippets.

View rasheedamir's full-sized avatar

Rasheed Amir rasheedamir

View GitHub Profile
^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$
// Match
2009-12T12:34
2009
2009-05-19
2009-05-19
20090519
2009123
# -*- 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
$ sudo vim /etc/init.d/mule
@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>
#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 / 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
@rasheedamir
rasheedamir / docker.md
Last active September 17, 2015 12:39
docker

Docker, the new trending containerization technique, is winning hearts with its lightweight, portable, “build once, configure once and run anywhere” functionalities.

Container vs Image

An instance of an image is called container. You have an image, which is a set of layers. If you start this image, you have a running container of this image. You can have many running containers of the same image.

So a running image is a container.

Cheat Sheet

  • Lists only running containers: sudo docker ps
@rasheedamir
rasheedamir / Design Patterns.md
Last active March 18, 2016 16:46
Design Patterns

Key patterns are organized into categories such as Caching, Exception Management, Logging and Instrumentation, Page Layout, Presentation, Request Processing, and Service Interface Layer; as listed below:

Exception Management - Exception Shielding: Filter exception data that should not be exposed to external systems or users.

Logging and Instrumentation - Provider: Implement a component that exposes an API that is different from the client API, to allow any custom implementation to be seamlessly plugged in.

Caching - Cache Dependency: Use external information to determine the state of data stored in a cache.

Caching - Page Cache: Improve the response time for dynamic Web pages that are accessed frequently but change less often and consume a large amount of system resources to construct.