Skip to content

Instantly share code, notes, and snippets.

View Kazhuu's full-sized avatar
🔬
Leaning new things

Mauri Mustonen Kazhuu

🔬
Leaning new things
View GitHub Profile

Create workdirectory first where you run the pdamin. Then give it proper permissions

sudo chown -R 5050:5050 .

Then run pgadmin with

docker pull dpage/pgadmin4
run --network=host \
 -v ./:/var/lib/pgadmin
@Kazhuu
Kazhuu / gist:dec7eaf2f495dfa0bdb47107cc7acba6
Last active October 22, 2023 07:15
Run pgadmin4 form docker connecting to host machine database
# Create workdirectory first where you run the pdamin. Then give it proper permissions
```
sudo chown -R 5050:5050 .
```
Then run pgadmin with
```
docker pull dpage/pgadmin4
run --network=host \
-e 'PGADMIN_DEFAULT_EMAIL=postgres@test.com' \
@Kazhuu
Kazhuu / llvm-rv-cmake-debug-generate-command
Last active October 19, 2020 12:48
LLVM + RV CMake generate command
# To add RV support and options check: https://github.com/cdl-saarland/rv
# Clone RV to root of the LLVM monorepo. Make a build dir and run following CMake command in it.
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:PATH=~/local/llvm/ \
-DLLVM_TARGETS_TO_BUILD:STRING=X86 -DLLVM_ENABLE_PROJECTS:STRING="clang" \
-DLLVM_USE_LINKER:STRING="gold" -DLLVM_CCACHE_BUILD:BOOL=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBUILD_SHARED_LIBS:BOOL=ON -DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON -DLLVM_CCACHE_DIR:PATH=./ccache/ \
-DLLVM_ENABLE_RTTI:BOOL=ON \
-DLLVM_EXTERNAL_PROJECTS="rv" -DLLVM_EXTERNAL_RV_SOURCE_DIR=../rv -DRV_ENABLE_CRT:BOOL=ON \
-DLLVM_RVPLUG_LINK_INTO_TOOLS:BOOL=ON -DRV_DEBUG:BOOL=ON -DRV_TARGETS_TO_BUILD:STRING="clang" \
@Kazhuu
Kazhuu / pocl-cmake-generate-command.sh
Last active May 12, 2021 09:01
pocl-develop-cmake-generate-command
# CMake generate command for pocl development using localy compiled LLVM.
# For more details check http://portablecl.org/docs/html/install.html
# Pocl will automatically notice if LLVM have been built as a single shared library or not.
# Modify DWITH_LLVM_CONFIG to your local LLVM install folder and remove if system LLVM is used.
# Note: Use LLVM install folder, not build folder!
# If you want to enable Intel Threading Blocks (TBB) device alongside with default pthread
# device then also pass -DENABLE_TBB_DEVICE:BOOL=ON option as well. Make sure TBB is installed.
cmake -G Ninja \
@Kazhuu
Kazhuu / llvm-cmake-generate-command.sh
Last active February 9, 2021 21:21
LLVM developer cmake generate command for fast build times
# LLVM debug build CMake generate command to have fast LLVM build times!
# This will build all LLVM components as shared libraries and not combine
# them to single big target.
# Run following before running CMake if llvm should be compiled with clang instead of gcc.
export CXX=clang++
export CC=clang
# Execute in build the directory 'llvm-project/build'
# Notice install directory and ccache directory!