Skip to content

Instantly share code, notes, and snippets.

@vchavkov82
vchavkov82 / gist:a4127e4b18876cbd9a9841efe59311a2
Created January 8, 2021 16:17 — forked from mre/gist:64672c481f8f1232d468e3e7169f4f77
Make a change in a composer vendor folder and push to branch
# Go into the directory of the vendor package that you changed
cd vendor/<owner>/<package>
# Create a new git repository (composer does not check out the full git repo by default. Only a sparse copy)
git init
# Create a new branch for your local changes
git checkout -b branchname
# Commit changes
#!/bin/bash
export VAULT_ADDR="http://`juju run --unit vault/0 unit-get private-address`:8200"
VAULT_INIT="$(vault operator init -key-shares=3 -key-threshold=3)"
for KEY in $(echo $VAULT_INIT | grep "Unseal Key " | cut -d' ' -f4); do
vault operator unseal $KEY
done
@vchavkov82
vchavkov82 / rem_proxmox_popup.sh
Created March 6, 2021 17:31 — forked from tavinus/rem_proxmox_popup.sh
Remove PROXMOX 5.x / 6.x subscription message popup
#!/bin/sh
#######################################################
#
# Edits the proxmox Subscription file to make it
# think that it has a Subscription.
#
# Will disable the annoying login message about
# missing subscription.
#
@vchavkov82
vchavkov82 / nixos-zfs-root.sh
Created March 6, 2021 17:47 — forked from revence27/nixos-zfs-root.sh
Installing NixOS as ZFS raidz1 root on a DL360 G5
# Add the zfs filesystem to the install environment:
nano /etc/nixos/configuration.nix
## ---8<-------------------------8<---
boot.supportedFilesystems = ["zfs"];
## ---8<-------------------------8<---
nixos-rebuild switch
# Load the just installed ZFS kernel module
@vchavkov82
vchavkov82 / gist:1870656005ec6de3ccb537dd810f2390
Created May 8, 2021 12:36 — forked from sidnei/gist:7041338
Using lvm thin provisioning
# Using lvm thin provisioning, per https://github.com/lxc/lxc/pull/67
# First we create a volume group to hold the thin pool
$ sudo vgcreate lxc /dev/sde3
# Then create a thin-pool named 'tp' within that volume group
$ sudo lvcreate -l 90%VG --type thin-pool --thinpool tp lxc
@vchavkov82
vchavkov82 / update-ca-certificates.md
Created October 8, 2021 06:11 — forked from epcim/update-ca-certificates.md
trusted certificates system update-ca-certificates

Adding trusted root certificates to the server

Mac OS X

sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/new-root-certificate.crt
sudo security delete-certificate -c "<name of existing certificate>"

Windows

certutil -addstore -f "ROOT" new-root-certificate.crt

@vchavkov82
vchavkov82 / docker-compose-hackintosh.md
Created January 22, 2022 18:34 — forked from slykar/docker-compose-hackintosh.md
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
1. Setup a project
2. Add groovy SDK support:
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl
- this will give you the .gdsl file - download this to the src folder of your project.
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root
@vchavkov82
vchavkov82 / byobuCommands
Created May 15, 2022 18:29 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@vchavkov82
vchavkov82 / reset-trial-navicat.sh
Created May 5, 2023 07:42 — forked from nakamuraos/reset-trial-navicat.sh
Reset trial Navicat 15, Navicat 16 on Linux
#!/bin/bash
# Author: NakamuraOS
# https://github.com/nakamuraos
# Latest update: 30/03/2022
# Tested on Navicat 15.x, 16.x on Linux
RED="\e[1;31m"
ENDCOLOR="\e[0m"