g

丘海东

读书写字 热爱生活 ⌚️📖️🖋️🏀️🚲️🚉️🎼️🍵️🏞️📷️

Daily,2022-05-12

和世界交手这么多年,你是否光彩依旧,兴趣盎然?

Think Different 不同凡响

苹果公司1997年广告 🍎

Here’s to the crazy ones.
向那些疯狂的家伙们致敬。
The misfits.
他们特立独行,
The rebels.
他们桀骜不驯,
The troublemakers.
他们惹是生非,
The round pegs in the square holes.
他们格格不入,
The ones who see things differently.
他们用与众不同的眼光看待事物,
They’re not fond of rules.
他们不喜欢墨守成规,
And they have no respect for the status quo.
他们也不愿安于现状。
You can quote them, disagree with them,glorify or vilify them.
你可以赞美他们,反对他们,颂扬或是诋毁他们,
About the only thing that you can’t do is ignore them.
但唯独不能漠视他们。
Because they change things.
因为他们改变了寻常事物。
They push the human race forward.
他们推动人类向前发展。
While some may see them as the crazy ones, we see genius.
或许他们是别人眼里的疯子,但他们却是我们眼中的天才。
Because the people who are crazy enough to think that they can change the world, are the ones who do.
因为只有那些疯狂到以为自己能够改变世界的人,
才能真正地改变世界。

Daily,2022-05-04,开玩笑

打球可以菜,牛皮必須吹。
注意:必須是-朋友間,活躍氣氛,讓大家開心的,不能讓人心情不好

真實的壞消息,比敷衍的假話好。溝通必須基於真實。——客服

Daily,2022-05-02,失眠

失眠,因对明天不安

但是,失眠对身体影响太大,4-5点还没睡着,睡到3点也没精神

别忘了,之前耳朵已经出事
ear

Ssh: Connect to Host github.com Port 22: Connection Timed Out

1
2
dong@Ubuntu:~$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out

解决 ssh: connect to host github.com port 22: Connection timed out

ssh: connect to host github.com port 22: Connection timed out

如果你电脑上的git能在大部分地方进行同步,但是在某处地方的网络下无法同步,并且运行git pull或git push长久没有反映,最后出现ssh: connect to host github.com port 22: Connection timed out,很可能是你的网络供应商(比如广电网)在出口防火墙上屏蔽了22端口,这意味着你将无法访问其他主机的22端口。
对此,github提供了一种解决方案,允许你使用443端口进行ssh连接,因为443端口是访问https网站所必须的,大部分防火墙都会允许通过,但如果使用代理服务器可能产生干扰。如果连443端口都被屏蔽,那你应该无法浏览这篇文章。
运行这段命令,看看是否有成功提示,如果成功,则可以使用这个解决方案。

1
ssh -T -p 443 git@ssh.github.com

简单地配置一下,让你每次ssh连接github都通过443端口。如果你使用Linux,在~/.ssh/config内(新建config文件,无后缀),添加这些内容,指明ssh连接git@github.com或git@ssh.github.com走443端口。

1
2
3
4
Host github.com
Hostname ssh.github.com
Port 443
User git #这行可能不需要也行

或者这一段:

1
2
3
4
5
6
7
8
9
10
11
12
13
Host github.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
User git

Host gitlab.com
Hostname altssh.gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
User git

我的:把config文件复制到.ssh2和.ssh3文件夹
改ssh2-3文件夹名,测试:

1
ssh -T git@github.com

如果443端口也无法连接,试试改hosts:

ssh: connect to host ssh.github.com port 443: Connection refused

Ubuntu 22.04安装Octopress 2.0和3.0

Ubuntu24.04安装
以后重装系统,记得把octopress、haydnyau、ssh2、ssh3文件夹、.gitconfig,打包备份,并上传网盘。
依赖:python2,ruby2.6.9

Octopress 2.0

1
2
git --version
sudo apt install git

然后配置git,把之前的octopress-haydnyau和ssh2-ssh3文件夹和.gitconfig文件复制到主目录,改ssh文件夹名

1
ssh -T git@github.com

ok

1
2
3
4
python2 --version
sudo apt install python2

