Skip to content

Instantly share code, notes, and snippets.

@chewwt
chewwt / pyenv_offline_setup.md
Created June 7, 2022 08:00
pyenv offline setup

Pyenv Offline Setup

  1. Download and transfer pyenv
  2. Extract pyenv-x.x.x.tar.gz into ~/.pyenv
  3. Add into ~/.zshrc and source
    export PATH=/home/user/.pyenv/bin:$PATH
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
  4. Download and transfer desired python-3.x.x
@chewwt
chewwt / i3-gaps.sh
Last active November 6, 2024 10:44 — forked from dabroder/i3-gaps.sh
Install i3-gaps on ubuntu 20.04
#!/bin/bash
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev libxcb-xrm-dev
cd /tmp
# clone the repository
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
# compile & install
@chewwt
chewwt / compile_boost_from_source.md
Last active August 31, 2020 10:21
Compile boost from source

Compile Boost from source

For linking libboost-python to the correct python. Apt installation uses system python.

Switch to the desired pyenv

Get python headers path using python-config --includes --libs and add the path in ~/.zshrc:

export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:/home/ruth/.pyenv/versions/3.6.12/include/python3.6m"
@chewwt
chewwt / python3_venv_setup.md
Last active October 2, 2022 05:25
python3 venv setup

Setting up virtual environments with different python versions (Latest)

Tested with Ubuntu 22.04

0. If there is no python2 on system

Link command python to python3, or pyenv will not be able to detect system version.

sudo ln -s /usr/bin/python3 /usr/bin/python

1. Install pyenv

@chewwt
chewwt / gdal_ubuntu_20.md
Created August 27, 2020 11:23
gdal for ubuntu 20.04 with python virtual env

Installing GDAL for Ubuntu 20.04

No need to add ppa anymore

sudo apt install gdal-bin libgdal-dev
workon <env>
pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`
@chewwt
chewwt / chat.msg
Last active August 21, 2018 07:14 — forked from spaghetti-/chat.msg
std_msgs/Header header
std_msgs/String source_id
std_msgs/String message