Skip to content

Instantly share code, notes, and snippets.

View gangsta's full-sized avatar
😎

Karen Harutyunyan gangsta

😎
View GitHub Profile
@gangsta
gangsta / gogs.md
Created November 15, 2017 17:12
How To Install Gogs

How To Install Gogs

First of all ,be sure that you have created user “gogs” .

sudo su - #installing gogs useradd gogs passwd gogs

After that we need to prepare database section to have local database for gogs . In our case its PostgreSql.

@gangsta
gangsta / Install Vagrant Libvirt Fedora 27.md
Last active January 27, 2019 09:11
How to install Libvirt Vagrant on Fedora 27

How to Install Vagrant and Livbirt Fedora 27

Check for cpu Virtualization

lsmod | grep kvm
kvm_intel             167936  3
kvm                   499712  1 kvm_intel

Install

@gangsta
gangsta / Install Vagrant Virtualbox Fedora 27.md
Last active April 10, 2019 15:23
Install Vagrant and Virtualbox on Fedora 27

How to Install Vagrant and Virtualbox Fedora 27

Check for cpu Virtualization

lsmod | grep kvm
kvm_intel             167936  3
kvm                   499712  1 kvm_intel

Install

@gangsta
gangsta / Puppetagent.md
Last active December 20, 2017 16:47
Puppet agent centos 7

Install Puppet agent 4 Centos 7

yum install -y https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
yum -y install puppet-agent
/opt/puppetlabs/bin/puppet config set server foreman.domain.com --section agent
/opt/puppetlabs/bin/puppet agent -t
/opt/puppetlabs/bin/puppet resource service puppet ensure=running enable=true
@gangsta
gangsta / Prometheus node_exporter Metrics Data Size and Time Count
Last active April 10, 2019 15:21
Bash Script to Fetching Node_Exporter Data Size and Time for Consuming Metrics
#!/usr/bin/env bash
set -e
bytesToHuman() {
b=${1:-0}; d=''; s=0; S=(Bytes {K,M,G,T,E,P,Y,Z}iB)
while ((b > 1024)); do
d="$(printf ".%02d" $((b % 1024 * 100 / 1024)))"
b=$((b / 1024))
let s++
done
@gangsta
gangsta / openvpn_fedora30.md
Last active April 26, 2022 07:54
Fedora 30 Connect to OpenVPN

Install Openvpn

sudo dnf install openvpn

Configure Path

mv myopenvpconfig /etc/openvpn/client/
@gangsta
gangsta / remove-vagrant.md
Last active January 16, 2020 10:13
How to Remove Vagrant domain from Fedora 30,31

If you removed Vagrantfile but not Vagrant host. you'll get following error:

Name 'vagrantbox_default' of domain about to create is already taken. Please try to run 'vagrant up' command again.

For Fedora users, or force undefine you need following.

To install virsh.

@gangsta
gangsta / fedora31.md
Created February 6, 2020 08:55
How to disable fedora 31 problem reporter

How to Disable Fedora 31 problem reporter

/sbin/service abrtd stop
chkconfig abrtd off
@gangsta
gangsta / argo-helm.md
Created January 11, 2021 10:52
Kubernetes argo tunnel setup via helm charts

Error

Error: validation failed: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"

Temporary Solution

Kubernetes 1.16+

git clone https://github.com/cloudflare/helm-charts.git
cd helm-charts/charts/
@gangsta
gangsta / linux_commands.md
Last active March 23, 2023 14:54
Daily Linux Commands Cheat Sheet

Delete Github branches except main or master

git branch | grep -v "main" | xargs git branch -D

Useful Commands list

CPU