Skip to content

Instantly share code, notes, and snippets.

View sujaypillai's full-sized avatar
🐳
Getting contained!!!

Sujay Pillai sujaypillai

🐳
Getting contained!!!
View GitHub Profile
BITS 32
org 0x05000000
db 0x7F, "ELF"
dd 1
dd 0
dd $$
dw 2
dw 3
dd 0x0500001B
package main
import (
"golang.org/x/net/context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/cli/command"
"github.com/docker/docker/client"
"fmt"
delete from ACT_HI_TASKINST where not exists (select pd.ID_ from ACT_RE_PROCDEF pd where pd.ID_ = PROC_DEF_ID_);
Failed to retrieve tasks assigned to authority {0} in state {1}.
....
Caused by: org.alfresco.service.cmr.workflow.WorkflowException: 04070413 Failed to retrieve tasks assigned to authority {0} in state {1}.
....
Caused by: org.activiti.engine.ActivitiException: no deployed process definition found with id 'RegConducereReg:1:14208'
curl -X POST -H "Content-Type: application/json" --user 'admin':'admin' -d '{"shortName":"test1","sitePreset":"site-dashboard","title":"TestSite","visibility":"PUBLIC"}' http://localhost:8080/alfresco/service/api/sites
@sujaypillai
sujaypillai / DB query to find models
Created January 20, 2016 22:43
Find any model file by performing DB queries on the alf_node, alf_qname, alf_node_properties, alf_content_data and alf_content_url tables
select alf_content_url.content_url
from alf_node
left join alf_qname on alf_node.type_qname_id = alf_qname.id
left join alf_node_properties on alf_node_properties.node_id = alf_node.id
join alf_content_data on alf_content_data.id = alf_node_properties.long_value
left join alf_content_url on alf_content_url.id = alf_content_data.content_url_id
where
alf_qname.local_name = 'dictionaryModel'
and alf_content_url.content_url is not null
@sujaypillai
sujaypillai / cleanAlfPropTables-MySQL.sql
Created January 13, 2016 13:56
SQL script for properly clearing Alfresco unused audit data / property values (NOT node properties, but the property tables used for AuditComponent and AttributeService functionality) for PostgreSQL / MySQL.NOTE: Only run when the Alfresco Repository is NOT running as values kept in in-memory caches will otherwise result in constraint violations.
set autocommit=0;
begin;
-- get all active references to alf_prop_root
create temporary table temp1 (id bigint(20), index (id));
insert into temp1 select disabled_paths_id as id from alf_audit_app;
insert into temp1 select audit_values_id as id from alf_audit_entry;
insert into temp1 select prop1_id as id from alf_prop_unique_ctx;
-- determine the obsolete entries from alf_prop_root
@sujaypillai
sujaypillai / triggerQuartzJob.js
Created January 13, 2016 13:45
TriggerQuartzJob
var ctxt, scheduler;
// get Spring context and Quartz scheduler
ctxt = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
scheduler = ctxt.getBean('schedulerFactory', Packages.org.quartz.Scheduler);
// fire (unless explicitly defined in Job detail Spring bean, scheduler group is always DEFAULT)
scheduler.triggerJob('<insertJobName>', 'DEFAULT');
mvn install:install-file -Dfile=mysql-connector-java-5.1.6.jar -DgroupId=mysql -DartifactId=mysql-connector-java -Dversion=5.1.6 -Dpackaging=jar
curl -s -k -X POST --user 'admin':'admin' \
-H "Content-Type: application/json" \
-d '{"tenantDomain":"mytenant.com","tenantAdminPassword":"1234"}' http://localhost:8080/alfresco/s/api/tenants
curl -s -k -X POST --user 'admin':'admin' -H "Content-Type: application/json" -d '{"tenantDomain":"snpp.com","tenantAdminPassword":"3ricries"}' http://localhost:8080/alfresco/s/api/tenants
./psql -U alfresco -d alfrescoreporting
CREATE DATABASE alfrescoreporting WITH OWNER=alfresco ENCODING='UTF8' CONNECTION LIMIT=-1;
GRANT CONNECT, TEMPORARY ON DATABASE alfrescoreporting TO PUBLIC;
GRANT ALL ON DATABASE alfrescoreporting TO alfresco;