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
<scripting:component doc:name="Groovy"> | |
<scripting:script engine="Groovy"><![CDATA[ | |
def list = []; | |
def issue = [:]; | |
for(i = 0 ; i < payload.size(); i++){ | |
issue.id = 'arizona.jobdone.processo.' + payload[i].JOB_ID + '-' + payload[i].PROCESS_ID; | |
issue.key = 'arizona.jobdone.processo.' + payload[i].JOB_ID + '-' + payload[i].PROCESS_ID; | |
issue.fields = [:]; | |
issue.fields.summary = payload[i].JOB_ID + '|' + payload[i].PROCESS_ID + '| Desd.3 |' + payload[i].CLIENTE + '|' + payload[i].AGENCIA + '| capas | PRINT |' + payload[i].PROCESS_NAME | |
issue.fields.project = [:]; |
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
wget http://user:senha@webdav.arizona.com.br/caminhodoarquivo |
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
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 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 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 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 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 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 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 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) |