This file contains hidden or 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
| Atualização do Ubuntu | |
| Quando instalamos a versão do SO, é claro que esta não vem totalmente atualizada, por isso iremos dar uma arrumada na casa e deixar tudo preparado. | |
| # efetua o download de uma lista de pacotes atualizados | |
| sudo apt-get update | |
| # faz o upgrade da distribuição que tens (dapper). | |
| sudo apt-get upgrade | |
| # faz o upgrade para a distribuição imediatamente a seguir (edgy). | |
| sudo apt-get dist-upgrade | |
| # remove os pacotes não mais usados. |
This file contains hidden or 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
| RUBY_VERSION="2.4.0" | |
| RAILS_VERSION="5.0.2" | |
| MYSQL_PASSWORD="@dmin$t1#" | |
| GIT_USER_NAME="" | |
| GIT_USER_EMAIL="" | |
| NODE_VERSION="6" | |
| echo |
This file contains hidden or 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
| ESTADOS_BRASILEIROS = [["Acre", "AC"], | |
| ["Alagoas", "AL"], | |
| ["Amapá", "AP"], | |
| ["Amazonas", "AM"], | |
| ["Bahia", "BA"], | |
| ["Ceará", "CE"], | |
| ["Distrito Federal", "DF"], | |
| ["Espírito Santo", "ES"], | |
| ["Goiás", "GO"], | |
| ["Maranhão", "MA"], |
This file contains hidden or 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
| CREATE OR REPLACE VIEW public.v_pessoas2 AS | |
| SELECT tb_situacao.situacaodesc::text AS tipo, | |
| 1 AS tipo_id, | |
| tb_pessoas.pessexo, | |
| 'OPP'::character varying AS grau_parentesco, | |
| tb_pessoas.pescodigo, | |
| ltrim(tb_pessoas.pesncompleto::text, ' '::text) AS ncompleto, | |
| tb_pessoas.pesnguerra, | |
| tb_pessoas.pesfoto, | |
| tb_pessoas.pespostograd, |
This file contains hidden or 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
| CREATE OR REPLACE VIEW public.v_pessoas_movimentacoes AS | |
| SELECT v_pessoas1.id, | |
| v_pessoas1.ncompleto, | |
| v_pessoas1.tipo, | |
| v_pessoas1.tipo_id, | |
| v_pessoas1.pgabrev, | |
| v_pessoas1.grau_parentesco, | |
| v_pessoas1.resp_ncompleto, | |
| v_pessoas1.pesnguerra, | |
| v_pessoas1.peslocaltrabalho, |
This file contains hidden or 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
| $.rails.allowAction = function(element) { | |
| var message = element.attr('data-confirm'); | |
| if (!message) { return true; } | |
| var opts = { | |
| title: "Confirmação", | |
| message: message, | |
| buttons: { | |
| confirm: { | |
| label: 'Sim', |
This file contains hidden or 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
| $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv | |
| $ echo 'eval "$(rbenv init -)"' >> ~/.zshenv | |
| $ echo 'source $HOME/.zshenv' >> ~/.zshrc | |
| $ exec $SHELL |
This file contains hidden or 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
| apt install python-pygraphviz | |
| pip install django-extensions | |
| # lembrar de adicionar django_extensions ao installed_apps | |
| python manage.py graph_models trees -o test.png |
This file contains hidden or 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
| def welcome | |
| puts "Bem-vindo ao jogo da adivinhação." | |
| puts "\n\n" | |
| puts "Qual é o seu nome?" | |
| name = gets | |
| puts "\n\n" | |
| puts "Começaremos o jogo para você, #{name}" | |
| end |
This file contains hidden or 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
| def sort | |
| puts "\n\n" | |
| puts "Escolhendo um número secreto entre 0 e 200..." | |
| number_secret = Random.rand(0..200) | |
| puts "Escolhido.. Que tal adivinhar hoje nosso número secreto.?" | |
| number_secret | |
| end |
OlderNewer