Skip to content

Instantly share code, notes, and snippets.

View tuanlc's full-sized avatar
🌤️
Focusing

Cong Tuan Le tuanlc

🌤️
Focusing
View GitHub Profile
@tuanlc
tuanlc / OpenPaaSInstruction.md
Last active November 8, 2020 11:30
Install OpenPaas instruction

I. Prepare.

​ If you get stuck at any step, have a quick look at F.A.Q part.

I. Prepare.

​ Follow documentation here to install docker.

- Mail server
- Set configuration mail
- Test send mail
- Users management
- Create with quick form
- List users
- Create with full form
- LDAP server
- Set LDAP configuration.
_ Modules management
@tuanlc
tuanlc / syntastic-local-eslint
Last active April 9, 2017 04:32
Setup local eslint for JavaScript for VIM with syntastic - fork from (https://zirho.github.io/2016/10/06/vim-syntastic-local/) for remember
# Use one of plugin managers
Vim-Plug
NeoBundle
Vundle
Pathogen
Vim-Addon-Manager
## Install plugins
### Add lines in .vimrc
@tuanlc
tuanlc / ES.txt
Created July 27, 2017 01:44 — forked from chamerling/ES.txt
Dirty ES fix for OP user search
chamerling@macbook-air-de-christophe:~/src/openpaas/rse-chamerling|CAL-605-rename-events⚡
⇒ curl -XDELETE 'http://localhost:9200/users.idx/'
{"acknowledged":true}% chamerling@macbook-air-de-christophe:~/src/openpaas/rse-chamerling|CAL-605-rename-events⚡
⇒ node ./bin/cli.js elasticsearch -i users
debug: local/SUBSCRIBE to mongodb:connectionAvailable
[CLI] INFO ElasticSearch has been configured
chamerling@macbook-air-de-christophe:~/src/openpaas/rse-chamerling|CAL-605-rename-events⚡
⇒ node ./bin/cli.js reindex -t users
"settings": {
"analysis": {
"filter": {
"nGram_filter": {
"type": "nGram",
"min_gram": 1,
"max_gram": 20,
"token_chars": [
"letter",
"digit",
'use strict';
module.exports = dependencies => {
const coreESListeners = dependencies('coreElasticsearch').listeners;
const denormalize = require('./denormalize')(dependencies);
return {
register
};
@tuanlc
tuanlc / [DEV] intergrate LinShare with OP
Created March 5, 2019 07:56
[DEV] intergrate LinShare with OP
ssh://git@ci.linagora.com:7999/linagora/lgs/linshare/saas/linshare-docker-dev.git
Diff
```
diff --git a/docker-compose.yml b/docker-compose.yml
index 276b5d9..e4d5f30 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -38,6 +38,7 @@ services:
- ./${ROOT_DATA_FOLDER}/linshare_data/lib:/var/lib/linshare
# To enable debug logs
{"swagger":"2.0","info":{"title":"OpenPaaS","description":"OpenPaaS API","version":"0.1"},"host":"localhost:8080","basePath":"/api/v0.1","consumes":["application/json"],"produces":["application/json"],"paths":{"/activitystreams/{as_uuid}":{"get":{"tags":["ActivityStreams"],"description":"Gets the timeline of an activity stream from its uuid.","parameters":[{"$ref":"#/parameters/as_uuid"},{"$ref":"#/parameters/as_before"},{"$ref":"#/parameters/as_after"},{"$ref":"#/parameters/as_limit"}],"responses":{"200":{"$ref":"#/responses/as_timeline"},"400":{"$ref":"#/responses/cm_400"},"401":{"$ref":"#/responses/cm_401"},"404":{"$ref":"#/responses/cm_404"},"500":{"$ref":"#/responses/cm_500"}}}},"/activitystreams/{as_uuid}/resource":{"get":{"tags":["ActivityStreams"],"description":"Gets the resource associated with the activitystream.","parameters":[{"$ref":"#/parameters/as_uuid"}],"responses":{"200":{"$ref":"#/responses/as_resource"},"400":{"$ref":"#/responses/cm_400"},"401":{"$ref":"#/responses/cm_401"},"404":{"$ref":"

Change:

Mailbox propeties

  • totalMessages => totalEmails

  • unreadMessages => unreadEmails

  • mayReadItems

  • mayAddItems

  • mayRemoveItems

  • mayCreateChild

@tuanlc
tuanlc / loc.sh
Last active September 29, 2020 02:20
Calculate contribution for Linagora/OpenPaaS suit repository
DATE_WEEK="2020-09-21T00:00:00-07:00"
DATE_MONTH="2020-09-01T00:00:00-07:00"
WORK_SPACE="/home/tlcong/workspace/linagora";
echo "Please enter author's email: "
read AUTHOR
echo "Do you want to pull latest of codes(yes/no):"
read PULL_LATEST_CODE
echo "Calculating..."