g

丘海东

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

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

You Can Use the Sass-convert Command to Automatically Fix Most cases---Ruby 不同版本

octopress-2.0,ruby-2.3.1,ubuntu20.04,可以运行(修改这里后)
octopress-2.0,ruby-2.5.9,ubuntu20.04,可以运行(修改这里后)
octopress-2.0,ruby-2.6.9,ubuntu20.04,可以运行(修改这里后)
octopress-3.0,ruby-2.5.9,ubuntu20.04,可以运行(無需修改)
octopress-3.0,ruby-2.6.9,ubuntu20.04,可以运行(無需修改)

換了版本要重新安裝octopress3.0:

1
gem install octopress

octopress-2.0-3.0,ruby-3.1.1,ubuntu20.04,都無法运行。

原网页
百度缓存网页

I just installed and Compass & Sass as described here.

I got the following warning when I ran compass watch for the first time. What exactly does it mean? What should I do to fix it, do I need to do anything?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$ (master) compass watch
>>> Compass is watching for changes. Press Ctrl-C to Stop.
DEPRECATION WARNING on line 87 of /Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/css3/_deprecated-support.scss: #{} interpolation near operators will be simplified
in a future version of Sass. To preserve the current behavior, use quotes:

  unquote('"$moz-"#{$experimental-support-for-mozilla} "$webkit-"#{$experimental-support-for-webkit} "$opera-"#{$experimental-support-for-opera} "$microsoft-"#{$experimental-support-for-microsoft} "$khtml-"#{$experimental-support-for-khtml}')

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

DEPRECATION WARNING on line 92 of /Library/Ruby/Gems/2.0.0/gems/compass-core-1.0.3/stylesheets/compass/css3/_deprecated-support.scss: #{} interpolation near operators will be simplified
in a future version of Sass. To preserve the current behavior, use quotes:

  unquote('"$ie6-"#{$legacy-support-for-ie6} "$ie7-"#{$legacy-support-for-ie7} "$ie8-"#{$legacy-support-for-ie8}')

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

    write css/styles.css

1 Answer :

To fix the error message, just change the line 87 from your “_deprecated-support.scss” file to this:

1
2
3
4
5
6
7
8
9
10
11
// A debug tool for checking browser support
@mixin debug-support-matrix($experimental: true, $ie: true) {
@debug '#{"$moz-"}$experimental-support-for-mozilla'
             '#{"$webkit-"}$experimental-support-for-webkit'
             '#{"$opera-"}$experimental-support-for-opera'
             '#{"$microsoft-"}$experimental-support-for-microsoft'
             '#{"$khtml-"}$experimental-support-for-khtml';
@debug '#{"$ie6-"}$legacy-support-for-ie6'
             '#{"$ie7-"}$legacy-support-for-ie7'
             '#{"$ie8-"}$legacy-support-for-ie8';
}

The file can be found at your /home/dong/.rvm/gems/ruby-2.3.1/gems/compass-core-1.0.3/stylesheets/compass/css3/_deprecated-support.scss

人生无常,广西飞机失事

2022年3月21日下午,一架飞机在广西梧州滕县失事,132人,惨烈。
飞行数据显示,MU5735航班从昆明机场起飞后,一直在约8869米高度进行巡航。下午2点19分,飞机突然从巡航高度下降,同时飞行速度从约每小时845公里开始下降。机头垂直向下,2点21分,MU5735航班丢失ADS-B雷达信号,同地面失联。
人生无常,真的是,你永远不知道明天和意外谁先到来。
生死面前,都是小事。
珍惜。

Kex_exchange_identification: Read: Connection Reset by Peer

有時會出現標題的錯誤,ssh無法連接服務器,試過網上的幾種方法都不行,其實是國內網絡經常封鎖github,過段時間就好了。
update:

1. 收到邮件:

GitGuardian检测到您的GitHub帐户中暴露了以下OpenSSH私钥。
GitGuardian has detected the following OpenSSH Private Key exposed within your GitHub account.
新建key即可。

2. 如果把SSH key上传到仓库,会提示安全验证:

1
2
3
4
5
6
7
8
9
10
11
ERROR: We're doing an SSH key audit.
Reason: unverified automatically (private key found in a public repository)
Please visit https://github.com/settings/keys/********
to approve this key so we know it's safe.

Fingerprint:
SHA256:***********************************************

fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。