Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=Pentho Bi-server
After=syslog.target
After=network.target 
[Service]
Type=forking
User=<username>
Group=<group>
Environment=JAVA_HOME
select
CASE
WHEN '432432' in (select unnest(string_to_array( '432432,545345' , ','))) THEN 'yes'
else 'nada'
END
#!/bin/bash
case $1 in
on)
sudo modprobe psmouse
;;
off)
sudo modprobe -r psmouse
;;
*)
echo "require params"

Idempiere Change

path example

/opt/Apps/idempiere-server-8.1.2/jettyhome/work/jetty-0_0_0_0-8445-org_adempiere_ui_zk_8_2_0_202112110706_jar-_webui-any-/webapp/WEB-INF

sudo nano zk.xml

comentar

Pull image

docker pull idempiereofficial/idempiere

Deploy Container

docker run -d --name idempiere -p 8080:8080 --network bridge -e DB_HOST=127.0.0.1 -e DB_PORT=5432 -e DB_NAME=idempiere -e DB_USER=adempiere -e DB_PASS=adempiere -e DB_ADMIN_PASS=postgres idempiereofficial/idempiere:8.2

@dev-armando
dev-armando / env-example-pentaho.sh
Last active December 3, 2021 19:46
Example env PDI
# PENTAHO ENV EXAMPLE IN ~/.bashrc
export PENTAHO_JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
select * from fact_acct fa where ad_table_id = 473;
-- 473
delete from fact_acct where ad_table_id = 473 ;
# temporarily disable SELinux run
sudo setenforce 0
# disabled SELinux
sudo /etc/selinux/config
# Add file /etc/selinux/config
SELINUX=disabled
nano /etc/systemd/system/idempiere.service
-----------------------------------
[Unit]
Description=Description for sample script goes here
After=local-fs.target
[Service]
@dev-armando
dev-armando / fromBase64ToImg.php
Created November 2, 2021 04:57
Transformar imagen base64 a un archivo
<?php
function fromBase64ToImg($imgBase64 , $dir , $name_file ){
$pattern = '/data:image\/(.+);base64,(.*)/';
preg_match($pattern, $imgBase64, $matches);
$imageExtension = $matches[1];
$encodedImageData = $matches[2];