Category: General

  • Customer Relationship Management

    Customer Relationship Management (CRM) allow you to manage customers.

    HubSpot

    Fre plan allow unlimited users, unlimited contacts, shared inbox and ticket system. Look like a good system to use as shared inbox/helpdesk. They have google chrome extension, that integrate with gmail/google workspace so all emails get tracked in CRM with read notifications.

    https://hubspot.com/

    Agile CRM

    Free for upto 10 users. Helpdesk.

    https://www.agilecrm.com

    Bitrix24

    Bitrix24 is Open source CRM. Paid and Free Options available.

    https://www.bitrix24.com/uses/free-open-source-crm-software.php

    See ERP

  • libOpenGL.so.0: cannot open shared object file

    When starting RuneScape client on Ubuntu 20.04, i get folloiwng error

    Gtk-Message: 14:22:22.826: Failed to load module "canberra-gtk-module"
    /home/boby/Jagex/launcher/rs2client: error while loading shared libraries: libOpenGL.so.0: cannot open shared object file: No such file or directory
    

    To fix this, run

    sudo apt install libopengl0 -y
    
  • Moodle 3.2 PostgreSQL 12 Error reading from database

    Moodle 3.2 PostgreSQL 12 Error reading from database

    Moodle 3.2 site started showing error “Error reading from database”.

    Moodle 3.2 PostgreSQL error

    I checked config.php, the database credentials are correct, i was able to login to Amazon AWS RDS PostgreSQL database with the credentaials and able to see the database tables with command \dt.

    psql -h mydb.hwfckmarrpeo.ap-southeast-2.rds.amazonaws.com -p 5432 -U moodle_user -W
    

    I enabled debug in DB with following SQL commands

    select * from  mdl_config WHERE name = 'debug';
    select * from  mdl_config WHERE name = 'debugdisplay';
    UPDATE mdl_config SET VALUE = 2047 WHERE name = 'debug';
    UPDATE mdl_config SET VALUE = 1 WHERE name = 'debugdisplay';
    

    But for some reason, moodle did not show any further debug info.

    I did a search for the error message “Error reading from database” using ack command, that search inside files.

    root@ip-172-31-13-4:/var/www/html# ack "Error reading from database"
    lang/en/error.php
    216:$string['dmlreadexception'] = 'Error reading from database';
    root@ip-172-31-13-4:/var/www/html# ack dmlreadexception
    lib/dmllib.php
    140:        parent::__construct('dmlreadexception', NULL, $errorinfo);
    
    course/tests/externallib_test.php
    1788:            $this->assertEquals('dmlreadexception', $e->errorcode);
    
    lang/en/error.php
    216:$string['dmlreadexception'] = 'Error reading from database';
    root@ip-172-31-13-4:/var/www/html# 
    

    I added some debug code in file

    lib/dmllib.php
    

    That shows the SQL command that caused the failure. The error was

    ERROR:  column d.adsrc does not exist
    

    This was because PostgreSQL removed the column name adsrc. To fix, edit file

    vi /var/www/html/lib/dml/pgsql_native_moodle_database.php
    

    Find (On line 394)

    $sql = "SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, d.adsrc
    

    Replace with

    $sql = "SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen, a.atttypmod, a.attnotnull, a.atthasdef, pg_get_expr(d.adbin::pg_node_tree, d.adrelid) AS adsrc
    

    For more information on this patch, see MDL-67220

    See moodle

  • editor

    Online Code Editor
    https://hemingwayapp.com
    https://replit.com/ – Online IDE, Run Programs, Collaborate with others.

  • Online Code Editor

    Eclipse Che

    Eclipse Che is an Open Source Online Code editor.

    https://github.com/eclipse/che/

    It supports several programming languages. Based on Visual Code Studio.

    RedHat.com supports this open-source project and provides Free hosting for the Eclipse Che community with the hope that it will result in ever-increasing community involvement and contributions.

    https://workspaces.openshift.com
    https://codesandbox.io

  • DSpace Change Header Text

    DSpace Change Header Text

    To change header text in DSpace xmlui interface

    DSpace change xmlui color

    Edit file

    vi /var/lib/tomcat8/webapps/xmlui/i18n/messages.xml
    

    Find

        DSpace Repository
    

    Replace text DSpace Home with new name.

    dspace xmlui change header text

    Restart tomcat8

    systemctl restart tomcat8
    

    See DSpace

  • Steaming to Anti Media Server using ffmpeg

    To team a video io Anti Media Server using ffmpeg command line, use

    ffmpeg -re -i VIDEO_FILE.mp4 -codec copy -f flv ANT_MEDIA_SERVER_RTMP_URL
    

    Example

    ffmpeg -re -i video.mp4 -codec copy -f flv rtmp://stream.serverok.in/LiveApp/225873992721868053400782
    

    Cammand with more steam option

    ffmpeg -re -i 'video.mp4'  -c:v libx264 -b:v 1600k -preset ultrafast -b 900k -c:a aac -b:a 128k -s 1920x1080 -x264opts keyint=50 -g 25 -pix_fmt yuv420p -f flv rtmp://stream.serverok.in/LiveApp/225873992721868053400782
    

    See Ant Media Server

  • Install Ant Media Server on CentOS 8

    To install Ant Media Server on CentOS 8, first install wget

    yum install wget -y
    

    Download installer script

    wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh
    

    Next you need to download binary zip file of Ant Media Server. For this install i used trail version

    ant-media-server-enterprise-2.2.1-20201029_2042.zip
    

    For community version, you can download from

    https://github.com/ant-media/Ant-Media-Server/releases
    

    Download it to same directory as “install_ant-media-server.sh”.

    Now run

    bash install_ant-media-server.sh -i ant-media-server-enterprise-2.2.1-20201029_2042.zip -r true
    

    Replace ant-media-server-enterprise-2.2.1-20201029_2042.zip with name of the ZIP file you downloaded.

    When i installed on 2021-01-19, it failed with following error.

    Created symlink /etc/systemd/system/multi-user.target.wants/antmedia.service → /usr/lib/systemd/system/antmedia.service.
    Redirecting to /bin/systemctl stop antmedia.service
    Redirecting to /bin/systemctl start antmedia.service
    Job for antmedia.service failed because the control process exited with error code.
    See "systemctl status antmedia.service" and "journalctl -xe" for details.
    There is a problem in installing the ant media server. Please send the log of this console to [email protected]
    

    To fix this, edit file

    vi /lib/systemd/system/antmedia.service
    

    Replace content of the file with

    [Unit]
    Description=AntMedia
    After=syslog.target network.target
    
    [Service]
    Type=simple
    Environment=JVM_MEMORY_OPTIONS=
    LimitNOFILE=65536
    Environment=ANTMEDIA_HOME=/usr/local/antmedia
    WorkingDirectory=/usr/local/antmedia
    RemainAfterExit=no
    Restart=on-failure
    RestartSec=5s
    TasksMax=36000
    User=antmedia
    Group=antmedia
    TimeoutStopSec=10
    SuccessExitStatus=143
    
    ExecStart=/usr/local/antmedia/start.sh
    
    
    [Install]
    WantedBy=multi-user.target
    

    Reload systemd deamon

    systemctl daemon-reload
    

    Now Ant Media Server will work. You can start using

    systemctl start antmedia
    

    Top stop Ant Media Server, use

    systemctl stop antmedia
    

    See Ant Media Server

  • FileZilla Please make sure the LC_CTYPE (or LC_ALL) environment variable is set correctly

    FileZilla Please make sure the LC_CTYPE (or LC_ALL) environment variable is set correctly

    When starting FileZilla FTP client on Ubuntu 20.04, I get the following error

    A local filename could not be decoded.
    Please make sure the LC_CTYPE (or LC_ALL) environment variable is set correctly.
    Unless you fix this problem, files might be missing in the file listings.
    No further will be displayed this session.
    

    To fix this, I edited file

    sudo vi /usr/share/applications/filezilla.desktop
    

    Find line

    Exec=filezilla
    

    Replace with

    Exec=env LC_ALL=en_US.UTF-8 filezilla