显示更新内容

linux shell command里有两个我没用过但是看上去蛮不错的:
tree和history。
history <number> 会从第<number>个command开始,在terminal里逐一打印出你之前用过的command。
tree的话就是展示出你当前文件夹下的文件目录结构。(见下图)

(12)
`find . -name "src" -type d`
`find . -path "*/test/*.python" -type f`
d: directory; f: file
`find . -mtime -1`
find all files modified in the last day
`find . -size +500k -size -10M -name '*.tar.gz'`
Find all zip files with size in range 500k to 10M

(13)
You can also use `find` to execute some commands:
`find . -name "*.tmp" -exec rm {}`
——我很好奇这个花括号是怎么用的。

(14)
tldr.sh/
tldr gives you examples of each flag of a shell command.

(9)
question mark ? will only match 1 letter. `ls clas?` will list files in the class directory.

(10)
the first line of the script
#!/usr/bin/python
can be replaced by
#!/usr/bin/env python
if you don't know the path of python

(11)
Curly braces {} - Whenever you have a common substring in a series of commands, you can use curly braces for bash to expand this automatically. This comes in very handy when moving or converting files.

(5)
in shell command, `true` will always have a 0 error code and `false` will always have a 1 error code.

(6)
`false && echo "Oops fail"`, the second part won't be executed.

Using a semicolon `;` in the middle is a way to concatenate 2 commands.

(7)
to use the output of a command:
`$(command)`
example: `echo "we are in $(pwd)"`

(8)
$0 the name of the script
$# the number of arguments
$$ the process ID of the script
$@ all the arguments

(1)
echo "value is $foo"
echo 'value is $foo'
variables in single quote will not be replaced.

(2)
You can define a function in a .sh file and then source it. Then you can use this function in your terminal.

(3)
$? will get you the error code from the previous command.
$_ will get you the last argument of the previous command.

(4)
in shell, `!!+tab` = your previous command.


(15) f+<letter>: jump to the location of the next <letter>
(16) F+<letter>: jump back to the previous location of <letter>
(17) x: delete the current letter.
(18) r+<letter>: replace the current location with <letter>
(19) ctrl+r: redo
(20)
yy: copy the current line into buffer
yw: copy the current word
(21)
in visual mode, ctrl+v: select a block
这个可以用于txt文件表格中固定列的选取。

(8) ctrl + u上一页; ctrl+d下一页
(9) G: move all the way down
(10) gg: move all the way up
(11) o/O: insert a line after/before and then change to the edit mode
(12)
d+w: delete a word.
d+e: delete to the end of the current word
c+w/c+e: the same functionality as d+w/d+e, but change to the edit mode in the end
(13)
dd: delete the line
cc: delete the line and then change to the edit mode.
(14)
cap+H/M/L: change to the top/middle/end of the current page

(1) counts:
7dw: delete 7 words
4j: right move 4 letters

