Skip to content

Instantly share code, notes, and snippets.

View metodribic's full-sized avatar

Metod Ribič metodribic

  • Working at Better
  • Slovenia
View GitHub Profile
@metodribic
metodribic / transparent.css
Created August 14, 2020 16:47
Transparent div style
background: linear-gradient(to top, #fff, rgba(255,255,255,0));
@metodribic
metodribic / docker-odoo.md
Created September 2, 2020 18:45
Docker Odoo commands

Advanced

Image is available on docker hub

Postgres

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10

Odoo

@metodribic
metodribic / event.util.ts
Created October 13, 2020 06:32
Utils for dealing with keyboard events and figuring out what was pressed
export const enum KeyCodes {
BACKSPACE = 8,
TAB = 9,
ENTER = 13,
SPACE = 32,
DELETE = 46
}
export class EventUtil {
@metodribic
metodribic / docker-compose.yaml
Created October 30, 2020 06:52
Odoo 13 docker compose with mounted custom addon
version: '3'
services:
db:
image: postgres:11
environment:
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- POSTGRES_DB=postgres
restart: always
odoo:
@metodribic
metodribic / fullbleed.css
Last active June 20, 2022 07:00
Full bleed box-shadow + clip-path technique
.full-bleed-background {
--c: red;
background: var(--c);
/* Stretched box shadow */
box-shadow: 0 0 0 100vmax var(--c);
/* Clip only the top and the bottom */
clip-path: inset(0 -100vmax);
}