-loglevel debug
- Join TS Files
- Convert TS to MP4
- Download Online AES-128 Encrypted HLS video
- Convert Video to GIF
| #!/bin/bash | |
| ################################################################################ | |
| # Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04 | |
| # Author: Yenthe Van Ginneken | |
| # Adjusted: Ray Carnes | |
| # Assumes you already have an Ubuntu user called "odoo" with a home folder | |
| #------------------------------------------------------------------------------- | |
| # Make a new file: | |
| # sudo nano odoo-install.sh | |
| # Place this content in it and then make the file executable: |
| # Author: Ryan Cole | |
| # Website: https://ryanc.me | |
| # GitHub: https://github.com/MGinshe | |
| # Usage: | |
| # Place this file in /etc/nginx/sites-enabled/ | |
| # Make sure you edit the DOMAIN_HERE and SSL_CERTIFICATE, and DB_FILTER sections | |
| # | |
| # Note: This config file is designed to be used with the Odoo dbfilter_from_header module | |
| # https://apps.openerp.com/apps/modules/9.0/dbfilter_from_header/ |
| @echo off | |
| rem author: vhanla | |
| rem If you want to install PyChm on Python (2.7) in Windows (32bits), you might get stuck on errors by trying to build using | |
| rem Microsoft Visual C++ Compiler Package for Python 2.7 because it won't be capable to build chmlib (chm.lib) | |
| rem So to fix that you need to build it manually, but here is a batch that will built it and setup automatically: | |
| set currentdir=%~dp0 | |
| if exist "%CD%\chmlib\" goto building | |
| goto gitchmlib |
| #!/bin/sh | |
| # example | |
| # add this to crontab -e of odoo user | |
| # curl -sL https://gist.github.com/shingonoide/1947a97e3c00168372e950a6788ce9ad/raw/cleanup_odoo_session.sh > /tmp/cleanup_sessions.sh && sh /tmp/cleanup_sessions.sh 4 | |
| HOW_OLDER=${1:-6} | |
| VERBOSE=${2:-0} | |
| SESSION_FOLDER="$HOME/.local/share/Odoo/sessions" | |
| TOTALFILES=$(find $SESSION_FOLDER -name '*.sess' | wc -l) |
| # Assumes the database container is named 'db' | |
| DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
| DB_HOSTNAME=db | |
| DB_USER=postgres | |
| LOCAL_DUMP_PATH="path/to/local.dump" | |
| docker-compose up -d db | |
| docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
| docker-compose stop db |
| # Based on post from: https://snipt.net/chrisdpratt/symmetrical-manytomany-filter-horizontal-in-django-admin/#L-26 | |
| # Only reposting to avoid loosing it. | |
| """ | |
| When adding a many-to-many (m2m) relationship in Django, you can use a nice filter-style multiple select widget to manage entries. However, Django only lets you edit the m2m relationship this way on the forward model. The only built-in method in Django to edit the reverse relationship in the admin is through an InlineModelAdmin. | |
| Below is an example of how to create a filtered multiple select for the reverse relationship, so that editing entries is as easy as in the forward direction. | |
| IMPORTANT: I have no idea for what exact versions of Django this will work for, is compatible with or was intended for. |
| sudo apt-get install git build-essential curl xclip | |
| sudo apt-get install bison flex libreadline-dev libz-dev | |
| git clone git://git.postgresql.org/git/postgresql.git | |
| cd postgresql; ./configure; make; sudo make install | |
| cd contrib; make; sudo make install | |
| sudo adduser postgres | |
| sudo mkdir /usr/local/pgsql/data | |
| sudo chown postgres -R /usr/local/pgsql/data |
| git config --global https.proxy http://127.0.0.1:1080 | |
| git config --global https.proxy https://127.0.0.1:1080 | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| npm config delete proxy |