0%

In this lecture we will go through several ways in which you can improve your workflow when using the shell. We have been working with the shell for a while now, but we have mainly focused on executing different commands. We will now see how to run several processes at the same time while keeping track of them, how to stop or pause a specific process and how to make a process run in the background.

We will also learn about different ways to improve your shell and other tools, by defining aliases and configuring them using dotfiles. Both of these can help you save time, e.g. by using the same configurations in all your machines without having to type long commands. We will look at how to work with remote machines using SSH.

阅读全文 »

Have you ever wanted to take data in one format and turn it into a different format? Of course you have! That, in very general terms, is what this lecture is all about. Specifically, massaging data, whether in text or binary format, until you end up with exactly what you wanted.

We’ve already seen some basic data wrangling in past lectures. Pretty much any time you use the | operator, you are performing some kind of data wrangling. Consider a command like journalctl | grep -i intel. It finds all system log entries that mention Intel (case insensitive). You may not think of it as wrangling data, but it is going from one format (your entire system log) to a format that is more useful to you (just the intel log entries). Most data wrangling is about knowing what tools you have at your disposal, and how to combine them.

阅读全文 »

Writing English words and writing code are very different activities. When programming, you spend more time switching files, reading, navigating, and editing code compared to writing a long stream. It makes sense that there are different types of programs for writing English words versus code (e.g. Microsoft Word versus Visual Studio Code).

As programmers, we spend most of our time editing code, so it’s worth investing time mastering an editor that fits your needs. Here’s how you learn a new editor:

  • Start with a tutorial (i.e. this lecture, plus resources that we point out)
  • Stick with using the editor for all your text editing needs (even if it slows you down initially)
  • Look things up as you go: if it seems like there should be a better way to do something, there probably is.
阅读全文 »

《好莱坞往事》(Once Upon A Time In Hollywood)

获得了今年奥斯卡的最佳男配(布拉德皮特)和最佳美术。也算是我看的第一部昆汀的电影,惭愧。

应该来说还是夹杂着昆汀许多的私货和情感在里面的。在不知道当时的时代背景和曼森家族的背景下,乍一看肯定是一个好莱坞的群像。从小李子饰演的过气演员,皮特饰演的过于帅气的替身,以及玛格特·罗比饰演的波兰斯基的老婆,三者其实代表了在60年代的好莱坞,从上到下的三个阶级。以及玛格丽特·库利(awsl,我第一眼看到这个演员就觉得眼熟,原来是在死亡搁浅里饰演了玛玛)扮演的曼森家族的嬉皮士女孩,更使得整个好莱坞的生态变得更加丰富。

阅读全文 »

What is the shell?

Computers these days have a variety of interfaces for giving them commands; fancyful graphical user interfaces, voice interfaces, and even AR/VR are everywhere. These are great for 80% of use-cases, but they are often fundamentally restricted in what they allow you to do — you cannot press a button that isn’t there or give a voice command that hasn’t been programmed. To take full advantage of the tools your computer provides, we have to go old-school and drop down to a textual interface: The Shell.

阅读全文 »

我们需要恢复到一种不将自己视为局外人的「公共生活」观念中,不再冷漠或犬儒地对政治问题冷眼旁观,不蜷缩在感人肺腑、含情脉脉的「世外桃源」生活之中。

只有清算那些让他们身陷窘境、导致他们付出许多不必要牺牲的主政官员,才真正对得起这些最可敬的医疗工作者、也才能让他们安心战斗。

纪念李文亮医生和所有其他逝去的生命。

阅读全文 »

希望2020年,我们都有更多的勇气。

因为一场肺炎,整个城市仿佛都在沉睡,每个人都待在家里,与其说不敢出门,实则街上也没什么可以逛的地方了。就想着趁着最近再把之前的博客重新再搞起来,也算是有个写字的地方。

大一时候开始弄的博客是基于WordPress的架构,当时正好腾讯云主机有学生优惠,买了一个server和一个网址(就是现在这个),大概一个月只要1块钱。 看中的是WordPress可视化程度较高,各个插件也比较多,算是一个成熟的社区。也写了一些有的没的,但终究是疏于打理,而且要更改网络架构还要远程操纵那台centos版本很老的云主机,也就一直不愿意改,最后也懒得续费,把主机给退了(实际上也是在找机场的过程中发现了很多同样物美价廉且不需要备案的服务提供商)。

阅读全文 »