Skip to content

Instantly share code, notes, and snippets.

View igorzg's full-sized avatar
🎯
Focusing

igorzg igorzg

🎯
Focusing
View GitHub Profile
@igorzg
igorzg / dynamodb-json-mapper.js
Last active October 27, 2022 15:06
Dynamo db json re mapper
/**
MIT License
Copyright (c) 2016 Igor Ivanovic
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@igorzg
igorzg / sbt-install-ubuntu.sh
Created December 12, 2016 13:59
Sbt install on ubuntu
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt
@igorzg
igorzg / ubuntu-14.04.LTS-docker-install.sh
Last active December 12, 2016 13:58
Install docker on ubuntu 14.04 LTS
apt-get update
apt-get dist-upgrade -y
apt-get install linux-image-extra-$(uname -r)
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update -y
apt-get install docker-engine
@igorzg
igorzg / gist:112dd5f20f7fac276f435b65eb57fbec
Last active September 4, 2016 12:03
Bash on windows update to 16.04
# Upgrade all the packages to the latest versions
aptitude update
aptitude full-upgrade -y
# Update our sources, save the original as /etc/apt/sources.list.ORIG
# This step is REQUIRED, otherwise the instructions below will not upgrade a
# single package.
sed -i.ORIG 's/trusty/xenial/g' /etc/apt/sources.list
# Backup the /etc/apt/sources.list.d/ folder and create an empty one.
@igorzg
igorzg / hibernate43_JTA_CMT.md
Last active January 16, 2017 13:30
Multitenancy, Hibernate 4.3, Wildfly 9, Hikaricp autocommit mode false with ejb3 JTA container managed transactions and dao

We are using hibernate 4.3 multiTenancy, hikaricp connection provider:

  <property name="hibernate.multiTenancy" value="DATABASE"/>
  <property name="hibernate.multi_tenant_connection_provider" value="multitenancy.HikariTenantConnectionProvider"/>
  <property name="hibernate.tenant_identifier_resolver" value="multitenancy.ThreadLocalIdentifierResolver"/> 

In all cases we want that container is managing our transactions using java ee ejb standard.

PROBLEMS:

# downgrade to php5.4 first
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable -y
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5
# install ajenti
wget -O- https://raw.github.com/Eugeny/ajenti/master/scripts/install-ubuntu.sh | sudo sh