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
- :cd path
- :pushd path / popd
- :dirs
File Operation
key | operation | note |
---|---|---|
yy | yank | |
p | paste | copy |
P | paste | move |
dd | delete | |
cw | change word | rename |
cW | change word | change only name of file without extention |
// --- end of blog
1807-ubuntu-extentions-installed
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' with 'Digital sheet on text file.'
Reference
- cheat sheet
http://people.duke.edu/~dgraham/etm/help/cheatsheet.pdf
Cheat sheet
prefix | item |
---|---|
- | Task |
* | Event |
~ | Action |
^ | Occation |
$ | In Basket |
! | Note |
? | Someday |
~ Action: a record of time and/or money spent. * Event: happens on a particular date and time. ^ Occasion: happens on a particular date, e.g., a holi‐ day, anniversary or birthday. ! Note: a record of some useful information. - Task: something that needs to be done. % Delegated task: a task assigned to someone else. + Task group: a group of related tasks, some of which may be prerequisites for others. $ Inbasket: quick entry to be edited later when time per‐ mits. ? Someday maybe: remember but don't show in the common views. # Hidden: remember but hide from all etm views except path view. = Defaults: set default options for subsequent entries in the same data file.
+ dog house @j pickup lumber and paint &q 1 @j cut pieces &q 2 @j assemble &q 3 @j paint &q 4
sample
- Event : to begin with '*'
- example : A meeting (an event) @[s]tarting seven days from today at 9:00am and @[e]xtending for one hour with a default @[a]lert 5 minutes before the start @[t]ag business :
* All members meeting @s +7 9a @e 1h @a 5 @t business
- example : A meeting with another [a]lert 2 days before the meeting to (e)mail a reminder to a list of recipients:
* sales meeting @s +7 9a @e 1h @a 5 @a 2d: e; who@when.com, what@where.org
- Prepare a report (a task) for the sales meeting @[b]eginning 3 days early:
- prepare report @s +7 @b 3
- A period @[e]xtending 35 minutes (an action) spent working on the report yesterday:
~ report preparation @s -1 @e 35
- Event : To start with '-'
- Get a haircut (a task) on the 24th of the current month and then @[r]epeatedly at (d)aily [i]ntervals of (14) days and, @[o]n completion, (r)estart from the completion date:
- get haircut @s 24 @r d &i 14 @o r
- Occation : To start with '^'
- Payday (an occasion) on the last week day of each month. The &s -1 part of the entry extracts the last date which is both a weekday and falls within the last three days of the month):
^ payday @s 1/1 @r m &w MO, TU, WE, TH, FR &m -1, -2, -3 &s -1
- Take a prescribed medication daily (a reminder) [s]tarting today and [r]epeating (d)aily at [h]ours 10am, 2pm, 6pm and 10pm [u]ntil (12am on) the fourth day from today. Trigger the default [a]lert zero minutes before each reminder:
* take Rx @s +0 @r d &h 10, 14, 18, 22 &u +4 @a 0
- Move the water sprinkler (a reminder) every thirty mi[n]utes on Sunday afternoons using the default alert zero minutes before each reminder:
* Move sprinkler @s 1 @r n &i 30 &w SU &h 14, 15, 16, 17 @a 0
To limit the sprinkler movement reminders to the [M]onths of April through September each year, append &M 4, 5, 6, 7, 8, 9 to the @r entry.
- Presidential election day (an occasion) every four years on the first Tuesday after a Monday in November:
^ Presidential Election Day @s 2012-11-06 @r y &i 4 &M 11 &m 2, 3, 4, 5, 6, 7, 8 &w TU
- Join the etm discussion group (a task) [s]tarting on the first day of the next month. Because of the @g (goto) link, pressing Ctrl-G when the details of this item are displayed in the gui would open the link using the system default application which, in this case, would be your default browser:
- join the etm discussion group @s +1/1 @g http://groups.google.com/group/eventandtaskmanager/topics
// --- end of blog
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 | Browser | firefox |
win+2 | Filer | nautilus |
win+3 | Terminal | terminal|ctrl+alt+t |
win+4 | mailer and calendar | evolution |
win+5 | chrome apps | |
win+6 | urls | simplenote |
win+7 | diary | journey |
win+8 | markdown | joplin |
win+9 | tweet | corebird |
win+0 | chat | slack |
win+L | log out | |
win+v | view calendar |
Window navigation
operation | function | note |
---|---|---|
win+up | maximize | |
win+h | minimize | |
win+d | Display desktop | |
win+right | right | |
win+left | left | |
ctrl+alt+down | workspace change | |
ctrl+alt+up | workspace change |
// --- end of markdown
1807-wsl-timezone-setting
Overview
reference
- WSL その13 - タイムゾーンを日本に設定する
Contents
set timezone
sakai@eX:~$ date Fri Jul 13 16:24:09 DST 2018 sakai@eX:~$ sudo dpkg-reconfigure tzdata [sudo] password for sakai: Current default time zone: 'Asia/Tokyo' Local time is now: Fri Jul 13 16:25:15 JST 2018. Universal Time is now: Fri Jul 13 07:25:15 UTC 2018. sakai@eX:~$ date Fri Jul 13 16:26:20 JST 2018
// --- end of markdown
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 [ ? ] cryptdisks-early [ ? ] hwclock.sh [ + ] jenkins [ ? ] plymouth [ ? ] plymouth-log
1807-WSL-environment-setting
1807-WSL-environment-setting
Overview
Target
- python / pip / virtualenv / virtualenvwrapper
- git / gibo
- jenkins
- powershell
- nginx
Procedure
1. python environment
- log in
sakai@eX:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS" sakai@eX:~$ pwd /home/sakai sakai@eX:~$ ls nginx_signing.key workspace sakai@eX:~$
- python environment
- reference
- virtualenvでpython環境を管理する
- https://qiita.com/caad1229/items/325ca5c8ad198b0ebce7
- reference
sakai@eX:~$ python3 --version Python 3.6.5 sakai@eX:~$ pip --version Command 'pip' not found, but can be installed with: sudo apt install python-pip sakai@eX:~$ sudo apt install python-pip sakai@eX:~$ pip --version pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7) sakai@eX:~$ sudo pip install virtualenv sakai@eX:~$ virtualenv --version 16.0.0 sakai@eX:~$ sudo pip install virtualenvwrapper sakai@eX:~$ whereis virtualenvwrapper virtualenvwrapper: /usr/local/bin/virtualenvwrapper.sh /mnt/g/Users/sakai/AppData/Local/Programs/Python/Python36-32/Scripts/virtualenvwrapper.bat
- /.bashrc
sakai@eX:~$ vim ~/.bashrc source /usr/local/bin/virtualenvwrapper.sh export WORKON_HOME=~/.virtualenvs export PROJECT_HOME=~/workspace/py
- operate virtualenvwrapper
sakai@eX:~$ source ./.bashrc sakai@eX:~/workspace/py$ mkproject sandbox New python executable in /home/sakai/.virtualenvs/sandbox/bin/python Installing setuptools, pip, wheel...done. virtualenvwrapper.user_scripts creating /home/sakai/.virtualenvs/sandbox/bin/predeactivate virtualenvwrapper.user_scripts creating /home/sakai/.virtualenvs/sandbox/bin/postdeactivate virtualenvwrapper.user_scripts creating /home/sakai/.virtualenvs/sandbox/bin/preactivate virtualenvwrapper.user_scripts creating /home/sakai/.virtualenvs/sandbox/bin/postactivate virtualenvwrapper.user_scripts creating /home/sakai/.virtualenvs/sandbox/bin/get_env_details Creating /home/sakai/workspace/py/sandbox Setting project for sandbox to /home/sakai/workspace/py/sandbox (sandbox) sakai@eX:~/workspace/py/sandbox$ workon sandbox (sandbox) sakai@eX:~/workspace/py/sandbox$ deactivate sakai@eX:~/workspace/py/sandbox$ ls
2. git environment
- git
sakai@eX:~/workspace/py/sandbox$ git --version git version 2.17.0
- gibo FIXME◇◇ubuntuでのgiboのインストール
- gibo: fast access to .gitignore boilerplates
- https://github.com/simonwhitaker/gibo
sakai@eX:~$ curl https://github.com/simonwhitaker/gibo/blob/master/shell-completions/gibo-completion.bash > gibo.sh sakai@eX:~$ sudo cp gibo.sh /usr/local/bin sakai@eX:~$ chmod -x /usr/local/bin/gibo.sh chmod: changing permissions of '/usr/local/bin/gibo.sh': Operation not permitted sakai@eX:~$ gibo --version : not founds/sakai/Downloads/gibo/gibo: 5: /mnt/g/Users/sakai/Downloads/gibo/gibo: : not founds/sakai/Downloads/gibo/gibo: 10: /mnt/g/Users/sakai/Downloads/gibo/gibo: gibo 1.0.6 by Simon Whitaker <sw@netcetera.org> https://github.com/simonwhitaker/gibo
- git sample operation
sakai@eX:~/workspace/py/sandbox$ git init Initialized empty Git repository in /home/sakai/workspace/py/sandbox/.git/ sakai@eX:~/workspace/py/sandbox$ echo "" > README.md sakai@eX:~/workspace/py/sandbox$ git add . sakai@eX:~/workspace/py/sandbox$ git status sakai@eX:~/workspace/py/sandbox$ git commit -m 'first commit' *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <sakai@eX.localdomain>) not allowed sakai@eX:~/workspace/py/sandbox$ git config --global user.email "sakai.memoru@gmail.com" sakai@eX:~/workspace/py/sandbox$ git config --global user.name "memoru" sakai@eX:~/workspace/py/sandbox$ git config --list user.email=sakai.memoru@gmail.com user.name=memoru core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true sakai@eX:~/workspace/py/sandbox$ git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: README.md sakai@eX:~/workspace/py/sandbox$ git commit -m 'first commit' [master (root-commit) 91f2e58] first commit 1 file changed, 5 insertions(+) create mode 100644 README.md sakai@eX:~/workspace/py/sandbox$ vim README.md sakai@eX:~/workspace/py/sandbox$ git diff HEAD diff --git a/README.md b/README.md index d1cd81a..33b84de 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # {{title}} +## overview +- python workspace on sandbox // --- end of markdown sakai@eX:~/workspace/py/sandbox$
3. node environment
reference
- How To Install Node.js on Ubuntu 18.04
- https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-18-04
FIXME◇◇NODEを最新にする
sakai@eX:~/workspace/py/sandbox$ sudo apt update sakai@eX:~/workspace/py/sandbox$ sudo apt install nodejs sakai@eX:~/workspace/py/sandbox$ sudo apt install npm sakai@eX:~/workspace/py/sandbox$ nodejs --version v8.10.0 sakai@eX:~/workspace/py/sandbox$ npm --version 3.5.2 sakai@eX:~/workspace/py/sandbox$
4. java 8 and jenkins installation
reference
- How to install Java on Ubuntu 18.04 Bionic Beaver Linux
- https://linuxconfig.org/how-to-install-java-on-ubuntu-18-04-bionic-beaver-linux
java 8
sakai@eX:~/workspace/py/sandbox$ sudo apt install openjdk-8-jdk sakai@eX:~/workspace/py/sandbox$ java -version openjdk version "1.8.0_171"
- jenkins
- reference
- Installing Jenkins on Ubuntu
- https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu
- [Jenkins][Ubuntu] UbuntuにJenkinsをインストール
- https://qiita.com/koara-local/items/268dab580346fcef59b5
- reference
sakai@eX:~$ wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key > jenkins-ci.org.key sakai@eX:~$ ls jenkins-ci.org.key nginx_signing.key workspace sakai@eX:~$ sudo apt-key add jenkins-ci.org.key OK sakai@eX:~$ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' sakai@eX:~$ sudo apt-get update sakai@eX:~$ sudo apt-get install jenkins sakai@eX:~$ sudo service --status-all | grep jenkins [ ? ] apport [ ? ] cryptdisks [ ? ] cryptdisks-early [ ? ] hwclock.sh [ ? ] jenkins [ ? ] plymouth [ ? ] plymouth-log sakai@eX:~$ sudo vim /etc/default/jenkins HTTP_PORT=8083 sakai@eX:~$ cd /etc/init.d sakai@eX:/etc/init.d$ ls | grep jenkins jenkins sakai@eX:/etc/init.d$ sudo service jenkins enabled Correct java version found Usage: /etc/init.d/jenkins {start|stop|status|restart|force-reload} sakai@eX:/etc/init.d$ sudo service jenkins start Correct java version found * Starting Jenkins Automation Server jenkins [ OK ] sakai@eX:/etc/init.d$ sudo service --status-all | grep jenkins [ ? ] apport [ ? ] cryptdisks [ ? ] cryptdisks-early [ ? ] hwclock.sh [ + ] jenkins [ ? ] plymouth [ ? ] plymouth-log sakai@eX:/etc/init.d$ sakai@eX:/etc/init.d$ curl http://127.0.0.1:8083 <html><head><meta http-equiv='refresh' content='1;url=/login?from=%2F'/><script>window.location.replace('/login?from=%2F');</script></head><body style='background-color:white; color:white;'> Authentication required <!-- You are authenticated as: anonymous Groups that you are in: Permission you need to have (but didn't): hudson.model.Hudson.Administer --> </body></html>
sakai@eX:/etc/init.d$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword 357c7bf2fb4b42bab09975f0c6a5ecd7 sakai@eX:/etc/init.d$
5. powershell
- reference
sakai@eX:~$ wget http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu57_57.1-6ubuntu0.3_amd64.deb sakai@eX:~$ wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.2/powershell_6.0.2-1.ubuntu.18.04_amd64.deb sakai@eX:~$ dpkg-deb --raw-extract powershell_6.0.2-1.ubuntu.17.04_amd64.deb pwsh-patched sakai@eX:~$ sed --in-place 's/curl13/curl14/g' pwsh-patched/DEBIAN/control sakai@eX:~$ dpkg-deb --build pwsh-patched powershell-patched_6.0.2-1.ubuntu.18.04_amd64.deb sakai@eX:~$ sudo apt install -f ./libicu57_57.1-6ubuntu0.3_amd64.deb sakai@eX:~$ sudo apt install -f ./powershell-patched_6.0.2-1.ubuntu.18.04_amd64.deb sakai@eX:~$ pwsh PowerShell v6.0.2 Copyright (c) Microsoft Corporation. All rights reserved. https://aka.ms/pscore6-docs Type 'help' to get help. PS /home/sakai> $PSVersionTable Name Value ---- ----- PSVersion 6.0.2 PSEdition Core GitCommitId v6.0.2 OS Linux 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22... Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
// --- end of markdown