显示更新内容

尝试新发型(丸子头)
本来想照着视频上那样梳成很甜美由自然的感觉但是根本学不会!!最后简单梳成马尾然后随意盘起来了……

其实我本来是不准备学日语的。总想着什么时候有时间了再去学吧。结果COVID-19来了,全世界都完蛋了。我看着这令人焦灼的末世之景,心想:“万一要是哪天死了,却连想做的事情都没机会去做,岂不是很遗憾。”所以就开始逐一地做起想要去完成的事情了。
"在死前把自己想干的事情都干完。"我最近已经变成了抱着这种想法活着的人了。

这不是消极地思考生命,正相反,我想要做的事情多到我80岁死去都做不完。
倘若真的有一天我没有任何想做的事情了,那恐怕才是我垂垂老矣的征兆吧。
如果连想做的事情都没有了,那人活着又是为了什么呢?——我禁不住产生了这样的思考。

安利一个 Coursera 的教育优惠:每年为教育用户提供一门免费的课程,只需要在官网验证教育邮箱然后就可以免费完整参与一门课程啦。

另外 Coursera 还有许多免费课程,比如全世界所有人都应该学习的 CS229

coursera.org/campus?utm_campai

youtu.be/Zw1tzxAt_CI 这是我这辈子上过的最有用的课,推荐给时间线上的象友!!!!!!!!!!

收到了梅吉的主人的信件。超级开心的啦(´・ω・`)
照片里的梅吉真的非常英俊呢~

从美国寄邮件到日本用了10天,从日本寄邮件到美国只要5天。美国邮政真的快完蛋了。

白情节的返礼收到了。很好看的包袱皮呢。(*^^*)
真的很快乐。收到礼物的一瞬间我又鼓起了勇气面对生活。


x64 registers: 这张图讲述了64位处理器里各种register之间的关系。
%rax:64位
%eax:%rax的低32位
%ax:%eax的低16位
%ah:%ax的高8位
%al:%ax的低8位

cs.uaf.edu/2017/fall/cs301/lec

Intel libxed:
intelxed.github.io/

大概搞了一下intel libxed。主要内容在这个`xed_decode()`里面(见网页链接)。就是把machine code decode成人类能够理解的汇编。标记一下去洗澡了。明天起来接着搞。

intelxed.github.io/ref-manual/


第1列:是否是dir(=directory)
第2-4列:user permission
第5-7列:group permission
第8-10列:user和group之外的所有人的permission

(1)read permission for a dir:permission to list files in that dir
(2)write permission for a dir: permission to delete, create, rename files in that dir
(3)execute permission for a dir: 你想要cd dir,你必须有这个dir的所有parent dir以及这个dir它自己的execute permission。

shell中的小trick


(1) define functions in shell
1) open a <file>, write your function
2) source <file>
3) then you can use your function in shell

(2) special variable
`$?`: the error code of your previous shell command
`$_`: the last argv of your previous command

(3) small trick
`!!`: shell will replace your !! to be your previous command

(4) difference between double and single quote
variables in double quote can be replaced by its value, while in single quote cannot.

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

显示更早内容
雾海

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