Skip to content

Instantly share code, notes, and snippets.

@grindtildeath
grindtildeath / odoo_module_dependency_graph.sql
Last active August 18, 2022 14:21
Odoo module dependency graph
WITH recursive dep_tree AS (
SELECT mdl0.id, mdl0.name, NULL::integer, 1 AS level, array[mdl0.id] AS path_info
FROM ir_module_module mdl0
WHERE name = 'sale' -- state here the child module
UNION ALL
SELECT (SELECT mdl1.id FROM ir_module_module mdl1 WHERE mdl1.name = c.name), rpad('', p.level * 1, '_') || c.name, c.module_id, p.level + 1, p.path_info||c.id
FROM ir_module_module_dependency c
JOIN dep_tree p ON c.module_id = p.id
WHERE level < 5 -- define here the levels to be displayed
)
@neversun
neversun / persist nvidia monitor refresh rate linux mint.md
Created February 18, 2018 12:01
How to persist monitor refresh rate with nvidia settings and Linux Mint Cinnamon?
@revov
revov / README.md
Last active April 2, 2023 09:13
Remapping keys on Linux for a specific device (Wireless Laser Presenter)

Recently I bought a Chinese Wireless Laser Presenter. I planned on using it for RevealJS presentations and it worked perfectly (as PageUP/PageDown traverse well in the 2D slides). However, in order to have more control I wanted to map the other two buttons (FullScreen, BlankScreen) to Up and Down arrows, as well as remapping the PgUp/PgDn buttons to Left and Right. Since I will most probably be using Linux when giving presentations I though it would be easy to remap them. I quickly realised how wrong I was.

The presenter worked on Wayland but remapping the keys would be mission impossible. xinput --list didn't detect the presenter (the only way to get its EventID was to use the lower level sudo libinput-list-devices). The next steps that I am going to present also caused errors, so Wayland is out of the question as I didn't have patience to dig through it.

As I was skimming through various StackOverflow threads and blog posts I gained a bit of knowledge on how the Linux systems work with regards to inpu

@Odew
Odew / conf.openerp
Last active February 26, 2020 07:27
grcat configuration file for Openerp coloration log
# Error
regexp=ERROR.*$
colours=bold red
count=stop
======
# Warning Message
regexp=WARNING.*$
colours=dark yellow
count=more
======