Skip to content

Instantly share code, notes, and snippets.

### yml
version: '2'
services:
web:
image: akhdaniel2/odoo:latest
depends_on:
- db
ports:
- "8069:8069"
volumes:
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
sudo yum install -y yum-utils \
@akhdaniel
akhdaniel / Python Download Youtube videos
Last active June 10, 2019 07:25
Python Download Youtube videos
#pip install youtube-dl
#create data.txt berisi ID video youtube per baris
# misalnya URL https://www.youtube.com/watch?v=qZ-ouYWCASo&feature=youtu.be
# ID nya adalah qZ-ouYWCASo
while read p; do
echo "$p"
youtube-dl -f best https://youtube.com/watch?v=$p
done < data.txt
Harus enable Windows Script Host:
edit dari regedit:
LOCAL_MACHINE/Software/Microsoft/Windows Script Host/Settings
CURRENT_USER/Software/Microsoft/Windows Script Host/Settings
Key: Enable
Type: DWORD
Value: 1
@akhdaniel
akhdaniel / Linux Kernel Tuning
Last active April 1, 2019 02:11
Kernel Tuning
vm.overcommit_memory=2
vm.swappiness=0
vm.dirty_ratio=2
vm.dirty_background_ratio=1
vm.nr_hugepages=4287
@akhdaniel
akhdaniel / Filter domain dynamic date
Last active December 3, 2019 09:26
Odoo Filter Today
<filter string="Today" name="today" domain="[('date_start','&gt;=',time.strftime('%%Y-%%m-%%d'))]"/>
<filter string="This Month" name="thismonth" domain="[('date_start','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
<filter string="This Year" name="thisyear" domain="[('date_start','&gt;=',time.strftime('%%Y-01-01'))]"/>
<filter string="Today" domain="[('start_at', '>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" />
@akhdaniel
akhdaniel / CARA RENEW CERTIFICATE HORIZON REMCASH
Created January 26, 2019 22:24
CARA RENEW CERTIFICATE HORIZON REMCASH
ssh root@horizon
cd /etc/letsencrypt/live/horizon.remcash.com/
certbot certonly --force-renew -d horizon.remcash.com
systemctl restart stellar-horizon.service
@akhdaniel
akhdaniel / Nginx Monitoring Plugin
Created January 17, 2019 22:29
Nginx Monitoring Plugin
sudo apt-get install libwww-perl
Edit nginx.conf, bagian http
Test curl http://localhost/nginx_status
server {
listen 127.0.0.1;
server_name localhost;
location /nginx_status {
Widget:
Widget is different or alternate representation to display a screen, fields and attributes in odoo.
Widget allows to change view using different rendering templates and also allows to design as you want.
Example:
widget_name.js