- Join TS Files
- Convert TS to MP4
- Download Online AES-128 Encrypted HLS video
- Convert Video to GIF
- Extract Audio and Convert it to MP3
- Burn Subtitles into Video
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 | |
################################################################################ | |
# 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: |
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
# 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/ |
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
@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 |
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/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) |
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
# 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 |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# utf-8 中文编码 | |
import glob | |
import os,sys | |
import json | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
import time, sys,iptc # iptc 包通过 sudo pip install python-iptables 安装 | |
from datetime import datetime |
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
# 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. |
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
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 |
NewerOlder