Skip to content

Instantly share code, notes, and snippets.

View cnb0's full-sized avatar

nbabu cnb0

View GitHub Profile
@cnb0
cnb0 / docker_demo_commands.txt
Created December 28, 2021 13:14 — forked from milindchawre/docker_demo_commands.txt
Docker demo commands
docker run -d -it centos:7 sh
#Dockerfile
-----------------------------------------------
FROM ubuntu:14.04
RUN \
apt-get update && \
apt-get -y install apache2
@cnb0
cnb0 / k8s-user-data.sh
Created November 19, 2021 21:48 — forked from initcron/k8s-user-data.sh
kubernetes user data script
#!/bin/bash
apt-get update
apt-get install -y git wget
# Install Docker
apt-get install -yq \
apt-transport-https \
ca-certificates \
curl \
@cnb0
cnb0 / gitlab-ci.yml
Created October 30, 2021 10:04 — forked from doevelopper/gitlab-ci.yml
Gitlab ci template config for my c++ project
variables:
GIT_SSL_NO_VERIFY: "true"
GIT_DEPTH: "3"
GET_SOURCES_ATTEMPTS: "3"
ARTIFACT_DOWNLOAD_ATTEMPTS: "2"
GIT_SUBMODULE_STRATEGY: "recursive"
GIT_STRATEGY: "fetch"
GIT_CHECKOUT: "false"
CMAKE_BUILD_TYPE: "Release"
BUILD_DIRECTORY: "build-$CI_PROJECT_NAME"

Git/Github step-by-step Workflow

Step-by-step guide for creating a feature or bugfix branch, submit it for code review as a pull request and once approved, merge upstream. This guide is intended for internal developers with push access to all relevant repos.

You should understand rebasing and squashing. For a very good explanation on rebasing and squashing with pull requests see How to Rebase a Pull Request. Also worth reading is the Hacker's Guide to Git.

Setup

@cnb0
cnb0 / README.md
Created September 25, 2021 10:36 — forked from cjtallman/README.md
Vagrant Gitlab Server

Vagrant Gitlab Server

Quickly set up a local Gitlab CE server using Vagrant.

Run vagrant up to setup the virtual server.

Server Details

  • Ubuntu 16.04
  • Installs latest Docker
@cnb0
cnb0 / Vagrantfile
Created August 30, 2021 16:00 — forked from rjz/Vagrantfile
Vagrant with MariaDB provisioned (ansible)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
#!/bin/sh
#
# This script deploys the given manifest,
# tracks the deployment, and rolls back on failure.
#
# First execute this with "myapp.yaml" and then try it with "myapp.failing.yaml"
#
MANIFEST_PATH=$1
DEPLOYMENT_NAME=myapp
apiVersion: v1
kind: ConfigMap
metadata:
name: rabbitmq-config
namespace: default
data:
enabled_plugins: |
[
rabbitmq_management,
rabbitmq_peer_discovery_k8s,
@cnb0
cnb0 / Vagrantfile
Created April 7, 2021 07:54 — forked from bhdrkn/Vagrantfile
RabbitMQ Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby ts=2 sw=2 expandtab:
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.provision "shell", inline: <<-SHELL
echo 'deb http://www.rabbitmq.com/debian/ testing main' >/etc/apt/sources.list.d/rabbitmq.list
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
apt-key add rabbitmq-signing-key-public.asc
@cnb0
cnb0 / README.md
Created March 18, 2021 11:32 — forked from rafi/README.md
k3d-workshop

K3D Workshop

App Case-Study

A "simple" distributed app today.

  • HTTP Rest API
  • Task Workers (Queue consumers) and Crons (Periodic jobs)
  • Web client
  • Android / iOS client