图解机器学习 github

by Karan Thakkar

由Karan Thakkar

使用GitHub和Cloudflare建立网站的插图指南 (An illustrated guide to setting up your website using GitHub and Cloudflare)

You should read this if…

如果...,您应该阅读此内容

  1. You want to setup custom redirects or other server configuration for free

    您想免费设置自定义重定向或其他服务器配置

  2. You want to get your site on HTTPS but don’t know where to start您想在HTTPS上获取您的网站,但不知道从哪里开始
  3. You’re overwhelmed with the amount of choices out there (like Netlify, Surge, BitBalloon, Now)

    您不知所措,那里的选择太多了(如Netlify , Surge , BitBalloon , Now )

为什么选择Github? (Why Github?)

  1. Easy to setup and get started with Github Pages易于设置并开始使用Github Pages
  2. Instant deploys on pushing new code即时部署以推送新代码

为什么选择Cloudflare? (Why Cloudflare?)

  1. It’s free免费
  2. It comes with out-of-the-box support for SSL (HTTPS). (Here’s why HTTPS matters.)

    它具有对SSL(HTTPS)的开箱即用的支持。 ( 这就是HTTPS很重要的原因 。)

  3. Super simple DNS management超级简单的DNS管理
  4. Ability to set browser cache expiration for assets

    可以设置资产的浏览器缓存到期时间

  5. Auto minify your static assets自动缩小您的静态资产
  6. Custom page rules for setting up redirects, always HTTPS, etc.用于设置重定向(始终为HTTPS等)的自定义页面规则。
  7. HTTP2/SPDY for supported browsers

    适用于支持的浏览器的HTTP2 / SPDY

  8. Allows for setting up HSTS (HTTP Strict Transport Security)

    允许设置HSTS (HTTP严格传输安全性)

在我们开始之前,您需要做一些事情: (Before we get started you will need a few things:)

  1. A Github account

    一个Github帐户

  2. A Cloudflare account

    Cloudflare帐户

  3. Access to a custom domain. You can buy it from any Domain Name Registrar like: Namecheap, GoDaddy, BigRock, etc.

    访问自定义域。 您可以从任何域名注册商处购买它,例如: Namecheap , GoDaddy , BigRock等。

If all this piqued your interest, then let’s get started!

如果这一切引起了您的兴趣,那就开始吧!

第1步 :使用您的代码创建Github存储库 (Step 1: Create Github repo with your code)

  • Go to https://pages.github.com

    转到https://pages.github.com

  • Select the option Project Site to find the instructions on how to create a basic page from scratch or a custom theme

    选择选项“ 项目站点”以查找有关如何从头开始或自定义主题创建基本页面的说明。

步骤2.为存储库设置Github Pages (Step 2. Setup Github Pages for the repository)

Go to Settings for your repository. In the Github Pages section, choose the master branch to serve your website from. Once you’ve done that, you can go to https://<yourgithubusername>.github.io/repository to see your website in action as shown below.

转到存储库的设置 。 在Github Pages部分中,选择master分支来服务您的网站。 完成此操作后,您可以转到https:// <yourgithubuserna me> .gith u b.io/repo 的理论来查看您的网站的运行情况,如下所示。

步骤3.添加自定义域 (Step 3. Add custom domain)

Add the custom domain that you have bought and save it. Your website is now ready with your own custom domain ? WOOT! ✨

添加您购买的自定义域并保存。 您的网站现在可以使用您自己的自定义域了吗? 哇! ✨

So, we have everything setup on Github. We’ll start with setting up Cloudflare to jazz up your website with all the powerful features I mentioned at the beginning of this post.

因此,我们在Github上进行了所有设置。 我们将从设置Cloudflare开始,用我在本文开头提到的所有强大功能来增强您的网站。

步骤4:在Cloudflare上设置您的域 (Step 4: Setup your domain on Cloudflare)

