Skip to content

Instantly share code, notes, and snippets.

View ZeroDeth's full-sized avatar
🏠
Working from home

Sherif Abdalla ZeroDeth

🏠
Working from home
View GitHub Profile
#!/bin/bash
LOGFILE=/tmp/backup-gitlab-to-s3.log
GITLAB_BACKUP_FOLDER=/var/opt/gitlab/backups
S3_FILE_PREFIX=gitlab
S3_BUCKET_PATH=bucket-name-goes-here/folder-here
SLACK_USERNAME="Backup Gitlab Daily - `hostname`"
SLACK_CHANNEL="#od-infra-monitoring"
SLACK_ICON="https://s3.amazonaws.com/kudelabs-archives/harddrive256.png"
@ZeroDeth
ZeroDeth / Makefile
Created June 27, 2020 12:21 — forked from jonschlinkert/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@ZeroDeth
ZeroDeth / admin-user-service-account.yaml
Last active June 27, 2020 17:53
Create an admin-user service account and cluster role binding
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: admin-user
@ZeroDeth
ZeroDeth / 00-defaults.tf
Created February 21, 2020 11:08 — forked from QuingKhaos/00-defaults.tf
Terraform initialization of AWS organizational root account, prepared for multiple accounts
variable "aws_default_region" {
default = "eu-west-1"
}
variable "administrator_default_arn" {
default = "arn:aws:iam::aws:policy/AdministratorAccess"
}
variable "developer_default_arn" {
default = "arn:aws:iam::aws:policy/PowerUserAccess"
@ZeroDeth
ZeroDeth / kube-cmds.sh.txt
Created October 1, 2019 10:38
Collection of kubernetes commands
tubectl @tst ++ -n splunk-connect logs splu%% -f
#!/bin/sh
# Useful script for setting up my mac
### Some useful links ###
# Mac Setup (https://sourabhbajaj.com/mac-setup)
# Install Python 3 (https://docs.python-guide.org/starting/install3/osx)
# Cloud Foundry tools (https://github.com/cloudfoundry/homebrew-tap)
# Other Useful CLI tools (https://stevenloria.com/python-clis)
# zsh Magic (https://rick.cogley.info/post/use-homebrew-zsh-instead-of-the-osx-default)
# https://medium.com/@caulfieldOwen/youre-missing-out-on-a-better-mac-terminal-experience-d73647abf6d7
@ZeroDeth
ZeroDeth / ChocolateyInstall.txt
Created September 30, 2019 10:59 — forked from TomGaylor/ChocolateyInstall.txt
Chocolatey and Boxstarter system build script
#Launch the following at a cmd prompt to install Chocolatey - https://chocolatey.org/
###Launch cmd prompt as admin and run the following to set the proxy (inside Intel) and install Chocolatey####
setx http_proxy http://proxy-chain.intel.com:911 /M
setx https_proxy http://proxy-chain.intel.com:911 /M
####Write-Host "Installing Chocolatey"######
@ZeroDeth
ZeroDeth / win10.Vagrantfile
Created September 30, 2019 10:58 — forked from RafahCSilva/win10.Vagrantfile
Vagrant of MS Windown 10 in Virtual Box
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@ZeroDeth
ZeroDeth / aws-app
Created September 30, 2019 10:53 — forked from andreyev/aws-app
scripts
#!/bin/bash
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-trusty.deb
dpkg -i puppetlabs-release-pc1-trusty.deb
apt-get update
apt-get -q -y install puppet-agent \
&& echo "[main]" > /etc/puppetlabs/puppet/puppet.conf \
&& echo "server=puppet.adtsys.com.br" >>/etc/puppetlabs/puppet/puppet.conf \
&& echo "environment=adtsys_createcloudinfra" >>/etc/puppetlabs/puppet/puppet.conf \
&& echo "certname=srv-app-aws.adtsys.com.br-$(date +%s)" >>/etc/puppetlabs/puppet/puppet.conf
@ZeroDeth
ZeroDeth / update_git_repos.sh
Last active September 24, 2019 11:01
update all Git repositories in your working directory.
#!/bin/bash
# Run the following from the parent directory
# https://stackoverflow.com/questions/3497123/run-git-pull-over-all-subdirectories
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;