Skip to content

Instantly share code, notes, and snippets.

View BlackCounter's full-sized avatar
💭
I may be fast to respond.

Saeed Bahmanabadi BlackCounter

💭
I may be fast to respond.
View GitHub Profile
@BlackCounter
BlackCounter / golang_offline.md
Created January 16, 2023 14:45 — forked from gmolveau/golang_offline.md
golang mod offline dependencies download

golang offline module dependencies download

Using go mod vendor

0 - With an existing module

  • copy go.mod and go.sum files from the offline PC to the internet PC

0bis - New module

@BlackCounter
BlackCounter / setup rancher and rke cluster.md
Created October 4, 2022 13:47 — forked from gopalsareen/setup rancher and rke cluster.md
Quickstart to setup 3 nodes RKE cluster

Quickstart to setup 3 nodes RKE cluster

Downand and Setup RKE on Local environment

VERSION=v1.1.4 && \
curl -LO https://github.com/rancher/rke/releases/download/$VERSION/rke_linux-amd64 && \
chmod +x ./rke_linux-amd64 && \
sudo mv ./rke_linux-amd64 /usr/local/bin/rke
@BlackCounter
BlackCounter / devops_best_practices.md
Created September 20, 2022 08:10 — forked from jpswade/devops_best_practices.md
Devops Best Practices Checklist

Find the original here article here: Devops Best Practices

DevOps started out as "Agile Systems Administration". In 2008, at the Agile Conference in Toronto, Andrew Shafer posted an offer to moderate an ad hoc "Birds of a Feather" meeting to discuss the topic of "Agile Infrastructure". Only one person showed up to discuss the topic: Patrick Debois. Their discussions and sharing of ideas with others advanced the concept of "agile systems administration". In that same year, Debois and Shafer formed an Agile Systems Administrator group on Google, with limited success. Patrick Debois did a presentation called "Infrastructure and Operations" addressing issues around involving more of the comp

@BlackCounter
BlackCounter / a_readme.md
Created May 11, 2022 09:53 — forked from KevM/a_readme.md
Example rake file for applying schema scripts and running sql

Dovetail Automation

Running the rake script below will

  1. Apply all schema scripts ending in .schemascript.xml found in the child schema directory.
  2. Execute all .sql scripts found in the child database directory.

Setup

  1. Edit the rakefile.rb to have your correct database configuration.
@BlackCounter
BlackCounter / Dockerfile
Created May 7, 2022 06:57 — forked from radekg/Dockerfile
YugabyteDB build toolchain for PostgreSQL extensions
#
# YugabyteDB build steps from:
# https://docs.yugabyte.com/latest/contribute/core-database/build-from-src-centos/
#
FROM centos:7.9.2009
ARG GCC_VERSION=7.3.0
ARG YB_VERSION=2.7.1.1
ARG MAKE_GCC_PARALLELISM=16
@BlackCounter
BlackCounter / docker-compose.yml
Created April 20, 2022 09:58 — forked from qzm/docker-compose.yml
Atlassian docker-compose (JIRA,Confluence,Bitbucket) with nginx and letsencrypt
version: '2'
services:
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.docker/config.json:/config.json
command: nginx-proxy nginx-proxy-le
@BlackCounter
BlackCounter / backup-restore-mysqldump-cli.sh
Created February 20, 2022 06:48
How to Back Up and Restore a MySQL Database
#Back up From the Command Line (using mysqldump)
#If you have shell or telnet access to your web server, you can backup your MySQL data by using the mysqldump command.
#This command connects to the MySQL server and creates an SQL dump file.
#The dump file contains the SQL statements necessary to re-create the database. Here is the proper syntax:
mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]
#For example, to backup a database named 'Tutorials' with the username 'root' and with no password to a file tut_backup.sql,
#you should accomplish this command
mysqldump -u root -p Tutorials > tut_backup.sql
@BlackCounter
BlackCounter / backup-mariadb.sh
Created February 20, 2022 06:42
backup mariadb
#!/usr/bin/env bash
mariabackup --stream=xbstream --backup --user root|pigz >mariadb-backup.gz
@BlackCounter
BlackCounter / restore-mariadb.sh
Created February 20, 2022 06:35
restore mariadb
#!/usr/bin/env bash -x
# OSX: execute as user
# Linux: execute as root
MY_DIR=$(cd $(dirname ${BASH_SOURCE[0]});pwd)
cd $MY_DIR
MARIABACKUP=$(which mariabackup)