Login to Cloudflare. If you are using it for the first time, you should see a screen like the image shown above. If you have used it before, you can click on the Add Site option in the navigation bar on the top right to add a new domain. Enter the domain you want to manage and click on Begin Scan.

登录到Cloudflare 。 如果是第一次使用它,应该会看到如上图所示的屏幕。 如果您以前使用过它,则可以单击右上角导航栏中的“ 添加站点”选项来添加新域。 输入您要管理的域,然后单击开始扫描

步骤5:为您的域设置DNS记录 (Step 5: Setup DNS Records for your domain)

In this step, we inform Cloudflare to point our domain to the Github Pages server using two A Record DNS entries: 1. 192.30.252.1532. 192.30.252.154

在这一步中,我们通知Cloudflare使用两个A Record DNS条目将我们的域指向Github Pages服务器 :1. 192.30.252.1532。 192.30.252.154

Once you have set this up, all requests to your custom domain i.e. yourcustomdomain.com will be routed to your website on Github on Step 3.

设置完成后,到您的自定义域(即yourcustomdomain.com)的所有请求都将在第3步被路由到Github上的您的网站。

There’s one more step involved before we move on to the next stage. Oftentimes, you would want to use a subdomain like www for your website, i.e. www.yourcustomdomain.com For this, you will need to add a CNAME record DNS entry which will point your subdomain(www) to your apex domain(@).

在我们进入下一个阶段之前,还需要再走一步。 通常,您可能希望使用像www这样的子域作为您的网站,即www.yourcustomdomain.com 。为此,您需要添加一个CNAME记录 DNS条目,它将您的子域(www)指向顶点域(@)。

Once you have set this up, all requests to your custom subdomain i.e. www.yourcustomdomain.com will be routed to your website on Github on Step 3.

设置完成后,所有对您的自定义子域(例如www)的请求。 yourcustomdomain.com将在第3步被路由到您在Github上的网站。

NOTE: Don’t try to go access your custom domain right away. It won’t work. We have only done the Cloudflare to Github setup. We still have to do the DNS Registrar -> Cloudflare setup. This will come up in Step 7.

注意:不要尝试立即访问您的自定义域。 它不会工作。 我们仅完成了Cloudflare至Github的设置。 我们仍然必须进行DNS注册器-> Cloudflare设置。 这将在第 7 页中提出

Click Continue to go to the next step.

单击继续转到下一步。

第6步:选择免费Cloudflare计划 (Step 6: Choose the Free Cloudflare plan)

The Free plan for Cloudflare provides a lot of sophisticated options as discussed in the Why Cloudflare? section at the beginning.

Cloudflare的免费计划提供了许多复杂的选项,如为何选择Cloudflare? 开头部分。

Click Continue to go to the next step.

单击继续转到下一步。

步骤7:在DNS注册器上更新名称服务器 (Step 7: Update Nameservers on your DNS Registrar)

Once you’re on this page, keep it open in one tab and open your DNS Registrar’s (the place from where your bought your domain) site in another. If you’re using one of the following registrar’s then the links to understand how to change Nameserver are:

进入此页面后,在一个选项卡中将其保持打开状态,然后在另一个选项卡中打开DNS注册器(您购买域名的地方)站点。 如果您使用以下注册商之一,则可以了解如何更改名称服务器的链接是:

  1. Bigrock

    巨岩

  2. Namecheap

    便宜货

  3. GoDaddy

    去吧爸爸

You need to replace the existing Nameservers in your Domain settings with the one’s on the Cloudflare page that is open in the other tab.

您需要将“域”设置中的现有名称服务器替换为在另一个标签中打开的Cloudflare页面上的名称服务器。

YASSS! You’ve successfully setup your custom domain to use Cloudflare as a DNS provider. You can go to the Overview option on the top and you will find that it is still waiting for your Nameserver change to be processed.

YASSS! 您已经成功设置了自定义域,以将Cloudflare用作DNS提供程序。 您可以转到顶部的Overview选项,您会发现它仍在等待名称服务器更改被处理。

Once the Overview tab says Status: Active, you can now try to visit your site using your custom domain, AND IT SHOULD JUST WORK! ??

一旦“ 概述”标签显示“ 状态:有效” , 您现在可以尝试使用您的自定义域访问您的网站, 并且应该可以正常使用! ??

步骤8:配置缩小 (Step 8: Configure Minification)

In the Speed setttings, in the Auto Minify section, choose the option to auto-minify everything: Javascript, CSS, HTML. This will be done by Cloudflare on-the-fly once and then cached. Whenever any of your assets change, Cloudflare will do this again for you.

在“ 速度设置”的“ 自动缩小”部分中,选择用于自动缩小所有内容的选项:Javascript,CSS,HTML。 这将由Cloudflare即时完成,然后进行缓存。 每当您的资产发生任何变化时,Cloudflare都会为您再次执行此操作。

The advantage of minification is that the size of the file delivered to your browser is a lot less since it strips off unwanted spaces and comments.

最小化的优点是,传递到浏览器的文件的大小要小得多,因为它会去除不必要的空格和注释。

步骤9:配置浏览器缓存过期 (Step 9: Configure Browser Cache Expiration)

If you scroll down on the same page as Auto Minify, you will find the Browser Cache Expiration section. It should be set to 30 days/1 month, ideally, for WebpageTest to not give you a warning. What this time indicates is that, once your site is loaded in any browser, then the browser will not request any assets for a second time until the Browser Cache time period expires for those assets.

如果您在与Auto Minify相同的页面上向下滚动,则会找到Browser Cache Expiration部分。 最好将其设置为30天/ 1个月,以使WebpageTest不向您发出警告。 这一次的意思是,一旦您的网站加载到任何浏览器中,然后浏览器将不会再次请求任何资产,直到这些资产的浏览器缓存时间段到期为止。

Before we move on to the next step, please check the Crypto settings on Cloudflare. It should say Active Certificate in the SSL section. (Note: Try reloading the page. Sometimes it doesn’t update). In the next two steps, we are going to make your site serve via HTTPS always. For that to work without any problems, it is important that you have an active certificate on Cloudflare.

在继续进行下一步之前,请检查Cloudflare上的Crypto设置。 它应该在SSL部分显示Active Certificate 。 ( 注意:尝试重新加载页面。有时它不会更新 )。 在接下来的两个步骤中,我们将使您的网站始终通过HTTPS服务 为了使它正常工作,在Cloudflare上拥有有效的证书很重要。

步骤10:配置页面规则 (Step 10: Configure Page Rules)

In this step, we are going to do two things:

在这一步中,我们将做两件事:

  1. Redirect all requests for www.yourcustomdomain.com to yourcustomdomain.com

    将对 www.yourcustomdomain.com的所有请求重定向到yourcustomdomain.com

  2. Redirect all requests for http://yourcustomdomain.com to https://yourcustomdomain.com

    将对http://yourcustomdomain.com的所有请求重定向到https://yourcustomdomain.com

Go to the Page Rules setting and click on Create Page Rule.

转到页面规则设置,然后单击创建页面规则。

For handling the www.yourcustomdomain.com to yourcustomdomain.com redirect, replace tweetify.io with yourcustomdomain.com name. Click Save and Deploy.

要处理www.yourcustomdomain.comyourcustomdomain.com重定向,请将tweetify.io替换为yourcustomdomain.com名称。 单击保存并部署

For handling the http://yourcustomdomain.com to https://yourcustomdomain.com redirect, replace tweetify.io with yourcustomdomain.com name. Click Save and Deploy.

要处理从http://yourcustomdomain.comhttps://yourcustomdomain.com重定向,请将tweetify.io替换为yourcustomdomain.com名称。 单击保存并部署

步骤11:配置HSTS (Step 11: Configure HSTS)

Go to the Crypto settings and scroll down to the HTTP Strict Transport Security (HSTS) section. Click on Enable HSTS. This will ask you to acknowledge that you know what you are doing. Before you select I understand, let me tell you why we need to enable this setting:

转到“ 加密设置”,然后向下滚动到“ HTTP严格传输安全性(HSTS)”部分。 单击启用HSTS 。 这将要求您确认您知道自己在做什么。 在选择我理解之前,让我告诉您为什么我们需要启用此设置:

If a user has opened your website in the past, from then onwards whenever the user tries to access your website, they will always be taken to the HTTPS version of your site. This makes your site load a little faster on subsequent visits because the HTTP to HTTPS redirect happens on the client and not via the Cloudflare Page Rule that we added in Step 10.

如果用户过去曾经打开过您的网站,从此以后,只要该用户尝试访问您的网站,他们将始终被带到您网站的HTTPS版本。 这使您的站点在后续访问中的加载速度更快,因为HTTP到HTTPS重定向是在客户端而不是通过我们在步骤10中添加的Cloudflare页面规则进行的。

Once you go to the next step, you should enable all the settings as shown below. You can read more details about these options here and here

转到下一步后,应启用所有设置,如下所示。 您可以在此处和此处阅读有关这些选项的更多详细信息

That’s it. You’re all set to show off your website to the world! ?? If you found this useful, please ❤️ it and share it.

而已。 你们都准备向全世界展示您的网站! ?? 如果您发现此功能有用,请❤️并分享。

Karan Thakkar is the Frontend Lead at Crowdfire - Your super-smart marketing sidekick. His article has been previously featured on The Huffington Post. He likes trying out new technologies in his spare time and has built Tweetify (using React Native) and Show My PR’s (using Golang).

Karan Thakkar是Crowdfire的前端主管- 您的超级智能营销伙伴 。 他的文章以前曾在《赫芬顿邮报 》上发表过 。 他喜欢在业余时间尝试新技术,并建立了Tweetify (使用React Native)和Show My PR (使用Golang)。

Other articles written by him:

他写的其他文章:

How I grew from 300 to 5k followers in just 3 weeks#GrowthHacking my Twitter account for @Crowdfire Twitter Premier Leagueblog.markgrowth.comUsing the Let’s Encrypt Certbot to get HTTPS on your Amazon EC2 NGINX boxLet’s Encrypt is a new Certificate Authority which provides free SSL certificates (up to a certain limit per week). It…medium.freecodecamp.com

我从300如何成长为5K的追随者在短短三周内, #GrowthHacking我的Twitter账户@Crowdfire Twitter的英超 blog.markgrowth.com 使用让我们加密Certbot以获得HTTPS在您的Amazon EC2 NGINX盒 让我们加密是一个新的证书颁发机构,其提供免费的SSL证书(每周最多有一定限制)。 它… medium.freecodecamp.com

翻译自: https://www.freecodecamp.org/news/an-illustrated-guide-for-setting-up-your-website-using-github-cloudflare-5a7a11ca9465/

图解机器学习 github

图解机器学习 github_使用Github和Cloudflare建立网站的图解指南相关推荐

  1. 图解机器学习算法(6) | 决策树模型详解(机器学习通关指南·完结)

    作者:韩信子@ShowMeAI 教程地址:https://www.showmeai.tech/tutorials/34 本文地址:https://www.showmeai.tech/article-d ...

  2. 图解机器学习算法(13) | 聚类算法详解(机器学习通关指南·完结)

    作者:韩信子@ShowMeAI 教程地址:https://www.showmeai.tech/tutorials/34 本文地址:https://www.showmeai.tech/article-d ...

  3. 28款GitHub最流行的开源机器学习项目,推荐GitHub上10 个开源深度学习框架

    20 个顶尖的 Python 机器学习开源项目 机器学习 2015-06-08 22:44:30 发布 您的评价: 0.0 收藏 1收藏 我们在Github上的贡献者和提交者之中检查了用Python语 ...

  4. 赠书 | 图解机器学习算法,看这文就够了!

    机器学习指的是计算机根据给定的问题.课题或环境进行学习,并利用学习结果解决问题或课题等的一整套机制(图 1-1). 图 1-1 分类的示意图 与机器学习共同成为热门话题的还有人工智能和深度学习.这里梳 ...

  5. 下载 | 9G火爆的Python爬虫教程+ 520页《图解机器学习》

    前段时间,小伙伴多次在后台留言询问Python爬虫教程的问题.经过这两个多月以来的收集与整理,汇集了多个高校以及公开课视频教程,包括python爬虫的入门.进阶与实践,共9G左右.爬虫作为机器学习语料 ...

  6. 30个经典机器学习项目,GitHub星星加起来超过16万丨资源

    作者 Mybridge  翻译来源 大数据文摘  伊瓢 编辑 量子位 转载 | 公众号 QbitAI Medium上的作者Mybridge从8800个项目中,挑选出了30个GitHub上收获了超多星星 ...

  7. Hinton等谈深度学习十年;PyTorch落地Linux基金会的影响;机器学习界的“GitHub”|AI系统前沿动态

    1. 重磅!PyTorch落地Linux基金会 扎克伯格亲自宣布,PyTorch基金会已新鲜成立,并归入Linux基金会旗下,管理委员会成员,包括Meta.AMD.AWS.谷歌云.微软和英伟达.Met ...

  8. 02-27 周一 图解机器学习SVM-人脸识别之PCA降维

    02-27 周一 图解机器学习SVM分类 时间 版本 修改人 描述 2023年2月27日09:48:38 V0.1 宋全恒 新建文档 简介  本文主要是在试图代码分析图解机器学习这本书中5.5人脸识别 ...

  9. 图解机器学习-空间概念-随机梯度算法matlab解释

    态射: 一种数学结构映射到另一种数学结构所使用的一种规则. 拓扑空间:   是一个集合X和其上定义的拓扑结构τ组成的二元组(X,τ).其中拓扑结构包括开集,闭集,邻域,开核,闭包等等子概念. 拓扑空间 ...

最新文章

  1. mysql connections参数_MySQL性能优化之max_connections配置参数浅析
  2. iOS代码编程规范 根据项目经验汇总
  3. 关于多线程Thread.Stop()破坏原子性
  4. 5GS 协议栈 — Overview
  5. scrapy分布式去重组件源码及其实现过程
  6. VMWare: eth0: error fetching interface information : device not found
  7. 利用data store在不同模型中传递数据
  8. 是否可能有一台算力无穷大的计算机?
  9. 【网络安全】xhCMS代码审计思路
  10. 二叉树的操作(二叉树的创建、先序遍历---先根、中序遍历----先左、后续遍历---后根)
  11. SpringMVC的数据响应-页面跳转-返回字符串形式(应用)
  12. 5.3 递归最小二乘法
  13. SQL解析之硬解析和软解析
  14. 一文弄懂Numpy中ndarray的维度(dimension)/轴数(axis/axes)问题
  15. SVN Could not open the requested SVN filesystem解决办法
  16. 在地址栏调试js(小技巧)
  17. [Cocos2d-x] init()和onEnter()方法的区别
  18. java某些基础知识点整理
  19. 栅栏密码加密/解密【传统型】在线工具
  20. PLSQL Developer 13链接oracle安装与配置手册

热门文章

  1. 大牛用SSM框架实现了支付宝的支付功能,满满干货指导
  2. Android APK 打包过程 MD
  3. Java面向对象(二)
  4. Wait Event SQL*Net more data to client
  5. Java 微信公众号导出所有粉丝(openId)
  6. net core 获取网站目录
  7. VS2015 Cordova Ionic移动开发(五)
  8. VC连接mysql数据库错误:libmysql.lib : fatal error LNK1113: invalid machine 解决方法
  9. 2015年10月13日
  10. hdu 1023 Train Problem II