Skip to content

Instantly share code, notes, and snippets.

View yassinelachgar's full-sized avatar

Lachgar yassinelachgar

View GitHub Profile
@kutzhanov
kutzhanov / .gitlab-ci.yml
Last active September 11, 2024 15:19
Deploy Docker container into AWS ECS Fargate using Gitlab CI
image: docker:19.03
variables:
REPOSITORY_URL: <AWS_ACCOUNT_ID>.dkr.ecr.<REGION_NAME>.amazonaws.com/<ECR_REPOSITORY_NAME>
REGION: <REGION_NAME>
TASK_DEFINITION_NAME: <TASK_DEFINITION_NAME>
CLUSTER_NAME: <CLUSTER_NAME>
SERVICE_NAME: <SERVICE_NAME>
CPU: <CPU>
MEMORY: <MEMORY>
@101t
101t / Deployment Guide to Installing Odoo 14 on Ubuntu 20.04.md
Last active August 26, 2024 01:54
Deployment Guide to Installing Odoo 14 on Ubuntu 20.04
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
@phil-hildebrand
phil-hildebrand / admin.sql
Created December 12, 2018 21:50 — forked from namrata4/admin.sql
Handy PostgreSQL Monitoring Scripts
-- turn off paging (less/more)
psql> \pset pager off
/*
Pager usage is off.
*/
-- find an object name by id
SELECT OID, relname
@ssskip
ssskip / .gitlab-ci.yml
Last active September 11, 2024 16:17
gitlab-ci AWS ECS build & deploy
image: docker:latest
variables:
REPOSITORY_URL: xxx.dkr.ecr.us-west-2.amazonaws.com/xxx
REGION: us-west-2
TASK_DEFINTION_NAME: xxx
CLUSTER_NAME: xxx
SERVICE_NAME: xxx
services:
@byk0t
byk0t / docker-compose.yml
Last active January 26, 2024 16:08
Docker compose for odoo:14 and PostgreSQL:13
version: '3'
services:
db:
image: postgres:13
volumes:
- db-data:/var/lib/postgresql/data/pgdata
ports:
- 5432:5432/tcp
environment:
- POSTGRES_PASSWORD=odoo
@gonzaloplaza
gonzaloplaza / aws_ec2_ubuntu_userdata_docker.sh
Last active February 3, 2025 10:01
Script to auto install Docker (last version) into AWS EC2/Ubuntu instance at launch time: User Data
#!/bin/bash
# Install docker
apt-get update
apt-get install -y cloud-utils apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update
@bjsion
bjsion / Installing Odoo on AWS
Last active April 16, 2024 09:36
Installing Odoo ERP on AWS using RDS and EC2
# Installing Odoo on AWS
These are the steps I ran to get Odoo up and running on AWS using the free tiers (for now).
## Setup servers
### Create DB
Create an Postgres DB on Amazon RDS:
https://us-east-2.console.aws.amazon.com/rds/home?region=us-east-2#launch-dbinstance:ct=dbinstances:
### Create Server
@yasmanycastillo
yasmanycastillo / odoo_download_file.py
Last active August 30, 2023 14:46
Odoo: How to download a file immediately from wizard
# -*- coding: utf-8 -*-
from odoo import http
from odoo.http import request
from odoo.addons.web.controllers.main import serialize_exception,content_disposition
import base64
class Binary(http.Controller):
@http.route('/web/binary/download_document', type='http', auth="public")
@wojteklu
wojteklu / clean_code.md
Last active April 21, 2025 06:12
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules