Skip to content

Instantly share code, notes, and snippets.

@aitseitz
aitseitz / acs_downgrade_amp_module.js
Last active March 12, 2024 10:51
ACS: How to downgrade an AMP-Module like alfresco-aos-module
// Based on Tech Article:
// https://community.hyland.com/tskb/000013140-how-to-downgrade-the-outlook-integration-module-after-installing-unsupported-amp-version
// the correct uuid for the amp module needs to be identified via the node browser inside the system://system Store
var sysNodeUUID = "system://system/8b6df670-9bb3-462b-8483-9b156e2621fd";
var newVersionString = "1.0.0";
/**
* Searches for the target node and sets a fix Version for "module:currentVersion"
* @param sysNodeUUID {String} module node string e.g. "system://system/uuid"
@janmartendeboer
janmartendeboer / composer.mk
Last active May 27, 2022 09:08
Composer Makefile
# Updates at https://gist.github.com/johmanx10/b48bd498484384975fe7ed338cf9aef4
# Composer configuration
PHP := $(shell command -v php || echo php)
COMPOSER := $(shell command -v composer.phar || command -v composer || echo composer)
COMPOSER_VENDOR_DIR := $(shell $(COMPOSER) config vendor-dir || echo vendor)
COMPOSER_AUTOLOAD := $(shell echo "$(COMPOSER_VENDOR_DIR)/autoload.php")
# Install vendor dependencies.
$(COMPOSER_VENDOR_DIR) $(COMPOSER_AUTOLOAD): | composer.lock $(COMPOSER)
@J0s3f
J0s3f / netztest.py
Created September 1, 2018 21:56
RTR Netztest python
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import selenium.webdriver.firefox.webdriver as fwb
from selenium.common.exceptions import TimeoutException
import os,datetime,csv
@CesarCapillas
CesarCapillas / Importing JS
Last active December 5, 2023 04:12
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:
@marc-hanheide
marc-hanheide / vlc-stream.sh
Last active November 15, 2023 06:53
VLC screen streaming mjpeg
DISPLAY=:0 cvlc -vvv --no-audio screen:// --screen-fps 1 --sout "#transcode{vcodec=MJPG,vb=800}:standard{access=http,mux=mpjpeg,dst=:18223/}" --sout-http-mime="multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a"
@justinwoo
justinwoo / using-rxjs-instead-of-flux-with-react.md
Last active October 21, 2023 10:16
Using RxJS instead of Flux with React to organize data flow

Reposted from Qiita

For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.

Why I'm tired of using and teaching flux

There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.

If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:

@redthor
redthor / symfony_doctrine_dump_individual_files.txt
Created July 5, 2012 02:21
To change symfony 1.4 and doctrine to support dumping individual tables and selecting which models will be dumped
cd $SF_HOME/lib/vendor/symfony/lib/plugins
$ svn status |grep '^M'
M sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php
M sfDoctrinePlugin/lib/task/sfDoctrineDataDumpTask.class.php
M sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Cli.php
M sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Task/DumpData.php
M sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php
$ for a in `svn status |grep '^M' |awk '{print $2}'`;
@pfig
pfig / mkfavicon.sh
Created February 12, 2012 12:01
Make a multi-resolution favicon.ico from a source image, using ImageMagick
#!/bin/bash
# from
# http://bergamini.org/computers/creating-favicon.ico-icon-files-with-imagemagick-convert.html
convert source-WxW.png -resize 256x256 -transparent white favicon-256.png
convert favicon-256.png -resize 16x16 favicon-16.png
convert favicon-256.png -resize 32x32 favicon-32.png
convert favicon-256.png -resize 64x64 favicon-64.png
convert favicon-256.png -resize 128x128 favicon-128.png