ruby --version

没有
到rvm官网(下面的命令可能有更新,看官网)

1
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

提示:

1
2
Command 'gpg2' not found, but can be installed with:
sudo apt install gnupg2
1
2
3
4
sudo apt install gnupg2
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

curl -sSL https://get.rvm.io | bash -s stable

提示:

1
2
Command 'curl' not found, but can be installed with:
dg不要这样安装sudo apt install curl

注意: 安装新版本的curl

否则会出错

1
2
3
4
5
6
7
8
dong@dong-Ubuntu:~$ curl -V

找不到命令 “curl”,但可以通过以下软件包安装它:
sudo snap install curl  # version 8.1.2, or
dg不要这样安装sudo apt  install curl  # version 7.81.0-1ubuntu1.13
输入 “snap info curl” 以查看更多版本。

dong@dong-Ubuntu:~$ sudo snap install curl

不要下面这个了:

1
2
dg不要这样安装sudo apt install curl
curl -sSL https://get.rvm.io | bash -s stable

提示:

1
curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 28 ms: 拒绝连接

解决:
Failed to connect to raw.githubusercontent.com
到这个网址:https://www.ipaddress.com/,输入:raw.githubusercontent.com,查询,得到IP地址,选择其中一个或多个,修改本地HOSTS:Ubuntu下打开/etc/hosts,添加 IP地址:185.199.108.133 raw.githubusercontent.com,重试,不行就重启再试。

1
curl -sSL https://get.rvm.io | bash -s stable

提示:

1
2
3
* To start using RVM you need to run `source /home/dong/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
Thanks for installing RVM
1
source /home/dong/.rvm/scripts/rvm

重启命令行

1
2
rvm --version
rvm install 2.6.9

提示错误:

1
2
3
4
5
Error running '__rvm_make -j4',
please read /home/dong/.rvm/log/1649165570_ruby-2.6.9/make.log

There has been an error while running make. Halting the installation.
......

解决:
Error running ‘__rvm_make -j4’ ruby 2.6.9 Ubuntu 22.04

1
2
3
rvm pkg install openssl
rvm remove 2.6.9
rvm install 2.6.9 -C --with-openssl-dir=$HOME/.rvm/usr
1
ruby --version

记得:终端-首选项-未命名-命令-勾选‘以登陆shell方式运行命令’,重启所有终端

1
rvm use 2.6.9 --default

/octopress/Gemfile 文件里的源改回最初的:source "https://rubygems.org/"

1
2
gem install bundler
bundle install

更改:You can use the sass-convert command to automatically fix most cases.

1
2
rake generate
......

之后就都是常规操作。

Octopress 3.0

1
cd /haydnyau
1
2
ruby --version
rvm use 2.6.9 --default
1
jekyll --version

确保安装正确
安装好Octopress 2.0之后,其他的依赖都安装好了,只需要:

1
gem install octopress

确保安装正确,成功,曾试过因为系统自带了ruby3.0,导致ruby版本不对,失败的
好了。

张朝阳

看到张朝阳的物理课,查了下。
张朝阳,清华物理系,麻省理工博士,创立搜狐,中国互联网教父,位列中国富豪榜。
年少得志,生活潇洒风流,商海浮沉,抑郁过几年。
2021年末,57岁,讲授物理课,各种深奥晦涩的知识。
很多人三十来岁,已经连初中数学都不记得了。
他还能讲授深奥的物理和数学知识,在讲台上意气风发。
抑郁时,他从佛学明白: 心有所依处。

RVM用法

原文
列出可用的ruby版本以安装类型:

1
rvm list known

然后从已知的列表中安装,输入:

1
rvm install VERSION_NUMBER

然后使用你已经安装的ruby版本:

1
rvm use VERSION_NUMBER

你可以使一个特定的ruby版本成为你的默认系统版本:

1
rvm use VERSION_NUMBER --default

要删除gem版本,保持gemsets:

1
rvm uninstall VERSION_NUMBER

删除ruby等:

1
rvm remove VERSION_NUMBER

要了解你的ruby环境以及它们的安装位置/别名:

1
rvm info