Skip to content

Instantly share code, notes, and snippets.

View howkymike's full-sized avatar
🎓
studying

Michał howkymike

🎓
studying
View GitHub Profile
@howkymike
howkymike / overrideSupportedAlfrescoTransformerConfig.json
Created May 13, 2023 14:38
Alfresco Transform Core 3.0.0+ out-of-the-box configuration ready to be overridden
{
"overrideSupported":[
{
"transformerName":"Archive",
"sourceMediaType":"application/x-cpio",
"targetMediaType":"text/html",
"maxSourceSizeBytes":-1,
"priority":50
},
{
@howkymike
howkymike / protectEyes.scpt
Last active December 13, 2022 20:58
AppleScript 20-20-20 rule very simple application to protect your eye's vision. Every 20 minutes the app is ringing (then you should look at distant object), and after 20 seconds it rings again (then you can go back to work).
(* Installation instructions:
1. Download this file and open with Script Editor
2. Extract screenLockChecker.sh from this file and save in desired location
3. Edit PATH_TO_SCREEN_LOCK_CHECKER_SCRIPT to absolute path to the screenLockChecker.sh script
4. Go to File -> Export... -> set "File Format" to "Application" and click "Save"
5. (Optionally add to startup) Open system Preferences -> Search "Open at Login" -> add newly created app
*)
-- Author: howkymike 2022
repeat while true
@howkymike
howkymike / alfresco_countries_constraint.xml
Last active August 22, 2022 09:33
Alfresco Country constraint with I18N sorted by english names
<!-- MODEL -->
<constraints>
<constraint name="howkymike:countryOptions" type="LIST">
<title>Countries list</title>
<parameter name="allowedValues">
<list>
<value>AF</value>
<value>AX</value>
<value>AL</value>
<value>DZ</value>
@howkymike
howkymike / alfresco-m1-arm64-instruction.md
Last active October 1, 2022 18:49
Instruction allowing Alfresco developers to run dockerized Alfresco on Apple silicon M1 arm64 chip

Alfresco Community on M1 Apple Silicon chip (arm64)

If you want to run dockerized Alfresco Community on your M1 Macbook there are some steps you have to follow and traps you have to avoid. Most importantly:

  • currently (02.2022) amd64 Java isn't perfect on arm64. You should recompile everything to use arm64 architecture. As a bonus you will get quite good performance.
  • to compile Alfresco content services, Oracle's Java is needed. The ones from OpenJDK, Zulu, Temurin just does not work...
  • while creating alfresco-content and alfresco-share images, you should add some amps to amps/amps_share directory. Especially share-services. js-console and ootb-support-tools are nice to have.
  • by default alfresco-search has mutal TLS turned on. While you are developing, it is better to specify ALFRESCO_SECURE_COMMS=none (or secret in the newer versions)

Instruction

@howkymike
howkymike / alfresco_clean_hist_processes.sql
Last active October 1, 2021 13:48
Alfresco Activiti - clean non-existent historical process data (fix "My completed tasks" error)
-- =============================================
-- Author: howkymike
-- Description: deletes nonexistent historical process data. It resolves the "My completed tasks" error after some
-- process definitions has been deleted via Alfresco Workflow console.
-- Before executing this script stop Alfresco instace
-- =============================================
-- Create temp table which stores faulty IDs
SELECT PROC_INST_ID_ into tmp2 FROM ACT_HI_PROCINST
left join act_re_procdef on act_re_procdef.id_ = act_hi_procinst.proc_def_id_
@howkymike
howkymike / previewpackageitems.ftl
Last active September 22, 2020 13:27
Alfresco Share addon - Document preview while editing tasks
<#include "/org/alfresco/components/form/controls/workflow/packageitems.ftl" />
<#assign el>${controlId}-wp</#assign>
<#assign dependencyGroup="web-preview">
<#include "/org/alfresco/components/preview/include/web-preview-css-dependencies.lib.ftl" />
<#include "/org/alfresco/components/preview/include/web-preview-js-dependencies.lib.ftl" />
<#-- *************************************************
// Author: howkymike
// Instructions:
// 1) Put this file somewhere inside Share's "site-webscripts" folder (i.e. my-project-share/src/main/resources/alfresco/web-extension/site-webscripts/com/mydomain/previewpackageitems.ftl)
@howkymike
howkymike / currency-dropdown.html
Last active September 15, 2024 06:15
HTML Dropdown Currency List. Compatibile with ISO 4217 standard and extended with the currencies not included in the ISO 4217 but used commercially.
<select id="currencyList">
<option value="USD" selected="selected" label="US dollar">USD</option>
<option value="EUR" label="Euro">EUR</option>
<option value="JPY" label="Japanese yen">JPY</option>
<option value="GBP" label="Pound sterling">GBP</option>
<option disabled>──────────</option>
<option value="AED" label="United Arab Emirates dirham">AED</option>
<option value="AFN" label="Afghan afghani">AFN</option>
<option value="ALL" label="Albanian lek">ALL</option>
<option value="AMD" label="Armenian dram">AMD</option>