Skip to content

Instantly share code, notes, and snippets.

Avatar

Valter Silva valter-silva-au

View GitHub Profile
View cmder using git-bash on Windows
Follow this [tutorial](https://gist.github.com/nickautomatic/02ccb76292f7f8d9767e)
See the attached screenshots as examples.
View Bootstrap my MacOS workstation
Bootstrap MacOS
Install Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install Home-brew-cask:
brew tap caskroom/cask
Install brew packages:
brew install astyle
View keybase.md

Keybase proof

I hereby claim:

  • I am tech-vsilva on github.
  • I am valtersilva (https://keybase.io/valtersilva) on keybase.
  • I have a public key ASC9yQnfmQiClmKe9tLp-c0du33_Ry_VewO8s7JmDA4vjAo

To claim this, I am signing this object:

View update-jenkins.sh
#!/bin/bash
set -x
# Credits: https://stackoverflow.com/a/37939589
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
JENKINS_DIR="/usr/lib/jenkins"
CURRENT_JENKINS_VERSION=$(java -jar "${JENKINS_DIR}/jenkins.war" --version)
JENKINS_VERSION=$(curl -s http://updates.jenkins-ci.org/download/war/ | grep "href='/download/war" | awk '{ print $3 }' | head -n 1 | sed "s,href='/download/war/,," | sed "s,</a></td></tr>,," | tr "/" "\n" | head -n 1
@valter-silva-au
valter-silva-au / install-intellij.sh
Created Aug 28, 2017
How to install Intellij Community Edition with homebrew-cask
View install-intellij.sh
$ brew cask install caskroom/cask/intellij-idea-ce
@valter-silva-au
valter-silva-au / get-certificate.sh
Created Mar 24, 2017
Nginx with SSL as a Reverse Proxy for Jenkins
View get-certificate.sh
# create a local certificate for testing only
cd /etc/nginx
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/local-cert.key -out /etc/nginx/local-cert.crt
@valter-silva-au
valter-silva-au / install-chefdk-ubuntu
Created Mar 8, 2017
To ease chef-dk installation and setup on Ubuntu
View install-chefdk-ubuntu
#!/bin/bash
set -x
# PURPOSE: To ease CHEF DK installation
# REFERENCE: https://docs.chef.io/install_dk.html
WORKSPACE_DIR='/tmp/synced'
# https://downloads.chef.io/chefdk/#ubuntu
View gist:96aebc5c435165c935406c3d355fc490
clear && kitchen converge && clear && kitchen verify
-----> Starting Kitchen (v1.15.0)
-----> Converging <default-ubuntu-1404>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 5.6.3...
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
@valter-silva-au
valter-silva-au / 3-ssh.sh
Created Feb 13, 2017
Developer's SSH key setup
View 3-ssh.sh
#!/bin/bash
set -x
[ ! -d $HOME/.ssh/ ] && mkdir $HOME/.ssh/ || chmod 750 $HOME/.ssh/ && cd $HOME/.ssh/ && ssh-keygen -t rsa -b 4096 -f vasi -C "valterhenrique85@gmail.com" && ssh-keygen -t rsa -b 4096 -f work -C "valter.silva@work.com" && cd - \