-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-my-HOME.html
153 lines (115 loc) · 13.3 KB
/
post-my-HOME.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My computer $HOME</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Sidebar is loaded dynamically -->
<div id="sidebar"></div>
<div id="content">
<h1>My computer $HOME</h1>
<p>I spend most of my time typing into a computer, reading on the computer screen, watching videos or listening to audio playing on a computer, talking and seeing other people through a computer screen. I mostly live in the text world of a terminal <a href="https://gnome-terminator.org/">emulator</a>, <a href="https://www.gnu.org/software/bash/">bash</a> command line and the <a href="https://www.vim.org/">vim editor</a>, with <a href="https://www.mozilla.org/en-GB/firefox/">Firefox</a> and <a href="https://www.google.com/intl/en_uk/chrome/">Chrome</a> windows into the world.</p>
<p>Nowadays I use <a href="https://xubuntu.org">Xubuntu</a> <a href="https://ubuntu.com/about/release-cycle">LTS</a>, on the desktop and on my laptops. I update every 3-4 years to the new version, but other than that - it's completely uneventful. The <a href="https://www.xfce.org">Xfce</a> GUI changes only slowly if ever - and that's how I like it.</p>
<p>On the computers used by rest of the family I put Ubuntu as it's better looking. They also use Windows desktops and Macbooks for laptops. The Macbooks with the M1-M4 ARM CPU-s have spectacular battery life in addition to great screens. I am looking forward to the day when I add an <a href="https://www.perplexity.ai/search/arm-thinkpads-wtf0g0o0REahidqJVzJs5w#0">ARM Thinkpad</a> to my daily use. Have couple of <a href="https://www.reddit.com/r/thinkpad">Thinkpads</a> for the RAM I need. The RAM keeps me away from the Macbooks - otherwise I would have switched my now. Initially I had 32GB, but now that has grown to 64GB. Can't imagine to have less and would like to move to 128GB on the laptop. Have had that much on the desktop for 10 years now. That's my first need: get as much RAM as I can. And the 2nd - get as fast an SSD and better NVME as I can. My daily job involves lots of data, and keeping all data needed in memory is the best UI for me. And when not in memory - then on ssd drives and preferably nvme ones.</p>
<p>Daily I live in bash and vim mostly inside screen (the multiplexer) inside terminator (the terminal emulator). I use the shell tools, incl awk (that I like) and the rest of the gnu shell tools (grep, sed), git, gcc and g++, make, ssh, rsync, rcopy, Spyder, python, Visual Studio Editor, Cursor (AI), Firefox, Thunderbird, Chrome, Edge, Double commander, Evince, VLC player. I like them all - my life would be worse if these free software tools didn't exist. Thank you <a href="https://www.gnu.org">GNU</a> <a href="https://www.gnu.org/software/software.en.html">software</a>, thank you <a href="https://www.linuxfoundation.org">Linux</a>, thank you <a href="https://www.fsf.org">FSF</a>.</p>
<p>In my daily job I write quant trading systems and frameworks. I use mix of C/C++, Matlab in the past now octave and python with numpy (and pandas), scripting in bash, awk, plotting in gnuplot, data fetching in sql, kdb.</p>
<p>Everything that I do more then few times on the command line, I "can" it into a bash alias or function, and put in my .bashrc. In part to document and not forget. I love that command search works, I can type $ xyz then press (TAB) and bash will seek to complete for commands starting with xyz. And bash will keep cycling through the completions for as long as I keep pressing the (TAB) key.</p>
<p>I keep my dot rc files under git and that's worked without fuss. Looks like this:</p>
<pre><code>
# Keep dot files and other config in git (https://news.ycombinator.com/item?id=11070797).
# Step 1: $ git init --bare $HOME/.githome.
# Step 2: make function (rather than alias to allow for composition like $ GIT=githome gilg; change dir so paths work independent of the current dir):
githome() { (cd "$HOME" && git --git-dir="$HOME"/.githome/ --work-tree="$HOME" "$@";) }
# Step 3: disregard files by default, only track explicitly added files: $ githome config status.showUntrackedFiles no.
# Now use the usual git commands prefixed by githome: $ githome status; githome add .vimrc; githome commit -m "Add vimrc".
# Issue 1: Can not commit links. For host specific dirs, woraround: 1) move dir to dir-host; 2) link dir to dir-host; 3) add dir-host to git. Example with ~/.config dir:
# ljubomir@hostA:~$ l -d .config*
# lrwxrwxrwx 1 ljubomir ljubomir 14 Mar 24 14:26 .config -> .config-hostA/
# drwx------ 34 ljubomir ljubomir 4.0K Mar 29 12:24 .config-hostA/
# drwx------ 3 ljubomir ljubomir 4.0K Mar 24 14:52 .config-hostB/
# Issue 2: To pull from host with temporary IP edit $ vi .githome/config, change the IP below:
# [remote "hostC"]
# url = ljubomir@192.168.1.117:.githome
# fetch = +refs/heads/*:refs/remotes/hostC/*
</code></pre>
<pre><code>
# List all files under management and pretty print if run without args, githome otherwise. (https://mitxela.com/projects/dotfiles_management)
giho-ls() {
(cd /
githome ls-files | while read i; do
echo -n "$(githome -c color.status=always status "$i" -s | sed "s#$i##")"
echo -e "¬/$i¬\e[0;33m$(githome -c color.ui=always log -1 --format="%s" -- "$i")\e[0m"
done
) | column -t -s¬
}
# Have "local -" to make option "set -x" local to the function only
giho() { local -; set -x; githome "$@"; }
giho-fetch-hostA() { local -; set -x; githome fetch "$@" hostA master:hostA; }
giho-merge-hostA() { local -; set -x; githome merge "$@" hostA; }
giho-push-hostA() { local -; set -x; githome push --follow-tags "$@" hostA master:$(hostname -s); }
</code></pre>
<p>Other canned common git commands look like:</p>
<pre><code>
# Git shortcuts. Take the "git" command from the environment via GIT var to allow for goodies:
# - use with githome: $ GIT=githome gist
# - color terminal (off by default): $ GIT="git -c color.status=always" gist |m
gi() { ${GIT:-git} "$@"; }
gist() { ${GIT:-git} status "$@"; }
gidf() { ${GIT:-git} diff "$@"; }
gilg() { ${GIT:-git} log -C --name-status --pretty="%h %ae %ai : %s" "$@"; }
gilgt() { ${GIT:-git} log -C --oneline --stat --decorate "$@"; }
gi-fetch-hostA() { local GIM=${GIM:-master}; local -; set -x; ${GIT:-git} fetch "$@" hostA ${GIM}:hostA/${GIM}; }
gi-merge-hostA() { local GIM=${GIM:-master}; local -; set -x; ${GIT:-git} merge "$@" refs/heads/hostA/${GIM}; }
gi-push-hostA() { local GIM=${GIM:-master}; local -; set -x; ${GIT:-git} push --follow-tags "$@" hostA ${GIM}:"$(hostname -s)"/${GIM}; }
</code></pre>
<p>I like and use .bashrc search-previous-command all the time via .inputrc:</p>
<pre><code>
$if Bash
# Filename completion/expansion
set completion-ignore-case on
set show-all-if-ambiguous on
# Append "/" to all dirnames
set mark-directories on
set mark-symlinked-directories on
# Match all files
set match-hidden-files on
$endif
# Ctrl-Left
"\e[1;5D": backward-word
# Ctrl-Right
"\e[1;5C": forward-word
# Up
"\e[A": history-search-backward
# Down
"\e[B": history-search-forward
</code></pre>
<p>Usually I don't customize anything much. I spend most of the time on the command line or in vim anyways, the GUI is mostly vanilla whatever Xfce decides. I notice now my PS1 etc have grown over time:</p>
<pre><code>
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u@\h\[\033[00m\](${STY}:${WINDOW}):\[\033[01;34m\]\w\[\033[00m\]\$ '
PROMPT_COMMAND='echo -ne "\033]0;${XUSER} (${STY:-$$}) ${VIRTUAL_ENV_PROMPT} ${USER}@${HOSTNAME}:${PWD}\007"'
</code></pre>
<p>A researcher, an explorer - usually they need a log book. At work as a researcher I always kept a log book, usually using 2 facing pages per 1 week.</p>
<p>At $HOME have settled for a ~/logBook that's plain ASCII text file under git. Love git for versioning so I don't worry that I will delete destroy something by mistake. Also great for synchronisation and replication to various boxes - done with $ git fetch/merge/push. I have FIXME TODO DONE DONTDO sections. They are ^searchable in vim, e.g. /^TODO (enter). The entries are short-ish, sentence or 2 or 5, separated by empty line. I start entries with "- " so to search easily with /^- in vim. Entries move wholesale between sections, the idea is to move them around without further editing. Entry that spends enough time in TODO without moving to DONE is moved to DONTDO after some time.</p>
<p>I have spent most of my adult life with and around computers. The 1st home computer I saw was ZX-Spectrum 16K that my school <a href="https://www.youtube.com/@AlojzRop">friend</a> got before me in the last year in elementary school probably 1982-83. Remember the prices still: ZX-Spectrum 16K was £100, 48K model was £130. Commodore C64 was £200. Latter I managed to persuade my parents to buy me a C64 probably around 1985. I learned Basic and 6502 assembler on it, mostly from the <a href="https://www.racunari.com">Racunari u vasoj kuci</a> (Computers in Your Home) magazine (<a href="#" onclick="toggleShowImage('racunari-at-40yrs')">recent 40 years anniversary reprint</a>; click to zoom).</p>
<img id="racunari-at-40yrs" src="racunari-at-40yrs.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<p>By 1987 I finished High school and enrolled BSc undergraduate <a href="https://life.ieee.org/ieee-president-attends-plaque-unveiling-of-ieee-milestone-in-north-macedonia/">studies</a> in <a href="https://feit.ukim.edu.mk/en/">Electrical Engineering</a>, that turned into <a href="https://www.finki.ukim.mk/">Computer Science</a> from year 3 onwards. (all together 4.5yrs+diploma work; <a href="https://www.youtube.com/watch?v=Lv1OLc-M4D0">the sounds</a> of my home <a href="https://en.wikipedia.org/wiki/Skopje">town</a>/<a href="https://mk.wikipedia.org/wiki/%D0%9C%D0%B0%D0%BA%D0%B5%D0%B4%D0%BE%D0%BD%D0%B8%D1%98%D0%B0">country</a> I grew up in, by the <a href="https://vlatkostefanovski.com.mk/">incomparable VS</a>) Did 1yr National service in-between High School and University, and there I programmed pocket computers HP-71B, Sharp PC-1500 (with the tiny printer), Apple II clone with a Z80 CP/M board and a hard disk (!! remember that CP/M had partitions, but no directories?). Once back home and at Uni from 1988, I finally got my 1st PC (don't recall the year exactly) - AT with Intel 80286 CPU, 1MB RAM, Hercules graphics card, 20MB HDD, that probably run MS-DOS 5 or similar. I squeezed a 2400bps modem in the budget too (without MNP5 error correction or compression). The modem proved an excellent decision as it got me into the online world of BBS (e.g. <a href="http://pc.pcpress.rs/tekst.php?id=15834">Sezam</a>) and latter Internet. All that financed paid for by my ever kind and generous parents - thank you mum and dad!</p>
<p>Since - I've never been too far from a computer for any significant time. Nowadays it's mostly Linux (Xubuntu, CentOS, Ubuntu), for a long time earlier it was MS-DOS/Windows (3.1-95-XP-10, cygwin), various Unix too (Solaris, HP-UX, Ultrix, AIX), as well as VAX VMS. And of course - we all carry a magical shiny slabs in our pockets that are super-computers of the old. Mostly various Android for me, but it's looking like I'll be switching over to iPhone for the AI NPU (Neural nets Processing Units) hardware.</p>
<p>These days I 'm mostly at my <a href="#" onclick="toggleShowImage('garden-office-desk')">desk</a>, in a <a href="#" onclick="toggleShowImage('garden-office')">garden office</a> (at <a href="#" onclick="toggleShowImage('garden-office-end-day')">end of the work day</a>). Sometimes I get a <a href="#" onclick="toggleShowImage('garden-office-visitor')">visitor</a> or <a href="#" onclick="toggleShowImage('garden-visitor2')">two</a> or <a href="#" onclick="toggleShowImage('garden-visitor3')">three</a>. (click to zoom)</p>
<img id="garden-office-desk" src="garden-office-desk.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<img id="garden-office" src="garden-office.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<img id="garden-office-end-day" src="garden-office-end-day.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<img id="garden-office-visitor" src="garden-office-visitor.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<img id="garden-visitor2" src="garden-visitor2.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<img id="garden-visitor3" src="garden-visitor3.jpg" style="display: none; width: 100%; height: auto;" onclick="zoomImage(this)">
<p>(rehosting an excellent advanced vi - not vim! - and ex tutorial, by Walter Alan Zintz, originally published in UnixWorld Online, but no longer online <a href="Walter_Alan_Zintz_UnixWorld_vi_tutorial/009.html">here</a>)</p>
<p><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>-- <br>LJ HPD Thu 10 Oct 23:00:52 BST 2024</p>
</div>
<!-- Link to the external script -->
<script src="scripts.js"></script>
<!--Load the sidebar html that is table of contents -->
<script>loadSidebar();</script>
</body>
</html>