Skip to content

Instantly share code, notes, and snippets.

View tarekeldeeb's full-sized avatar

Tarek Eldeeb tarekeldeeb

View GitHub Profile

OpenProject to Odoo 19 Integration Guide: Automated Task & Employee Sync

This guide details the steps to build a real-time, native integration between OpenProject and Odoo 19. This setup utilizes OpenProject webhooks and Odoo's Automation Rules to automatically synchronize projects, tasks, and employee allocations without requiring custom Odoo modules or third-party middleware like Zapier.

Prerequisites

  1. Odoo 19 with Administrator access.
  2. OpenProject with Administrator access.
  3. Custom Employee Field: This guide assumes your Odoo Task (project.task) model has a custom Many2Many field created via Odoo Studio named x_studio_employees linking to the HR Employee (hr.employee) model.

@tarekeldeeb
tarekeldeeb / sine-3phase-equal-sync.m
Last active December 9, 2025 16:43
This setup models a clean, discretized 3-phase system with controlled quantization and physically meaningful signal delay.
clear; clc;
%% PARAMETERS
N = 144; % samples per period
Nbins = 18; % 18 bins -> 9 per half cycle
L = N / Nbins; % samples per bin = 8
n = 0:N-1; % sample indices
w0 = 2*pi/N; % sine frequency
shift = N/3; % 120° = 48 samples = 6 bins
@tarekeldeeb
tarekeldeeb / gist:3833d2facdee58dbcaace7bc61bfff3a
Created October 19, 2025 16:06
JS> Automatic download all mp3 sources from audiomack creators page
## Dev Console> https://creators.audiomack.com/dashboard/manage
(async () => {
const buttons = Array.from(
document.querySelectorAll('button, a')
).filter(b => b.textContent.trim().toLowerCase().includes('download'));
console.log(`Found ${buttons.length} download buttons`);
for (const [i, b] of buttons.entries()) {
console.log(`Downloading ${i + 1}/${buttons.length}: ${b.textContent.trim()}`);
@tarekeldeeb
tarekeldeeb / enterprise_token.rb
Created September 30, 2025 14:53 — forked from markasoftware/enterprise_token.rb
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
@tarekeldeeb
tarekeldeeb / Eldeebs-AutoMailer.gs
Created June 10, 2024 12:12
Eldeebs-AutoMailer.gs
/**
*
* Eldeebs AutoMailer
* tarekeldeeb@gmail.com
*
* Installation: This script should be triggered daily.
*
* Example: https://docs.google.com/spreadsheets/d/1BBAyeWDLu4pXIQ7XbbcJ-PA0gVAY_ZzB2ym7R5nYluc
*
* History: v0.1 19.9.2016: Initial Release
"""
Blog post: https://tarekeldeeb.github.io/quran-table-for-moqantereen
------------------
Problem Definition
------------------
Try to find the optimal Sura words distribution among a given number of days with the following constraints:
- Each day should have 1000+ aya (Days 6 or less)
- The difference of word counts at each day is minimal
This is basically a https://en.wikipedia.org/wiki/Multiway_number_partitioning Problem (NP-hard)
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://unpkg.com/treeflex/dist/css/treeflex.css">
<link href='https://fonts.googleapis.com/css?family=Amiri' rel='stylesheet'>
<style>
body {
padding: 2rem 2rem 1rem;
font-family: 'Amiri', Helvetica, Arial, sans-serif;
display: flex;
#!/bin/bash
#
# Add 1-Sec silent video with filename as a label
# This ensures the thumbnail has the filename included
#
# Parameters:
# - EXT: Video files extension
# - OFFSET: X,Y offset of the label
# - FPS: Frames per second, get by ffmpeg -i <file.ext>
# - SECONDS: Extra video length with Label
@tarekeldeeb
tarekeldeeb / removeArabicDialects.sh
Last active June 21, 2022 17:05
Bash Script to Remove Arabic Dialects from UTF-8 or Windows-1256 / iso-8859-1 Encoding
# Bash Script to Remove Arabic Dialects from UTF-8 or Windows-1256 / iso-8859-1 Encoding
# - Converts arabic commas to latin comma
# - Remove Dialect symbols
# - Remove running spaces with a single
# - Replace Alif-with-hamza with Alif
#
# Example: removeArabicDialects my_utf8.txt > clear.txt
# Install: Copy this gist into your ~/.bashrc
# Author: Tarek Eldeeb
#
@tarekeldeeb
tarekeldeeb / fetch_throttled.js
Last active March 22, 2020 12:17
Javascript Apply thread throttle to fetch() of URL Array without any library
/*
* Adapted from: https://stackoverflow.com/questions/38385419/throttle-amount-of-promises-open-at-a-given-time
*/
/**
* Performs a list of callable fetch actions (promise factories) so that only a limited
* number of promises are pending at any given time.
*
* @param listOfCallableActions An array of callable functions, which should return promises.
* @param limit The maximum number of promises to have pending at once.