Skip to content

Instantly share code, notes, and snippets.

@jpp-odoo
jpp-odoo / odoo_server_apple_ARM-based.md
Last active May 13, 2024 09:45
Config Odoo Server on an apple arm based computers (M1 and M2)

Introduction

There is an issue with the python library lxml on apple when parsing an XML file containing emojis, on Odoo this will arrive when trying to install some modules as Project or Knowledge.

The Traceback is :

Traceback (most recent call last):
  File "/Users/odoo/src/odoo-src/odoo/odoo/tools/translate.py", line 310, in xml_translate
    root = parse_xml(value)
@regeter
regeter / Search All.sql
Last active May 13, 2024 09:43
Search All Tables, All Columns
/* Reto Egeter, fullparam.wordpress.com */
DECLARE @SearchStrTableName nvarchar(255), @SearchStrColumnName nvarchar(255), @SearchStrColumnValue nvarchar(255), @SearchStrInXML bit, @FullRowResult bit, @FullRowResultRows int
SET @SearchStrColumnValue = '%searchthis%' /* use LIKE syntax */
SET @FullRowResult = 1
SET @FullRowResultRows = 3
SET @SearchStrTableName = NULL /* NULL for all tables, uses LIKE syntax */
SET @SearchStrColumnName = NULL /* NULL for all columns, uses LIKE syntax */
SET @SearchStrInXML = 0 /* Searching XML data may be slow */
@MangelMaxime
MangelMaxime / Async.hx
Last active May 13, 2024 09:43
Demonstrate how to use native async/await from JavaScript with haxe.
package async;
#if macro
import haxe.macro.Context;
#end
class Async {
public static macro function async(expr:haxe.macro.Expr) {
expr = Context.storeTypedExpr(Context.typeExpr(expr));
return macro untyped __js__("(async {0})", ${expr})();
@Oberon00
Oberon00 / funcidx.lua
Last active May 13, 2024 09:42
Lua C API function HTML reference table data & generator (http://oberon00.github.io/lua-cfuncidx/index.html)
-- Helpers {{{1
local function fail_on_missing_tbl(t, missing_name)
missing_name = missing_name or 'table entry'
return setmetatable(t, {__index = function(t, k)
error(('No %s with key "%s" (in %s).'):format(missing_name, k, t))
end
})
end
fail_on_missing_tbl(_G, 'global');
@pulkitsinghal
pulkitsinghal / README.md
Last active May 13, 2024 09:40
How can a nodejs process running inside a docker container, get that container's id?

Problem

How can a nodejs process running inside a docker container, get that container's id?

Solution

the hostname seems to be the short container id in Docker v1.12

It works and this idea was found in this SO post.

@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 13, 2024 09:39
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@whaison
whaison / deleteEmptyAnimLayers.mel
Created September 15, 2016 12:37
///////AutoMayaBatch_CharaDir_v003.bat で動かすためにlayerEditor.melから抜粋 deleteEmptyAnimLayers.mel
///////AutoMayaBatch_CharaDir_v003.bat で動かすためにlayerEditor.melから抜粋
// Copyright (C) 1997-2014 Autodesk, Inc., and/or its licensors.
// All rights reserved.
//
// The coded instructions, statements, computer programs, and/or related
// material (collectively the "Data") in these files contain unpublished
// information proprietary to Autodesk, Inc. ("Autodesk") and/or its licensors,
// which is protected by U.S. and Canadian federal copyright law and by
// international treaties.
//
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
T3ZWQ-P2738-3FJWS-YE7HT-6NA3K
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
65Z2L-P36BY-YWJYC-TMJZL-YDZ2S
SFZHH-2Y246-Z483L-EU92B-LNYUA
GSZVS-5W4WA-T9F2E-L3XUX-68473
FTZ8A-R3CP8-AVHYW-KKRMQ-SYDLS
Q3ZWN-QWLZG-32G22-SCJXZ-9B5S4
DAZPH-G39D3-R4QY7-9PVAY-VQ6BU
KLZ5G-X37YY-65ZYN-EUSV7-WPPBS

AO Bot Deathmatch using BetterIDEa IDE

Prerequisites

  1. Must have ArConnect extension installed and a wallet setup

Steps

  1. visit https://ide.betteridea.dev and connect wallet using the bottom left connect button
@santaklouse
santaklouse / CrossOver.sh
Last active May 13, 2024 09:35
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS