Skip to content

Instantly share code, notes, and snippets.

@atomlab
atomlab / jenkins_scripting_git_plugin_eviroments.md
Created January 7, 2020 12:38
Get an environment variables of git plugin in scripting pipeline

Jenkinsfile

node {
  dir ("checkout") {
    scmVars = checkout(scm)
    echo "${scmVars}"
    echo "scmVars.GIT_URL_1: ${scmVars.GIT_URL_1}"
    echo "scmVars.GIT_URL_2: ${scmVars.GIT_URL_2}"
  }
}
@atomlab
atomlab / wigeguard_setup.md
Last active March 12, 2022 22:03
Wireguard setup on Ubuntu 18.04

Wireguard setup on Ubuntu 16.04/18.04

Install

# sudo add-apt-repository ppa:wireguard/wireguard
# sudo apt-get update
# sudo apt-get install wireguard

Generate keys

@atomlab
atomlab / tmux.conf
Last active September 25, 2018 10:26
tmux.conf
# tmux 2.6
# Requirement for plugins:
# apt install powerline
# List of plugins
set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
@atomlab
atomlab / bash.generate.random.alphanumeric.string.sh
Created October 20, 2015 13:37 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@atomlab
atomlab / genpassword
Created October 20, 2015 10:01 — forked from romaonthego/genpassword
Bash script: genpassword
#!/bin/bash
charspool=('a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p'
'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' '0' '1' '2' '3' '4' '5' '6' '7'
'8' '9' '0' 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O'
'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z' '-' '_');
len=${#charspool[*]}
if [ $# -lt 1 ]; then
@atomlab
atomlab / Dockerfile
Last active August 29, 2015 14:26 — forked from konklone/Dockerfile
Dockerfile for installing Ruby 2.0 and RVM
FROM ubuntu
MAINTAINER Eric Mill "[email protected]"
# turn on universe packages
RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list
RUN apt-get update
# basics
RUN apt-get install -y nginx openssh-server git-core openssh-client curl
RUN apt-get install -y nano