Skip to content

Instantly share code, notes, and snippets.

View evenme's full-sized avatar

Kessia Barboza evenme

View GitHub Profile
@evenme
evenme / .zshrc
Last active April 27, 2021 17:39
export DOTFILES="$HOME/dotfiles"
export ZSH="$DOTFILES/zsh"
export PATH="/usr/local/opt/helm@2/bin:$HOME/.rvm/bin:/usr/local/bin:/usr/local/sbin:$PATH"
export EDITOR="/usr/local/bin/mvim -v"
export PAGER='less'
export LESS='-giR'
export READNULLCMD='bat'
export MANPAGER="sh -c 'col -bpx | bat -l man -p'"
export BAT_PAGER="less $LESS"
"Setting Python Path (If you are not using ArchLinux you may don't need this)
let $PYTHONPATH='/usr/lib/python3.6/site-packages'
set nocompatible
" For vundle
filetype off
set rtp+=~/vim/bundle/Vundle.vim
call vundle#begin('~/vim/plugins')
"Snippets
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-style fg=colour136,bg=colour235 #yellow and base02
# set window split
bind-key v split-window -h
bind-key b split-window
# set ctrl + arrows navegate words
set-window-option -g xterm-keys on
@evenme
evenme / cve-2016-0800_drown.yml
Created March 3, 2016 22:45
Apply openssl updates, reboot and wait for the server come back online [RHEL]
- hosts: all
gather_facts: true
become: true
serial: 1
vars:
vulnerable_releases:
'5': '0.9.8e-37.el5_11'
'6': '1.0.1e-42.el6_7.2'
'7': '1.0.1e-51.el7_2.2'
port: 80
@evenme
evenme / gitlab_upgrade.sh
Created January 28, 2016 21:57
Gitlab update steps using docker
# Remove old container and image
docker stop <CONTAINER>
docker rm <CONTAINER>
docker rmi $(docker images | grep gitlab | awk {'print $3'})
# Download and run the new image (latest)
docker run -t \
--publish 443:443 \
--publish 80:80 \
--publish 22:22 \
@evenme
evenme / vagrant_kernel_update.sh
Last active January 28, 2016 21:51
Installing guest additions on vagrant machine with kernel update
# Spin up vagrant machine
vagrant up
# Go inside vagrant virtual machine
vagrant ssh
# Install necessary packages for VirtualBox Guest Additions
sudo yum install -y kernel-devel kernel gcc binutils make perl bzip2
exit
@evenme
evenme / cleanup_vagrant_template.sh
Last active March 8, 2016 17:18
Perform cleanup of Linux template creation for vagrant
# Stop logging services.
systemctl stop rsyslog
systemctl stop auditd
# Remove old kernels
yum install yum-utils -y
package-cleanup --oldkernels --count=1 -y
# Clean out yum
yum clean all
@evenme
evenme / programmatically_variables.yml
Last active January 15, 2016 17:49
Ansible - creating and using variables names from other variables
---
hosts: all
vars:
env: "myvar"
env_path: "/data/my/path/to/file/"
tasks:
- set_fact: "{{ env + '_path' }}={{ env_path }}"
- debug: msg="{{ vars[env + '_path'] }}"