Skip to content

Instantly share code, notes, and snippets.

View mlabouardy's full-sized avatar
☁️
Subscribe to my newsletter ➡️ https://devopsbulletin.com

LABOUARDY Mohamed mlabouardy

☁️
Subscribe to my newsletter ➡️ https://devopsbulletin.com
View GitHub Profile
@mlabouardy
mlabouardy / steps
Last active April 4, 2016 12:45
Install Docker Compose in boot2docker
Docker Compose can be installed in boot2docker starting v1.7.0 following the standard install process
sudo curl -L https://github.com/docker/compose/releases/download/1.7.0-rc1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
@mlabouardy
mlabouardy / docker-cleanup.sh
Last active April 20, 2016 07:37
Docker clean up
#!/bin/bash
docker_version_regex='^(1\.[4-8]\.)'
docker_version=`docker --version | awk '{print \$3}'`
log_directory='/logs'
log_file="$log_directory"/cleanup.log
if [ ! -d "$log_directory" ]; then
mkdir "$log_directory"
fi
@mlabouardy
mlabouardy / The Technical Interview Cheat Sheet.md
Created May 30, 2016 11:46 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@mlabouardy
mlabouardy / build.sh
Created January 23, 2017 15:18
Install docker-compose on CoreOS
#!/bin/bash
mkdir -p /opt/bin
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@mlabouardy
mlabouardy / main.go
Created August 9, 2017 09:44
http server in golang
package main
import (
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
)
@mlabouardy
mlabouardy / config-env.yml
Created October 21, 2017 19:46
setup build environment
version: 2
jobs:
build:
docker:
- image: python:3.5
environment:
MYSQL_HOST: 127.0.0.1
MYSQL_DB: mydb
MYSQL_USER: root
MYSQL_PASSWORD: root
@mlabouardy
mlabouardy / config.yml
Created October 21, 2017 19:53
Setup CI/CD with Heroku, Docker & CircleCI
version: 2
jobs:
build:
docker:
- image: python:3.5
environment:
MYSQL_HOST: 127.0.0.1
MYSQL_DB: mydb
MYSQL_USER: root
MYSQL_PASSWORD: root
@mlabouardy
mlabouardy / codedeploy.sh
Created October 21, 2017 22:03
Install CodeDeploy agent
#!/bin/sh
yum update
yum install -y ruby
cd /home/ec2-user
aws s3 cp s3://aws-codedeploy-us-west-1/latest/install .
chmod +x ./install
./install auto
@mlabouardy
mlabouardy / appspec.yml
Created October 21, 2017 22:04
CodeDeploy configuration file
version: 0.0
os: linux
files:
- source: /index.html
destination: /var/www/html/
hooks:
BeforeInstall:
- location: deploy/before_install
timeout: 300
runas: root