Skip to content

Instantly share code, notes, and snippets.

View richardsonlima's full-sized avatar
:octocat:
Focusing

Richardson Lima richardsonlima

:octocat:
Focusing
View GitHub Profile
@richardsonlima
richardsonlima / set-gopath.sh
Last active August 22, 2018 18:39
Setting Go path
mkdir -p ~/go/src
export PATH="$PATH:$HOME/go/bin"
export GOPATH=$HOME/go-dev
git log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
{
"timestamp": 1461277820031,
"webhookEvent": "jira:issue_updated",
"user": {
"self": "http://jira.server.my/rest/api/2/user?username=paul",
"name": "paul",
"key": "paul",
"emailAddress": "[email protected]",
"avatarUrls": {
"48x48": "http://www.gravatar.com/avatar/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?d=mm&s=48",
node("${params.BUILD_AGENT}") {
stage('Dangling Containers') {
sh 'docker ps -q -f status=exited | xargs --no-run-if-empty docker rm'
}
stage('Dangling Images') {
sh 'docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi'
}
@richardsonlima
richardsonlima / k8s-auth-creator.sh
Last active August 8, 2018 22:30
k8s-auth-creator - ./create-user.sh <api_server> <username> <namespace>
#!/bin/bash
# set -x
KUBE_APISERVER=$1
USER=$2
NS=$3
USAGE="USAGE: create-user.sh <api_server> <username> <namespace>\n
Example: https://172.22.1.1:6443"
CSR=`pwd`/user-csr.json
SSL_PATH="/etc/kubernetes/ssl"
# Portions Copyright 2016 The Kubernetes Authors All rights reserved.
# Portions Copyright 2018 AspenMesh
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@richardsonlima
richardsonlima / Dockerfile.minikube
Created August 7, 2018 02:02 — forked from andrewjjenkins/Dockerfile.minikube
Istio-Minikube and Jenkins
# Portions Copyright 2016 The Kubernetes Authors All rights reserved.
# Portions Copyright 2018 AspenMesh
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@richardsonlima
richardsonlima / Installing Arch Linux
Created July 30, 2018 17:50 — forked from SalahAdDin/Installing Arch Linux
Custom arch linux installation
sudo pacman -Syyu
sudo pacman -S qt5-tools gnome-clocks vlc atom inkscape krita 0ad gedit-plugins gparted linux-headers 0ad-data nodejs npm opera nginx postgresql postgresql-docs postgresql-libs plank plank-theme-numix php-fpm phppgadmin pgadmin4 jre8-openjdk-headless jre8-openjdk jdk8-openjdk openjdk8-doc openjdk8-src mono clang dos2unix simplescreenrecorder guake shutter tlp elasticsearch sshfs dconf-editor variety screenfetch numix-themes ttf-opificio ttf-aboriginal-sans gtk-theme-arc xenlism-minimalism-theme xenlism-wildfire
sudo pacman -S icedtea-web wxpython openmp atom ttf-freefont firefox-i18n-es-mx firefox-i18n-es-ar firefox-i18n-tr lua-socket uniconvertor acpi_call tp_smapi tk sane
sudo pacman -S zsh opera-ffmpeg-codecs python-pip python-virtualenv peek curl gdk-pixbuf2 poppler-qt5 yarn virtualbox virtualbox-host-modules-arch
sudo pacman -S libreoffice-extension-writer2latex libreoffice-extension-texmaths libreoffice-fresh-ar libreoffice-fresh-eu libreoffice-fresh-tr
sudo pacman -S gitkraken docke
terraform init
export TF_LOG=1
export SSH_FP=$(ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub | awk '{print $2}'| cut -c5-)
export DO_PAT={YOUR_PERSONAL_ACCESS_TOKEN}
terraform plan \
-var "do_token=${DO_PAT}" \
-var "pub_key=$HOME/.ssh/id_rsa.pub" \
-var "pvt_key=$HOME/.ssh/id_rsa" \