Skip to content

Instantly share code, notes, and snippets.

@x3rAx
x3rAx / Generate_ssh_key-pair_for_Bamboo_(when_Bamboo_uses_a_stupid_Java_implementation_of_git).md
Last active April 23, 2024 02:14
Generate ssh key-pair for Bamboo (when Bamboo uses a stupid Java implementation of git)

The Problem

Bamboo (at least the instance I have to work with) is using a Java implementation of git (JGit) that has problems reading the new SSH key-file format.

In earlier versions, ssh-keygen generated private keys that looked like:

-----BEGIN RSA PRIVATE KEY-----
...

-----END RSA PRIVATE KEY-----

@x3rAx
x3rAx / certbot-remove-domain.md
Last active June 23, 2018 13:06
[letsencrypt] Certbot - Remove Domain

DISCLAIMER: This method worked for me. I am not responsible for any damage caused if you follow these instructions! Read the documentation, learn what the commands do and then decide when or if you want to use it.

To remove a domain from a letsencrypt certificate when renewing, use the following command:

# certbot renew --allow-subset-of-names --dry-run

Remove the --dry-run if you are certain that this command does what you want.

And don't forget to reload your nginx/webserver/whatever.

@x3rAx
x3rAx / pac
Last active March 30, 2018 23:04
pac - pacget wrapper for ez search
#!/bin/bash
# Download:
# $ dest="$HOME/.local/bin/pac" && curl -s https://gist.githubusercontent.com/x3rAx/07306fdc4e7ba2e4855ceca59ebc7f21/raw/pac >"$dest" && chmod +x "$dest"
#
# Usage:
# Search for package:
# $ pac <package-name>
# Use like pacget:
# $ pac -S <package-name>
@x3rAx
x3rAx / windows-wakeup-diagnose.md
Created March 18, 2018 13:58
Commands to find out what can wake up windows / what the last wakeup reason was.

Who can wake up

Find out which devices are armed to wake up your pc:

powercfg -devicequery wake_armed

(source)

@x3rAx
x3rAx / locale.conf
Last active March 18, 2018 00:57
My locale.conf for an english system with german units
LANG=en_US.utf8
#LANGUAGE=
LC_ADDRESS="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_CTYPE="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_MESSAGES="en_US.utf8"
LC_MONETARY="de_DE.utf8"
@x3rAx
x3rAx / install-pacaur.sh
Last active March 24, 2018 15:48
Simple install script for pacaur
#!/bin/bash
################################################################################
# If you are new to arch, I strongly recommend you to read the arch wiki page
# about AUR (https://wiki.archlinux.org/index.php/Arch_User_Repository) and to
# read and understand what this script does before blindly running it.
#
# This scripts purpose is in first line to save me some minutes when I want to
# install pacaur on a new system.
#

Git Tree Alias

Register alias

$ git config --global alias.tree \
    'log --date=iso --graph --pretty="format:%C(yellow)%<(7)%h%C(reset)%x09%ad%C(reset)  %C(blue)%<(15)%an%C(reset)  %C(bold yellow)%d%C(reset) %C(green)%s%C(reset)"' \
    && git config --global alias.tree-all \

'tree --exclude refs/stash --all'

@x3rAx
x3rAx / loadConfig.sh
Last active January 30, 2020 10:41
bash - loadConfig
loadConfig() {
local var_name="$1"
local config_file="$2"
declare -A config
local config=()
local line_num=0
while read -r line; do
#echo ">$line<"
let line_num++
@x3rAx
x3rAx / .bashrc
Created June 6, 2017 10:35
~/.bashcr.d
# Add this to the bottom of your ~/.bashrc.
#
# This will source all .sh files in the ~/.bashrc.d directory and subdirectories except files that start
# with a '#' (so you can "comment out" files you don't want to load).
for f in $(find ~/.bashrc.d -type f -name '*.sh' \! -name '#*'); do
. "$f"
done
@x3rAx
x3rAx / .gitignore
Created August 6, 2015 20:36
Gitignore with .gitkeep
# +----------------------------+
# | IDE files |
# +----------------------------+
/.idea
# +----------------------------+
# | Vagrant |
# +----------------------------+
/.vagrant