Skip to content

Instantly share code, notes, and snippets.

View rvalyi's full-sized avatar

Raphaël Valyi rvalyi

View GitHub Profile
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 23, 2024 17:45
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@sbidoul
sbidoul / port-pr.py
Last active June 29, 2024 03:12
Port a PR to another branch
#!/usr/bin/python3
import json
import argparse
import os
import re
import shlex
import shutil
import subprocess
import tempfile
import textwrap
@Tardo
Tardo / atom_info.md
Last active June 4, 2019 23:26
Atom Packages & Tips

Here can found usefull packages to develop for Odoo (Python Web Dev) with Atom.

** To install packages in Atom press Control + , an go to Install section.

Packages

General

  • minimap
  • minimap-autohider
  • file-icons
  • highlight-selected
@bealdav
bealdav / odoo_untranslate_fields.py
Last active April 21, 2023 13:35
Generate Odoo class code to make fields untranslatable
""" You may want some translatable fields in your project becomes untranslatable
Here is how to produce code
Note: to be executed with odoo shell
"""
print('\n'.join(
["\n\nclass %s(models.Model):\n\t_inherit = '%s'\n\t%s = fields.%s(translate=False)" % (
x.model.replace('.', ' ').title().replace(' ', ''), x.model, x['name'], x.ttype.capitalize())
@lasley
lasley / odoo-runbot-rancher-compose.yml
Created October 12, 2017 16:55
Odoo Runbot Rancher Compose
version: '2'
services:
cron:
scale: 1
start_on_create: true
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 8069
unhealthy_threshold: 60
@revolunet
revolunet / python-es6-comparison.md
Last active April 22, 2024 19:22
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@egerlach
egerlach / update-dokku-stack.sh
Last active December 22, 2022 03:24
Update stack underlying apps running on dokku
#!/bin/bash
# before you can use this, you need to run (as root):
# git clone https://github.com/tt/stack-images.git /root/stack-images
# git clone https://github.com/gliderlabs/herokuish.git /root/herokuish
# First, we need to get our base ubuntu images up to date
docker pull ubuntu-debootstrap:14.04
docker pull ubuntu:trusty # for postgresql
@ellmetha
ellmetha / gist:a17a824ac593de4aa386
Created December 16, 2014 08:52
PostgreSQL DB on a ramfs tablespace
#!/bin/sh
sudo mount -t ramfs none /mnt/
sudo mkdir /mnt/pgdata/
sudo chown postgres:postgres /mnt/pgdata/
sudo service postgresql start
psql -d postgres -c "CREATE TABLESPACE ramfs LOCATION '/mnt/pgdata'"
psql -d postgres -c "CREATE DATABASE testdb TABLESPACE ramfs"
@sloria
sloria / bobp-python.md
Last active July 21, 2024 04:44
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens

Bootstrap OpenERP 6.1 or 7.0

This repository contains a zc.buildout bundle to install and configure OpenERP and some related tools on Debian or Ubuntu. This is tested on Debian Squeeze.

Features:

  • install and configure OpenERP 6.1 or 7.0 (using anybox.recipe.openerp)
  • install and configure supervisor