命令行里加个小表情足以愉悦自己
当git工作区不是”working tree clean”状态时 放出小表情
实现方法:
1 | # $HOME/.zshrc |
命令行里加个小表情足以愉悦自己
当git工作区不是”working tree clean”状态时 放出小表情
实现方法:
1 | # $HOME/.zshrc |
2022-05-15 15:50:10 updated
1 | class Demo |
今天遇到这个问题的时候, 我这才意识到我的OOP基础有多薄弱…
继续努力
遇到这个问题的原因是, 使用的ruby版本小于2.7, 这时候不能这么用
https://www.bilibili.com/video/BV1Jh411n7Fr
By Linus-Torvalds:
I Want to decide for myself. I’m very much against unnecessary rules imposed by society.
I’m a big believer that you should be able to do whatever you want in the privacy of your own home as long as you don’t hurt anybody else.
2021-11-27 18:40 至 2021-11-27 19:40 参与了一次公司内部的分享, 干货很多;
其中有些部分参与过, 体会很深; 有些部分不了解, 这是一次很好的学习机会, 感谢分享者雷哥
终于搞懂了 ssh-add ssh-agent ssh -A user@host 实现的SSO
https://www.ssh.com/academy/ssh/agent
1 | eval `ssh-agent` && ssh-add # 启动 ssh-agent 并且把当前用户的 key加到agent里 |
假设 本机 可以ssh到 host_b
假设 host_a 不可以ssh到 host_b
使用上面的方法, 可以实现在 host_a 上, 直接ssh登录 host_b
假设 本机 有权限拉代码库A的代码
假设 host_a 没有权限拉代码库A的代码
使用上面的方法, 可以实现在 host_a 上, 拉代码库A的代码
Tampermonkey 是一款 浏览器插件
空余时间在B站学习C语言, 偶尔发现 某个接口可以获取到列表信息, 可以通过这个计算还剩多长时间能学完这个系列
结合大佬分享过的脚本工具 TamperMonkey
发现可以自动化这个过程… 真是太好了
1 | // ==UserScript== |
谷歌浏览器 -> F12 -> “Source” Tab -> “Snippets” -> “Net Snippets” -> write your script and enjoy debuging…
注: 这里主要记录怎么申请免费的SSL证书
和 在nginx上配置HTTPS
主要的参考文档: 阿里云.SSL证书服务
起因: 调试 小米小爱开放平台
里的 服务端口类型
需要https接口
阿里云SSL证书 控制台
SSL证书
免费证书
(测试, 个人试用场景, 商用的不在这里讨论)立即购买
状态
那里可以看到证书的签发进度下载
1 | scp yourdomain_nginx.zip youserver:/home/ |
阿里云ECS控制台
安全组
tab, 进入安全组配置快速添加
, 选择https
即可1 | sudo ufw status |
1 | # http请求转为https请求 |
配置后, 需要reload nginx服务
1 | sudo nginx -t |
1 | curl -I http://yourdomain # 应该返回 `301 Moved Permanently` |
分享看视频做的一些记录
Top 3 Mistakes Junior Coders Make
https://www.youtube.com/watch?v=4Bgeumjhf4w
They believe everything they have build has to be scalable like Facebook
or Instagram
, they always look at “what happens if I have s millions users, what am I going to do…”. This is not gonna happen for 99.99999% of projects that you have work on, you do not have to worry about scale for the most part, for the vast majority apps you ever work on.
Write time speed is far more important than runtime speed in development.
Don’t be chasing after the bleeding edge tech, let the jobs and opportunities and job requirements determine what tech you choose, not what’s buzzing now on interwebs.
Don’t try to write overly complex code. Don’t do it.
Strive to write really easy to understand code and you will rise quickly as a favorite developer in the team or in the business, because they are going to say: “This person here write really good simple code.”
Newbies tried to reinvent the wheels, they are reluctant to use libraries or frameworks
These tips are based on my 250 years as a developer, trust me, these are universal, doesn’t matter what language, doesn’t matter what framework, nothing matters really…