1808-wsl-git-configuration-and-conda-configuration

1808-wsl-git-configuration-and-conda-configuration environment variables sakai@eX:~$ env | grep HOME HOME=/mnt/g/wsl_home/sakai PROJECT_HOME=/mnt/g/workspace/py git config sakai@eX:/mnt/g/workspace/py/importjson$ git config --global user.n…

1808-wsl-install-command-line-tools

1808-wsl-install-command-line-tools Overview Tools that I have checked this summer Contents 1. googler reference itsfoss.com installation sakai@eX:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DIST…

1808-clipboard-from-wsl-to-windows

get text from wsl to windows clipboard Overview To get text data by using clip.exe on windows Procedure sakai@eX:~$ ls -la | clip.exe

1808-enable-sshd-and-connect-teraterm

1808 Enable sshd and connect with teraterm Overview Connect WSL terminal with teraterm Procedure Edit /etc/ssh/sshd_config to modify port 22 into other port. sakai@eX:~$ sudo vim /etc/ssh/sshd_config # Port 22222 ###<<port 22でも接続可能…

1808-enabled-locate-command-on-wsl

wsl

How to enable locate command on wsl Overview To enable "locate" on wsl Procedure $ sudo chgrp mlocate /usr/bin/mlocate $ sudo chmod g+s /usr/bin/mlocate $ sudo updated & $ locate nginx.conf // --- end of blog

1807-command-line-filer-vifm

How to use vifm tool on command line overview usage for vifm Reference https://wiki.vifm.info/index.php?title=Quickstart_Tutorial Execution mitsuru@dell:~$ vifm ~/Documents/ ~/Desktop/ Quiting ZZ :q Shell-like navigation via command line :…

1807-ubuntu-extentions-installed

installed ubuntu extentions overview I began using ubuntu pc mainly, then jot down that I have installed gnome extentions into my pc. list Datetime format Gno-menu All windows Place status indicator Shutdown button View / Menu / Apps -- Gn…

ubuntu apps : Events and Tasks manager

Ubuntu Apps : Event and Tasks management on text file overview Use apps for task management with text file. I have started using this apps and this article is for beginners to understand 'ETM'. This tool can be realized for 'Dot Journaling…

1807-ubuntu-shortcut

1807-ubuntu-shortcut Overview list up ubuntu 18.04 shortcut's operation Contents Switcher operation function note win activities win+a application center win+s application switcher win+tab Switcher alt+tab operation function note win+1 Bro…

1807-wsl-timezone-setting

wsl

Overview reference WSL その13 - タイムゾーンを日本に設定する https://kledgeb.blogspot.com/2016/05/wsl-13.html Contents set timezone sakai@eX:~$ date Fri Jul 13 16:24:09 DST 2018 sakai@eX:~$ sudo dpkg-reconfigure tzdata [sudo] password for …

1807-jenkins-start

1807-jenkins-start on wsl sakai@eX:~$ sudo service jenkins start Correct java version found * Starting Jenkins Automation Server jenkins [ OK ] sakai@eX:~$ sudo service --status-all | grep jenkins [ ? ] apport [ ? ] cryptdisks [ ? ] cryptd…

1807-WSL-environment-setting

1807-WSL-environment-setting Overview Windows Subsystem on Linux (WSL)で環境を構築する。 Target python / pip / virtualenv / virtualenvwrapper git / gibo jenkins powershell nginx Procedure 1. python environment log in sakai@eX:~$ cat /etc/l…

nginx.conf

nginx.conf (base) user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_node…

confirm nginx processing

On WSL NGINX installation sakai@eX:~$ pwd /home/sakai sakai@eX:~$ wget -q http://nginx.org/keys/nginx_signing.key sakai@eX:~$ ls nginx_signing.key sakai@eX:~$ sudo apt-key add nginx_signing.key OK sakai@eX:~$ sudo apt-get update : : Fetche…

Explorer -> Powershell

Procedure Explorer ctrl+L powershell

watchdog

tree /f PS G:\workspace\py\sandbox\watchdog_sample> tree /f Folder PATH listing for volume Users Volume serial number is 04A1-7D2F G:. │ app.py │ apps.log │ configbase.py │ logging_debug.conf │ watchdog_sample.py │ ├─configs │ │ config.py …

json.dump

json_sample.py #! /usr/bin/env python """{fname} # sample code for csv Usage: """ __author__ = 'Memoru' __version__ = '0.0.1' __date__ = '2018-06-26' import sys import os __doc__ = __doc__.format(fname=os.path.basename(__file__)) import js…

csv

csv_sample.py #! /usr/bin/env python """{fname} # sample code for csv Usage: """ __author__ = 'Memoru' __version__ = '0.0.1' __date__ = '2018-06-26' import sys import os __doc__ = __doc__.format(fname=os.path.basename(__file__)) import csv…

unittest

unittest unittest.main()は、unittest.TestCaseを継承した全てのクラスのメソッドのうちtestで始まるテストをテストケースとして実行する。 import unittest import calc from add_sample import add class TestCalc(unittest.TestCase): def test_add2(sel…

shuitl

(sandbox) PS G:\workspace\py\sandbox\standards> python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import shutil >>…

method on dict

(sandbox) PS G:\workspace\py\sandbox\standards> python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> dir({}) ['__clas…

method for array

(sandbox) PS G:\workspace\py\sandbox\standards> python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> dir([]) ['__add_…

method of string

(sandbox) PS G:\workspace\py\sandbox\standards> python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> dir('') >>> for …

workon

Before coding , first check the environment on PC. PS G: > $Env:PROJECT_HOME G:\workspace\py PS G: > $Env:WORKON_HOME G:\env\py PS G: >cd $Env:PROJECT_HOME PS G:\workspace\py> workon Pass a name to activate one of the following virtualenvs:…

django-admin startapp

procedure (djanbox) PS G:\workspace\py\djanbox> django-admin --version 2.0.6 (djanbox) PS G:\workspace\py\djanbox> explorer . (djanbox) PS G:\workspace\py\djanbox> (djanbox) PS G:\workspace\py\djanbox> django-admin startapp upload (djanbox…

start working on virtualenvwrapper

procedure PS G:\Users\sakai> cd $Env:PROJECT_HOME PS G:\workspace\py> workon Pass a name to activate one of the following virtualenvs: ============================================================================== djanbox djfirst djfourth …

inspect.stack()

inspect.stack() # ----------------------------------------- # def _get_funcname(): return inspect.stack()[1][3] def sample(): logger = logging.getLogger(__name__) logger.debug('begin ------> {}()'.format(sys._getframe().f_code.co_name)) lo…

os.path

os.path def _sample(): logger = logging.getLogger(__name__) logger.debug('__file__ name : {}'.format(__file__)) logger.debug('basename : {basename}'.format(basename=os.path.basename(__file__))) logger.debug('dirname : {dirname}'.format(dir…

PROJECT_HOMEを開く

G:> explorer $Env:PROJECT_HOME

workon

sourcetreeで、project_homeを、Explorerで開き、activateして、projectフォルダに戻る。 $p= $PWD.Path.split("\")[-1] cd $Env:workon_home\$p .\Scripts\activate cd $Env:project_home\$p // --- end of blog