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
#!/bin/bash | |
export http_proxy= | |
MYHOST=https://alfrescohost | |
MYSECR="admin:secret" | |
if [[ $1 == "-h" ]]; then | |
echo "Usage: cmis-browser.sh [PATH=] [ACTION=properties|parents|aspects" | |
echo " cmis-browser.sh" |
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
# /bin/bash | |
set -e | |
export http_proxy= | |
ALF_HOST="http://localhost:8080/" | |
ALF_USER="admin" | |
ALF_PASS="secret" | |
if [ -z "$1" ]; then | |
echo "Usage: alf-rest-search.sh <TYPE|SITE|ASPECT|property|TEXT|ISNULL|ISNOTNULL> <object>" |
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
# Alfresco users | |
curl -s -u user:pass http://localhost:8080/alfresco/service/api/people | jq '.people[] .userName' | |
curl -s -u user:pass http://localhost:8080/alfresco/service/api/people | jq '.people[] | "\(.userName),\(.firstName),\(.lastName),\(.email)"' | |
# Alfresco groups | |
curl -s -u user:pass http://localhost:8080/alfresco/service/api/groups | jq '.data[] .shortName' | |
curl -s -u user:pass http://localhost:8080/alfresco/service/api/groups | jq '.data[] | "\(.shortName),\(.fullName),\(.displayName)"' |
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
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 |
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
#!/bin/bash | |
ELKSERVER=${1:-localhost} | |
ELKPORT=${2:-9200} | |
if [ -z "$ELKSERVER" ]; then | |
# Usage | |
echo 'Usage: check-health.sh <elk-server=localhost> <elk-port=9200>' | |
# create-index.sh "logstash-solr-*" | |
else | |
curl -s "http://$ELKSERVER:$ELKPORT/_cat/health?v" |
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
#! /bin/bash | |
./bin/nutch plugin urlfilter-regex org.apache.nutch.urlfilter.regex.RegexURLFilter -Durlfilter.regex.file=regex |
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
#!/bin/bash | |
COLLECTION=${2:-zylk} | |
SERVER=${3:-localhost} | |
PORT=${4:-8983} | |
if [ -z "$1" ]; then | |
# Usage | |
echo 'Usage: add-by-id.sh <id> [<collection> <solr-server=localhost> <port=8383>]' | |
else | |
curl -X POST "http://${SERVER}:${PORT}/solr/${COLLECTION}/update?commit=true" -H "Content-Type: text/xml" --data-binary "<add><doc><field name='id'>$1</field><field name='url'>$1</field></doc></add>" |
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
urlencode() { | |
# urlencode <string> | |
old_lc_collate=$LC_COLLATE | |
LC_COLLATE=C | |
local length="${#1}" | |
for (( i = 0; i < length; i++ )); do | |
local c="${1:i:1}" | |
case $c in | |
[a-zA-Z0-9.~_-]) printf "$c" ;; |
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
/** | |
* Script to locate error nodes from solr error report, and do something with them. | |
* | |
* @author Younes Regaieg <[email protected]> | |
* @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 = { |
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
SELECT count(alf_node.id) | |
FROM alf_node INNER JOIN alf_node_aspects ON alf_node.id = alf_node_aspects.node_id | |
WHERE alf_node.store_id = 6 | |
AND alf_node_aspects.qname_id = 2929; |
NewerOlder