(2) modifier:
a: around
i: inside
=========
ci[ : change everything inside []
----
%: jump back and force between parentheses
----
da( : delete everything inside () including the parentheses itself.
----
/<keyword> + n: next match of the keyword.
----
. : repeat the previous editing command

vim的几种mode,以及其从normal mode进入的方式:
i: insert mode
r: replace mode
v: visual mode
- visual mode line: <s-v>
- visual mode block: <c-v>
: command mode

我用了很久vim竟然不知道有replace mode这个模式。

从科普的角度讲,虽然大部分内容我都知道(尤其是硬件相关),但是诸如file system,network system相关的内容我还是想再看看。所以姑且收藏在这mark一下。
bilibili.com/video/av21376839

就是因为在其他地方不得不带着面具做人,所以在这里才想稍微做个真实的自己——说点自己想说的,看点自己想看的。
这里既不是我交朋友的场所,也不是我追求认同的场所,我也对扮演成可爱的凯特失去了兴趣,更做不到时刻元气满满。我时而颓废沮丧,时而斗志昂扬,时而疯癫痴狂,时而尖酸刻薄。有的时候是个对某事感兴趣而疯狂钻研的怪人,有的时候则是满足于吃喝玩乐的普通人。

和外国人说话的时候我为什么不用中文。
因为谷歌翻译根本不能把我潜藏在母语里微妙语意完美表达出来。……我不想被Google翻译成“大意似乎正确”但却“侵吞掉了我语言里微妙的情绪”的另一种语言。

我可能是讨厌“装腔作势”的人吧。从一个人如奴才一般跪舔比他地位高的人、睥睨地位不如他的人这一点来看,我觉得这样的人没有心。他的“跪舔”也不是真的内心认同,而不过是一时在地位高的人面前获取认同的权宜之计。一旦翻身上位,之前他笑脸相迎的那个地位高的人会被他立刻冷落,就如同他之前睥睨那些低位者一样。
说到底,他的内心深处没有真正的朋友,只有“可以利用的人”和“没有价值的人”,以及他自己。

看知乎上有人写她大学毕业之前在家乡和父母一起生活的时候觉得一辈子单身很好,但是到了大城市自己闯荡之后突然就觉得还是应该找个男的结婚。——我觉得很多时候,独身一人身处异乡的孤寂感让人想要找到一个依靠。
所以真正能够做到即使独自一人在异乡漂泊也绝不依赖感情来获得精神上(甚至物质上)的慰藉的人,我觉得挺强的,是真正独立的大人。

学日语的过程中我也在不断自我观察自身的记忆规律,我发现自己使用一个单词多了,这个单词就能够记得更牢。所谓使用,是指放到某种语境中去说、去写,在“说”和“写”的过程中发现自己忘掉了某个词,再去单词列表里找到它,想清楚如何使用,并使用它。而不是一遍又一遍盯着那个孤零零的单词,反复去看、去记忆。

我最理想的SNS状态就是,我TL上的各位都去刷自己的事,容我一个人在人群中发疯。更好的状态是大家群魔乱舞各说各话,互不过问互不攀比。
我只是想在人群中鬼混,因为热闹。但我又不想和任何人发生关系(此关系为“关系”的表面意思),因为麻烦。

「但我想同人的本质不是付出和劳动,是去描摹心中不切实际的感受,去画想画的画,写想写的文,只因为想做就去做,这种单纯的快乐会把我们联结在一起。」by韵乃

20年经常思考同人到底是什么,思来想去还是很难跟完全不接触的人解释,这是一种创作,一种发泄,一种爱或者恨,纯粹的幻想,故事的另一种可能,或者别的什么。

做好了之前说的个人博客样板间,我是您时间轴上的个人博客推广大使。
主题采用CaiJimmy的Stack,增加了之前经常被人问到的个人魔改,感兴趣的人可以看这篇文章:Hugo | Hugo-stack-theme 主题魔改版
示例站点可以看这里:Demo站,完全装修好的样子可以看我的个人博客:小球飞鱼

主要特色如下:

应该是最简单的Hugo博客搭建方式,一共只需要四步:1.Fork仓库并Download到本地;2.导入仓库到Vercel;3.在本地安装Hugo;4.花十分钟学习一下使用Github Desktop。(详细教程文章中有)
基于原主题特性,魔改后基本囊括了个人博客所需的绝大部分功能,开箱即用,不需折腾,有使用说明:友情链接,分类/TAG/归档小部件/全文搜索/归档页面/文章字数统计/站点总字数统计/建站时间统计。
基于原主题进行了大量样式细调,美观性经过时间检验,人见人夸,不打诳语 :BlobhajHeart:
文章中对一些常见博客修改做了总结,并附赠七篇我折腾时写的流水账笔记,便利装修查阅。

如果您喜欢或使用这个魔改版主题成功搭建了自己的个人博客,欢迎评论告诉我,我会很开心的!
@board
#长毛象安利大会
#长毛象安利交换大会

做了一个URL清洁器,可清理链接中的追踪参数 :blobcatgooglytrash: 。在ClearURLs的规则集基础上添加了微信公众号和部分淘宝规则。
tools.o3o.studio/clearurls
发带链接的嘟嘟前记得先给URL洗个澡哦 :EveOneCat11:
#URL

显示更早内容
雾海

雾海是一个开放且不限制讨论主题的非营利性中文社区,名字来源于德国浪漫主义画家 Friedrich 的画作《雾海上的旅人》。生活总是在雾海中吞吐不定,不管怎么艰辛,他还是站在了这里!希望大家在这里玩的开心~