> 一份2020年2月24日的信息流摘要 ### SSH隧道 原文:[SSH Tunneling and Restricted Servers](https://secretsofthedark.com/2021/02/22/ssh-tunneling-and-restricted-servers/) SSH: secure shell SSH隧道的字面意思是将本地网络流量通过SSH路由到远程主机。 #### 本地SSH端口转发 本地SSH端口转发使您能够从您的机器连接到远程服务器。例如,如果你在限制访问应用程序的防火墙后面,或者被外向防火墙阻挡,无法到达服务器上运行在3000端口上的应用程序,本地SSH端口转发就可以提前完成。 ```bash ssh -L 127.0.0.1:80:intra.example.com:80 gw.example.com ``` #### 远程SSH端口转发 远程SSH端口转发的工作方式与本地SSH端口转发的工作方式相反,这允许你从远程机器连接到本地机器。在正常情况下,SSH不允许远程端口转发。你可以在远程主机上的SSHD配置文件etc/ssh/sshd_config中的GatewayPorts指令中启用它。 ```bash ssh -f -N admin@fakeserver.fakesite.com -R 5000:localhost:3000 ``` #### 动态SSH端口转发 动态SSH端口转发,与前两种不同的是,它允许与一系列端口进行各种TCP通信,本地和远程只允许与单一端口通信。动态版让你的设备充当一个SOCKS代理服务器,它在1080端口上监听。 要在1080端口上启动SOCKS代理,请使用此命令。 ```bash ssh -f -N -D 1080 admin@fakeserver.fakesite.com ``` ### 7个90%的程序员都会犯的错 原文:[Avoid these 7 mistakes which 90% of the programmers do [4 min read]](https://www.reddit.com/r/ProgrammingBuddies/comments/lq9if7/avoid_these_7_mistakes_which_90_of_the/) 自己觉得受到启发的两条: - 没有经常回顾自己的代码而只是一味堆砌 - Coding in Isolation ### 程序员的软技能 原文:[9 Soft Skills That Made Me a Successful Developer (so Far) That You Can Steal](https://medium.com/better-programming/9-soft-skills-that-made-me-a-successful-developer-so-far-that-you-can-steal-8f6d18351cec) 让我想起了在v2ex看到某个印象深刻的评论: > 程序员对 IT 行业最大的误解就是以为技术是 IT 行业的一切,但其实技术只是 IT 行业的必要条件……之一。 #### 关于目标达成 - 确定一个具体的目标 - 确定需要实现这个目标的策略 - 分解目标为小目标 - 分解小目标为里程碑并设置deadline - 把这些里程碑写在纸上让自己每天看见 - 庆祝每个小小的达成 - 暗示自己全力以赴目标终将实现 > “Every action you take is a vote for the type of person you wish to become. #### 关于信赖 **能够始终如一地慎重地交付工作是一项宝贵的技能,因为它使你成为一个可以信赖的人。** - 是否能不延期交付工作 - 能否做好自身的时间管理 - 是否专注于最重要的事,而不是把精力放在最无关紧要的事情上 > “But if all they did was kill time, time would end up killing them.”― **Michael Grant, “**[**Gone**](https://www.goodreads.com/work/quotes/2543657)**”** #### 关于适应改变 培养自己的心态,相信自己能学到任何扔给你的东西,并通过行动宣传这种观念。这样做,你会发现自己会被看作是一个很有潜力的人。 #### 关于沟通 - 不要害怕问问题 - 多多分享自己的成就 ,告诉同事自己在做什么 - 记录/解释自己的任务,以便其他人能随时交接 - 大方给同事讲解他们不懂的知识 > In essence, treat communication as if you were on a sports team preparing to go play at national championships. Communication is vital to success. Don’t be a loner. Don’t hold knowledge hostage. > > 从本质上讲,对待沟通,就像你在运动队里准备去参加全国冠军赛一样。沟通对成功至关重要。不要做一个孤独的人。不要把知识当作人质。 #### 关于学习 - 对学习要始终有热情,保持开放,保持谦逊。 - 根据别人给你的反馈,将你目前的做事方式转变为更有效率的方式。 - 阅读任何主题的书籍,并想办法将其与你的专业联系起来。 - 花时间学习一些新的技术或课题,这样工作时就就可以用一种新观点去看待, ### 写作 https://www.publicationcoach.com/ 感觉这些建议很实用,无关写作也可以借鉴。 - Rest easy with your book title | 不要关心标题是否重复。因为标题没有版权。 - Keep your goals to yourself | 不要分享自己的目标。因为告诉别人会造成自己的大脑感受到目标达成的错觉。 - Finish your novel faster | 即使状态不好时,每天也努力完成更多。设置deadline。 - Consider your characters’ quirks | 为角色设定怪癖。可以彰显个性让人记住。 > quirks "make them stand out in some way from the crowd. Those quirks can be physical (e.g., spiky blue hair or brightly-colored scarves) or tied to their personality or their strengths and weaknesses. #### 关于同理心 - 不要以为每个人都知道你知道什么。 - **花时间**去尝试真正了解你的客户和用户,这样你就可以创造出用户友好的组件和应用程序,完全迎合他们的愿望和需求。他们会对你的工作印象深刻。 想到之前看过一位几十年程序员在谈经验时也特别强调了 `Curse of Knowledge` 这个概念,可能技术越往上就越容易忽略知识gap,从引起交流时不好的体验。所以要多从对方的角色出发去思考问题。 #### 突破常规思维 Think Outside of the Box > 创造性思维就是在不同的事物之间找到隐喻的联系,通过 一连串不同的问题来发现一种理解。 > > To think creatively is to find metaphorical ties between different things and to discover an understanding through a barrage of different questions. > > 爱因斯坦曾经说过,如果他要在一个小时内解决一个问题,他会花55分钟定义问题和提出正确的问题,剩下的5分钟才是真正解决问题的时间。 > > Albert Einstein once said that if he had to solve a problem in a matter of an hour, he would spend 55 minutes defining the problem and asking the right questions and spend the remaining five minutes actually solving the problem. > > 乔布斯也说过,最有创造力的人是那些经历最多的人,并且能够把这些经历和自己的工作联系起来。"创意就是把事情联系起来 当你问有创意的人是如何做某件事的时候,他们会觉得有点内疚,因为他们并没有真正做,他们只是看到了一些东西。过了一会儿,他们似乎就明白了。那是因为他们能够把自己有过的经验连接起来,综合出新的东西。"--史蒂夫-乔布斯 > > Steve Jobs also said that the most creative people are the ones that have experienced the most and are able to tie those experiences back to what they do. > “**Creativity is just connecting things**. When you ask creative people how they did something, they feel a little guilty because they didn’t really do it, they just saw something. It seemed obvious to them after a while. That’s because they were able to connect experiences they’ve had and synthesize new things. “— Steve Jobs #### 其他 - 你应对失败的能力说明了很多问题。 > One of the most rewarding things about developing is the aspect of discovery and figuring out the hard things. - 即使你不是领导者,也要有领导者的责任感和主动性 ↑ 不做好这些,又怎么能被看到呢 ### DEV community New Relic x DEV "Hack the Planet" hackerthon DEV上的周TOP作者 1. **Danny** ([11 Easy UI Design Tips for Web Devs](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=eca66772cf&e=a7466a5767)) 2. **Caitlyn** ([Non-Technical Frontend Interview Questions](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=8bc26c9921&e=a7466a5767)) 3. **Evan** ([Announcing Vite 2.0](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=d02c53ded8&e=a7466a5767)) 4. **Paul** ([Are You a Good Developer Already?](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=bbd3b0dade&e=a7466a5767)) 5. **Laurie** ([Performance Tools](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=641bbd9cc9&e=a7466a5767)) 6. **Sylwia** ([Why Do You Love Ruby, Actually? An Ode](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=92c54df94e&e=a7466a5767)) 7. **Lucius** ([How To Know If An Element Is Visible In Viewport](https://dev.us12.list-manage.com/track/click?u=85076d6fb7eea423ec9b0de34&id=49f46cb4db&e=a7466a5767)) ### 本周热词 - [Ear Cleaning Kits](https://clicks.aweber.com/y/ct/?l=DpCDV&m=3hB81ortIvQRPrP&b=JCoQqRNWnfnBVloW9v_UZw) | 耳朵清洁套件 - [FIFINE](https://clicks.aweber.com/y/ct/?l=DpCDV&m=3hB81ortIvQRPrP&b=duPibzliWrh5o.BaXpjqdA) | USB麦克风 - [Funnel Software](https://clicks.aweber.com/y/ct/?l=DpCDV&m=3hB81ortIvQRPrP&b=lJf6AEyoMk0DJ7eVZ1jLGw) | 又一个SaaS - [Non-Fungible Token](https://clicks.aweber.com/y/ct/?l=DpCDV&m=3hB81ortIvQRPrP&b=0WSX0OvF3qKryrG57ezRMA) | A non-fungible token (NFT) is a digital representation of something with unique properties. ### 关于startup - [See how 100+ startups are running - MRR & Stats](https://openstartups.run/) > ↑ As a business owner, I can tell you this is next to useless. [Hacker News Comment](https://news.ycombinator.com/item?id=26237031) - [Interviews with Indie Hackers](https://www.indiehackers.com/interviews/page/1) ### 其他阅读 - 作为solo开发者有效利用Git:[Git is my buddy: Effective Git as a solo developer](https://mikkel.ca/blog/git-is-my-buddy-effective-solo-developer/) - 从LassPass换到其他密码管理工具:[How to leave LastPass and move to another password manager](https://www.theverge.com/22295354/lastpass-export-delete-bitwarden-1password-zoho) - 从LassPass导出: - Go to [LastPass.com](https://go.redirectingat.com/?id=66960X1514734&xs=1&url=http://LastPass.com&referrer=theverge.com&sref=https://www.theverge.com/22295354/lastpass-export-delete-bitwarden-1password-zoho&xcust=___vg__p_22059395__t_w__d_D) and sign in to your account. - Click on “Advanced Options” in the left-hand menu. - Click on “Export” and enter your Master Password if asked. - 替代方案 - BITWARDEN: [Instructions for importing from LastPass](https://bitwarden.com/help/article/import-from-lastpass/#export-from-lastpass) - KEEPASS: [Instructions for importing CSV files](https://keepass.info/help/base/importexport.html#genericcsv) - LOGMEONCE: [Instructions for importing from LastPass](https://support.logmeonce.com/hc/en-us/articles/231830127-How-to-import-your-password-from-LastPass-Vault) - NORDPASS: [Instructions for importing CSV files](https://support.nordpass.com/hc/en-us/articles/360002377197-How-to-import-passwords-to-NordPass-) - 1PASSWORD: [Instructions for importing from LastPass](https://support.1password.com/import-lastpass/) ### 一些重要收获 - Typora很好用,特别配合快捷键的写作体验很顺畅。 - Linux | `dig ` 查询域名系统 - Git | `git blame` 可以看一个文件的修改历史 - 沟通 | 提供观点和信息时要多考虑对方立场的pain point - 沟通 | What:讲什么→ Why:为什么→ How:怎么做