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
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
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
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
#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
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
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
<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
<flow name="get:/user/{username}:api-config"> | |
<set-session-variable variableName="username" value="#[flowVars['username']]" doc:name="Session Variable"/> | |
<set-payload value="#[payload]" doc:name="payload"/> | |
<scripting:component doc:name="Groovy"> | |
<scripting:script engine="Groovy"><![CDATA[ | |
def root = [:]; | |
root.user = sessionVars['username'] | |
def jsonContent = new groovy.json.JsonBuilder(root); | |
return jsonContent.toPrettyString(); | |
]]></scripting:script> |
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
#Squirrel | |
jdbc:jtds:sqlserver://192.168.0.112:1433;databaseName=BASE_DEV | |
#MULE | |
jdbc:jtds:sqlserver://192.168.0.7:1433;databaseName=BASE_DEV;user=user;password=pass | |