- certifique-se que o PATH contem o diretório ~/opt/bin:
export PATH="$HOME/opt/bin:$PATH:"
- atualizar o sistema:
sudo apt update --yes && sudo apt upgrade --yes && sudo apt autoremove --yes
- instalar a ultima versao do PHP (7.2 agora):
export PATH="$HOME/opt/bin:$PATH:"
sudo apt update --yes && sudo apt upgrade --yes && sudo apt autoremove --yes
| define("ID_UNIDADE", "999"); //id da unidade onde o processo está | |
| define("ID_SERIE", "50070"); //Tipo do documento que irá ser incluído, deve ser um tipo externo | |
| define("SISTEMA, "meuSistemaNoSei'");//Nome do Sistema no menu Adminsitração/ Sistema | |
| define("SERVICO", "servicoDoMeuSistema"); //Nome do Serviço dentro do Sistema | |
| function inclui_evidencia_sei($cpf,$nome,$protocolo,$nome_arquivo,$arquivo){ | |
| $DocumentoRecebido = array(); | |
| $DocumentoRecebido['Tipo'] = 'R'; | |
| $DocumentoRecebido['Destinatarios'] = null; | |
| $DocumentoRecebido['Interessados'] = array(array('Sigla' => $cpf, 'Nome' => $nome)); | |
| $DocumentoRecebido['Data'] = "" . date("d/m/Y"); |
| @startuml | |
| actor Foo1 | |
| boundary Foo2 | |
| control Foo3 | |
| entity Foo4 | |
| database Foo5 | |
| Foo1 -> Foo2 : To boundary | |
| Foo1 -> Foo3 : To control | |
| Foo1 -> Foo4 : To entity | |
| Foo1 -> Foo5 : To database |
| // global scope | |
| (function(){ | |
| // outer scope | |
| var fibonacci = function(){ | |
| my_return = "0, "; | |
| current_number = 0; | |
| minus_one_order = 0; | |
| minus_two_order = 0; | |
| max_order=12; | |
| for(current_order = 1;current_order<=max_order;current_order+=1){ |
| abruno:/tmp$ cat notas.txt | |
| Fulano 8.3 7.6 9.5 6.4 | |
| Sicrano 5.6 8.9 7.4 7.5 | |
| Beltrano 5.6 7.8 9.4 5. 3 | |
| abruno:/tmp$ cat notas.py | |
| notas={} | |
| for linha in open('notas.txt'): | |
| linha_list = linha.strip().split(' ') | |
| notas[linha_list[0]]=linha_list[1:] | |
| print notas |
| def eval_expr(text): | |
| test_char = lambda c: c in '1234567890.,*/+-()' | |
| for char in text: | |
| if not test_char(char): | |
| raise Exception('Invalid Char in String') | |
| return long(eval(text,{},{})) |
| #http://hal.freedesktop.org/docs/udisks/Device.html | |
| def mount(device, fs): | |
| """ | |
| >>> mount('/dev/sdb1','ext3') | |
| /media/pendrive | |
| >>> mount('/dev/sdc2','ext2') | |
| '' | |
| """ | |
| res = '' |
| import dbus | |
| def changelabel(device, newlabel): | |
| """Change label of device. | |
| >>> changelabel('/dev/sdc1','Boot') | |
| True | |
| >>> changelabel('/dev/sxpto','Data') | |
| False | |
| """ | |
| res = False |
| import io | |
| import mmap | |
| from typing import Optional | |
| _DEFAULTBS=io.DEFAULT_BUFFER_SIZE | |
| def clone(input_file: Optional[str]='/dev/zero', output_file: Optional[str]='/dev/null', block_size: Optional[int]=_DEFAULTBS, count: Optional[int]=None, verbose: Optional[bool]=False): | |
| """Make a clone of one file or device. Emule the command dd, without type conversion | |
| >>> clone(output_file='/tmp/swap.img',bs=512,count=8*2*1024*1024*1024) |