Hello, welcome to my blog containing some computer tips and experiments.
Wasit Limprasert
วสิศ ลิ้มประเสริฐ
YouTube
| GitHub
| Publications
Friday, 27 October 2017
Sunday, 1 October 2017
Jupyter Latex in Thai
\usepackage[thai]{babel}
- https://www.ctan.org/tex-archive/language/thai/thailatex
- https://github.com/jgm/pandoc/releases/tag/1.19.2.1
Monday, 28 August 2017
openvpn note
docker
server
https://github.com/kylemanna/docker-openvpn
client
https://askubuntu.com/questions/229800/how-to-auto-start-openvpn-client-on-ubuntu-cli
openvpn client config
1. create a config file from server [uname].ovpn
2. rename and save to $ cat /etc/openvpn/[uname].conf
OPTARGS=""
OMIT_SENDSIGS=0
curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh
server
https://github.com/kylemanna/docker-openvpn
client
https://askubuntu.com/questions/229800/how-to-auto-start-openvpn-client-on-ubuntu-cli
openvpn client config
1. create a config file from server [uname].ovpn
2. rename and save to $ cat /etc/openvpn/[uname].conf
3. edit /etc/default/openvpn to
AUTOSTART="all"OPTARGS=""
OMIT_SENDSIGS=0
Tuesday, 11 July 2017
set up Jupyter on Ubuntu
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install python-pip
pip install --upgrade pip
install jupyter
jupyter notebook --no-browser --port 8888 --ip='*'
sudo apt-get install python-pip
pip install --upgrade pip
install jupyter
jupyter notebook --no-browser --port 8888 --ip='*'
Thursday, 11 May 2017
simple Django deployment on Digital Ocean
This is a basic deployment, installing all packages. I next time I should use docker compose. The simple deployment are following steps:
- create a Droplet from original Ubuntu 16.04
- sudo apt-get update
- sudo apt-get install build-essential libssl-dev libffi-dev python-dev
- sudo apt-get -y install python-pip
Sunday, 9 April 2017

แนะนำ database MariaDB (แมวน้ำ) เปรียบที่ยบเทียบประสิทธิภาพและนโยบายแล้วระหว่างค่ายหมอดูหรือช้างแล้ว แนะนำแมวน้ำคับ สามารถต่อ cluster ได้ด้วย galera cluster ค่ายใหญ่เช่น google facebook สนับสนุนแมวน้ำตั้งแต่ช่วง 2013 ชุมชนของค่ายแมวน้ำดูแข็งแรงและมีการพัฒนาต่อเนื่องทั้งใน github และ event network ต่างๆ
Monday, 13 March 2017
lambda testing
please check github
create EC2 for package preparation
sudo apt-get update
sudo apt-get install python-pip python-dev build-essential
pip install --upgrade pip
pip install virtualenv
-----------init.sh---------
virtualenv env
source env/bin/activate
pip install -r requirements.txt
cd $VIRTUAL_ENV/lib64/python2.7/site-packages
zip -r9 ~/lambda.zip *
cd $VIRTUAL_ENV/..
zip -g ~/lambda.zip main.py
-----------requirements.txt---------
numpy==1.12.0
-----------requirements.txt---------
import numpy as np
def myfunction(event=None, context=None):
mylist=[
'My name is Wasit', 'Rule the world!!',
'get data, process and turn on the switch',
'get data and predict your future', 'keep coding',
]
return np.random.randint(0, len(mylist))
if __name__ == "__main__":
print myfunction()
create EC2 for package preparation
sudo apt-get update
sudo apt-get install python-pip python-dev build-essential
pip install --upgrade pip
pip install virtualenv
-----------init.sh---------
virtualenv env
source env/bin/activate
pip install -r requirements.txt
cd $VIRTUAL_ENV/lib/python2.7/site-packages
zip -r9 ~/lambda.zip *cd $VIRTUAL_ENV/lib64/python2.7/site-packages
zip -r9 ~/lambda.zip *
cd $VIRTUAL_ENV/..
zip -g ~/lambda.zip main.py
-----------requirements.txt---------
numpy==1.12.0
-----------requirements.txt---------
import numpy as np
def myfunction(event=None, context=None):
mylist=[
'My name is Wasit', 'Rule the world!!',
'get data, process and turn on the switch',
'get data and predict your future', 'keep coding',
]
return np.random.randint(0, len(mylist))
if __name__ == "__main__":
print myfunction()
Subscribe to:
Posts (Atom)