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
| wget http://user:[email protected]/caminhodoarquivo |
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 content = [:]; | |
| content.expand = 'schema,names'; | |
| content.startAt = 0; | |
| content.maxResults = 500 | |
| content.total= 7 | |
| content.issues =[:]; | |
| content.issues = list | |
| def jsonContent = new groovy.json.JsonBuilder(content); | |
| println 'JSON : ' +jsonContent.toString() | |
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 a Dump | |
| mysqldump -u username -p database_to_backup > backup_name.sql | |
| #Restoring | |
| mysql -u username -p | |
| CREATE DATABASE database_name; | |
| exit |
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
| package br.com.arizona.visto.system.dam.repository.cmis; | |
| import org.apache.chemistry.opencmis.client.api.*; | |
| import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl; | |
| import org.apache.chemistry.opencmis.commons.SessionParameter; | |
| import org.apache.chemistry.opencmis.commons.data.PropertyData; | |
| import org.apache.chemistry.opencmis.commons.enums.BindingType; | |
| import java.util.*; |
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
| vim /etc/timezone | |
| #Altere para America/Sao_Paulo | |
| #Agora para atualizar utilizando a variável TZ faça: | |
| export TZ=America/Sao_Paulo | |
| #Vamos verificar com: | |
| #date |
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
| data_uri = open("/home/foto.png", "rb").read().encode("base64").replace("\n", "") | |
| # HTML Image Element | |
| img_tag = '<img alt="" src="data:image/png;base64,{0}">'.format(data_uri) | |
| print img_tag | |
| # CSS Background Image | |
| css = 'background-image: url(data:image/png;base64,{0});'.format(data_uri) | |
| print css |
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
| # pip install cmislib | |
| import os | |
| import urllib | |
| from cmislib import CmisClient | |
| def download_thumb_file(cmis_object_id, cmis_repo, cmis_url, cmis_user, cmis_passwd, download_base_folder): | |
| client = CmisClient(cmis_url, cmis_user, cmis_passwd) | |
| repo = client.getRepository(cmis_repo) | |
| cmis_object = repo.getObject(cmis_object_id) |
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
| #SYSTEM LOAD INDICATOR | |
| sudo add-apt-repository ppa:indicator-multiload/stable-daily | |
| sudo apt-get update | |
| sudo apt-get install indicator-multiload | |
| #Dentro do arquivo /home/felipe/.bashrc | |
| #variavel do terminal | |
| export PS1="\[\033[38m\]\u\[\033[32m\] \w \[\033[31m\]\`git \\ | |
| branch 2>/dev/null | grep \"^\*\" | \\ |
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
| ############################################################## | |
| #### Apagar versoes antigas de Kernel #### | |
| ############################################################## | |
| #ver versoes anteriores do linux instaladas | |
| dpkg --get-selections | grep linux-image | |
| #APAGAR(Sempre deixar duas) |
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
| <img src="data:image/*;base64, | |
| /9j/4AAQSkZJRgABAQAAAQABAAD//gA8Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcg | |
| SlBFRyB2NjIpLCBxdWFsaXR5ID0gMTAwCv/bAEMAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB | |
| AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/bAEMBAQEBAQEBAQEBAQEBAQEB | |
| AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIALIA | |
| sgMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQD | |
| BQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygp | |
| KjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJma | |
| oqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/ | |
| xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQID |