Skip to content

Instantly share code, notes, and snippets.

@rlan
rlan / set_unix_shell_language.md
Last active May 12, 2018 02:55
Set Unix shell language to English (or to other languages)

Problem: shell language is not in English

$ hello
-bash: hello: コマンドが見つかりません

Solution: Add this to

export LANG="en_US.ISO-8859-1"

@rlan
rlan / automatic_ssh_login.md
Last active April 11, 2019 01:33
Automatic ssh login

How to securely and automaticaly login via ssh without typing password

  1. On the server, e.g. server, create a .ssh folder:
mkdir -p ~/.ssh
  1. On your client, generate a SSH key pair (ie public key, id_rsa.pub, and private key, id_rsa):

How to launch jupyter in a docker image:

jupyter notebook --no-browser --ip=0.0.0.0 --allow-root

or jupyter lab:

jupyter lab --no-browser --ip=0.0.0.0 --allow-root

@rlan
rlan / matplotlib_nongui_docker.md
Created May 23, 2018 04:01
Matplotlib on non-GUI docker image
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt

print(matplotlib.get_backend())

plt.plot(range(10))

plt.savefig('test.png')