Skip to content

Instantly share code, notes, and snippets.

View ervinb's full-sized avatar

Ervin Barta ervinb

View GitHub Profile

multi-write-pvc

GCE persistent disk + NFS server (single writer)

kind: Service
apiVersion: v1
metadata:
  name: nfs-server
apiVersion: v1
kind: Service
metadata:
name: nginx
labels:
app: nginx
spec:
ports:
- port: 80
name: web
#!/bin/bash
set -e
registry_version="2"
local_registry_port="5000"
local_registry_name="localhost"
local_registry_url="${local_registry_name}:${local_registry_port}"
docker_image_name="$SEMAPHORE_REPO_SLUG"
base_image_name="${local_registry_url}/${docker_image_name}"
#----------------------------------------------
## add this snippet to ./config/application.rb
#----------------------------------------------
if ENV["SEMAPHORE_CACHE_DIR"]
config.assets.configure do |env|
env.cache = ActiveSupport::Cache::FileStore.new("#{ENV["SEMAPHORE_CACHE_DIR"]}/assets-cache")
end
end
#---------------------------------------
#!/bin/bash
set -euo pipefail
changed_files=""
changed_directories=""
if [ "$BRANCH_NAME" = "master" ]; then
echo "On master. Nothing to do."
@ervinb
ervinb / devops_best_practices.md
Created November 18, 2017 18:27 — forked from jpswade/devops_best_practices.md
Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, Andrew Shafer did a talk called "Agile Infrastucture" addressing issues around involving more of the company in the same disciplines as programmers.

In 2009, Patrick Debois created "DevOpsDays" conference to help to bring it to light. However, it wouldn't begin to trend until about 2010, when people would begin to describe it as a standalone discipline.

Today, DevOps goes beyond just developers, systems administration and infrastructure, its about [dev, ops, agile, cloud, open source and business](https://blogs.the451group.com/opensource/2010/03/03/devops-mixing-dev-ops-agile-cloud-open-source-and-busi

#!/usr/bin/env bash
chrome_aliases=('/usr/bin/google-chrome' '/usr/bin/google-chrome-stable')
wrapper_name="chrome-wrapper"
wrapper_install_path="/opt/$wrapper_name"
cat <<WRP > $wrapper_install_path
#!/bin/bash
_kill_proc() {
##
# Exception:
# ThriftClient::NoServersAvailable:
# No live servers in [127.0.0.1:9160]
##
# install Cassandra Cluster Manager
$ sudo pip install ccm
# install Ruby driver
#!/bin/bash
## This script is very hacky way to use VPN only for specific domains.
# For example: if you have a VPN subscription and want to access Pandora outside of the USA (may or may not be legal),
# you'd run it like "veer ovpn.conf www.pandora.com"
#
## How it works:
# Fetches the domain's IPs and routes their connections through a VPN gateway.
#
## Requirements: