gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop 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
# Instalar um servidor local de mDNS | |
sudo apt update | |
sudo apt install avahi-daemon | |
sudo nano /etc/avahi/avahi-daemon.conf | |
# Ajustar o nome para o host-name desejado, ex: | |
host-name=openstackdev | |
sudo service avahi-daemon restart | |
sudo systemctl enable avahi-daemon.service | |
# Criar um usuário para o devstack | |
sudo useradd -s /bin/bash -d /opt/stack -m stack |
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
cd /usr/lib | |
sudo ln ./libcrypt.so libcrypt.so.1 | |
# docker-compose -v | |
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
public class CPFAttribute : ValidationAttribute | |
{ | |
protected override ValidationResult IsValid(object value, ValidationContext validationContext) | |
{ | |
if (string.IsNullOrEmpty(value)) return new ValidationResult("CPF é obrigatório"); | |
var cpf = value.ToString().Replace('.', '').Replace('-', ''); | |
return IsCpf(cpf) | |
? ValidationResult.Success | |
: new ValidationResult("CPF inválido!"); |
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
# access machinectl as gdm and change the timeout | |
sudo machinectl shell gdm@ /bin/bash | |
export GSETTINGS_BACKEND=dconf | |
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0 | |
# restart gdm | |
systemctl restart gdm |
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 | |
# Reset KDE plasma to defaults | |
rm ~/.config/plasma-org.kde.plasma.desktop-appletsrc | |
rm ~/.config/plasmarc | |
rm ~/.config/plasmashellrc | |
rm ~/.config/kdeglobals | |
rm ~/.config/kwinrc |
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
# a partir do terminal WSL do Ubuntu | |
sudo apt update | |
sudo apt ugrade | |
cd ~ | |
# certifique de possuir o VS Code instalado no Windows | |
code . | |
sudo curl -fsSL https://starship.rs/install.sh | bash | |
nano ~/.bashrc | |
# após editar o .bashrc execute `source ~/.profile` |
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 apt-get update #atualiza o cache do gerênciador de pacotes padrão do sistema | |
sudo apt-get install snapd #instala o gerênciador snap caso não tenha, via gerênciador de pacotes padrão | |
sudo apt-get install build-essential # instala ferramentas úteis para compilação gcc, make | |
sudo apt-get install zram-config # usa a memória ao invés do disco para swap evitando escritas desnecessárias | |
sudo apt-get install git # instala o git para uso no vscode e terminal | |
sudo apt-get install wget # instala o wget para baixar scripts e outras coisas via linha de comando | |
sudo apt-get install curl # instala o curl para baixar scripts e outras coisas via linha de comando | |
sudo apt-get install fonts-firacode # instalando fonts fira-code para habilitar ligaturas no terminal e vscode manualmente (https://github.com/tonsky/FiraCode) | |
sudo snap install snap-store # instala a store de snaps | |
sudo snap install code --classic # instala o vscode |
Requisitos: virtualbox + extension pack e o vagrant com versões compatíveis
Obs: arquivos sh, vagrantfile logo após este markdown
Acessar o terminal ou cmd e adicionar a box desejada a se trabalhar, optei por utilizar a ubuntu/trusty32. Outras podem ser obtidas em https://atlas.hashicorp.com/boxes/search Caso já possua uma box pode pular para o próximo passo.
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
//reference http://stackoverflow.com/questions/15644655/fill-pdf-template-acrofield-with-html-formatted-text-using-itextsharp | |
void AddHTMLToContent(String htmlText,PdfContentByte contentBtye,IList<AcroFields.FieldPosition> pos) | |
{ | |
Paragraph par = new Paragraph(); | |
ColumnText c1 = new ColumnText(contentBtye); | |
try | |
{ | |
List<IElement> elements = HTMLWorker.ParseToList(new StringReader(htmlText),null); |
NewerOlder