Skip to content

Instantly share code, notes, and snippets.

@yregaieg
yregaieg / Importing JS
Last active January 18, 2024 16:52 — forked from douglascrp/Importing JS
Alfresco Javascript Console Recipes
Import a script from the repository using a name-based path:
<import resource="/Company Home/Data Dictionary/Scripts/library.js">
Import a script from the repository using a NodeRef reference:
<import resource="workspace://SpacesStore/6f73de1b-d3b4-11db-80cb-112e6c2ea048">
Import a script from a Java classpath location:
@yregaieg
yregaieg / irc.md
Created July 26, 2018 08:05 — forked from xero/irc.md
irc cheat sheet

#IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

##The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
/**
* Script to locate error nodes from solr error report, and do something with them.
*
* @author Younes Regaieg <y.regaieg@gmail.com>
* @version 1.0
**/
//----- Solr error report to be fetched from solr /solr4/alfresco/query?q=EXCEPTIONMESSAGE:*&wt=json&rows=<number-of-rows-to-fetch>
//----- Swap this dummy object with a real object from the output of the endpoint mentionned above.
var solrErrorsReport = {
@yregaieg
yregaieg / cleanAlfPropTables-MySQL.sql
Created January 20, 2017 09:55
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
@yregaieg
yregaieg / cleanupAlfrescoHistAct.sql
Created November 30, 2016 16:03 — forked from AFaust/cleanupAlfrescoHistAct.sql
Delete all historic process instances and related historic data for workflows completed before a specific date (MySQL / MariaDB)
delete from act_hi_actinst where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24');
delete from act_hi_attachment where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24');
delete from act_hi_comment where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24');
delete from act_hi_detail where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24');
delete from act_hi_identitylink where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24');
delete from act_hi_varinst where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is not null and end_time_ < timestamp '2016-11-24');
delete from act_hi_taskinst where proc_inst_id_ in (select id_ from act_hi_procinst where end_time_ is no
@yregaieg
yregaieg / .gitconfig
Created November 30, 2016 10:31 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@yregaieg
yregaieg / SVN_Git_Mirror.md
Created August 12, 2016 10:25 — forked from ticean/SVN_Git_Mirror.md
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@yregaieg
yregaieg / remastersys
Created August 3, 2016 13:55 — forked from wagung/remastersys
remastersys customize
#!/bin/bash
# remastersys script to make an installable livecd/dvd from an (XK)Ubuntu installed
# and customized system
#
#
# Created by Tony "Fragadelic" Brijeski
#
# Copyright 2007,2008 Under the GNU GPL2 License
#