Skip to content

Instantly share code, notes, and snippets.

View tiagotele's full-sized avatar

Tiago tiagotele

  • Aquiraz, Ceará - Brazil
View GitHub Profile
#!/bin/bash
HADOOP_VERSION='3.3.1'
HADOOP_URL=https://dlcdn.apache.org/hadoop/common/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz
echo "Downloading Hadoop jars..."
wget $HADOOP_URL -P /tmp
echo "Done!"
# Unpack Hadoop
#!/bin/bash
SPARK_VERSION='spark-3.1.2'
SPARK_URL=https://archive.apache.org/dist/spark/$SPARK_VERSION/$SPARK_VERSION-bin-without-hadoop.tgz
echo "Downloading pre-built PySpark..."
wget $SPARK_URL -P /tmp
echo "Done!"
# Unpack PySpark
alias k=kubectl
export do="--dry-run=client -o yaml"
export f="--grace-period=0 --force"
# if you need a curl
k run curl --image=busybox:1.28 -- sleep 4800
import re
regex_original = r"^[a-zA-Z0-9]+ ([a-zA-Z0-9]+ *)+$"
regex_latin = r"^[a-zA-ZÀ-ÿ0-9]+ ([a-zA-ZÀ-ÿ0-9]+ *)+$"
names = [ "Nome Sobrenome",
"José Luiz",
"Maria Conceição",
"007 agente",
"Pedro Primeiro",
@tiagotele
tiagotele / set_java_version.sh
Created December 14, 2020 13:50
Get and set java versions
sudo update-alternatives --config java
#There are 2 choices for the alternative java (providing /usr/bin/java).
# Selection Path Priority Status
#------------------------------------------------------------
#* 0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
# 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
# 2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
@tiagotele
tiagotele / update-fork.sh
Created September 25, 2020 11:59
Update fork repository with origin one.
git fetch upstream
git checkout master
#git rebase upstream/master
git merge upstream/master
@tiagotele
tiagotele / install-nerd-tree-cent-os.sh
Created April 3, 2020 14:36
Install NERDTree on CentOS
sudo yum install git
git clone https://github.com/preservim/nerdtree.git ~/.vim/pack/vendor/start/nerdtree
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/nerdtree/doc" -c q
mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
git clone https://github.com/preservim/nerdtree.git ~/.vim/pack/vendor/start/nerdtree
vim
@tiagotele
tiagotele / install-apt-vim.sh
Last active April 2, 2020 04:58
Installing apt-vim and nerdtree on Ubuntu distros
# install apt-vim
curl -sL https://raw.githubusercontent.com/egalpin/apt-vim/master/install.sh | sh
# add it to current path
source ~/.bashrc || source ~/.bash_profile' or 'source ~/.zshrc
#install apt-vim
apt-vim install -y https://github.com/preservim/nerdtree.git
After insert cd guest
- Double click on folder created on desktop
- Go to /media/<USER>/VBox_GAs_<VERSION>
- Run autorun.sh
Restart machine(not sure if it is needed)
Follow this steps: https://gist.github.com/estorgio/1d679f962e8209f8a9232f7593683265
curl -s "http://api.icndb.com/jokes/random" | jq '.value.joke'