This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 The go-github AUTHORS. All rights reserved. | |
// | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// The basicauth command demonstrates using the github.BasicAuthTransport, | |
// including handling two-factor authentication. This won't currently work for | |
// accounts that use SMS to receive one-time passwords. | |
package main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################################## | |
# Sample to assign output from command(ls) to a variable(files) and iterate over every file | |
# and print its name. | |
############################################################################################## | |
files=$(ls) | |
echo "Printing files" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s "http://api.icndb.com/jokes/random" | jq '.value.joke' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch upstream | |
git checkout master | |
#git rebase upstream/master | |
git merge upstream/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer