Flask auto reload inside docker


I found this tips when i developed flask inside docker, with this method we can make docker auto reload when change some code or under development

  flaskweb:
    build: ./apps
    container_name: flask-apps
    ports:
      - 7100:7100
    environment:
      PORT: 7100
      FLASK_DEBUG: 1
    restart: always
    volumes: ['./apps:/usr/src/app/'] <-- apps is my flask folder
    depends_on:
      - db

Make Odoo as service in ubuntu


Save this at /etc/systemd/system/odoo.service

[Unit]
Description=Odoo14
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=odoo14
PermissionsStartOnly=true
User=odoo
Group=odoo
ExecStart=/odoo/odoo-server/odoo-bin -c /etc/odoo-server.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

Install cmake from source


Notes howto install cmake from source

Some ros package can’t install because minimum cmake, this is how i do it

#download cmake version here https://cmake.org/files/

wget https://cmake.org/files/v3.8/cmake-3.8.0.tar.gz

#and uncompress package using 

tar xvf  cmake-3.8.0.tar.gz

sudo apt-get install build-essential

sudo ./bootstrap

sudo make 

sudo make install

Alternate remote desktop


I find new tools for remote desktop it is really easy to setup, very usefull for alternatif remote desktop like other vnc, the name of application is nomachine its fast and the instalation really easy

I’m using this app for remote my ros robot, and that’s it

Happy coding and salam ngoprek

PTEG Filament Temperature


Catatan temperature 3d printer menggunakan ender5pro

Filament yang digunakan sunlu dan creality

  • Warna kuat (kuning, merah, dll) transparent 245 derajat keatas
  • Warna tidak transparant (putih, hitam) 235 derajat maks 240
    • Fan speed 40
    • Speed 60
    • Outer & Inner Speed 40
    • Retract 4.5 Speed 50

Akan terus diupdate apabila mencoba filament baru 🙂

set datetime as default current timestamp for flask model


Try this it will work guaranteed 😀

created_on = db.Column(db.DateTime, server_default=db.func.now())