Skip to content

Commit

Permalink
update snowflake for you
Browse files Browse the repository at this point in the history
  • Loading branch information
gaolei-he committed Dec 30, 2023
1 parent 2a32f5e commit eaf5a74
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 6 deletions.
10 changes: 5 additions & 5 deletions html/nginx.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="zh">

<head>
<meta charset="UTF-8">
Expand Down Expand Up @@ -62,13 +62,13 @@ <h2 id="基本配置">基本配置</h2>
<hr>

<h2 id="启动">启动 </h2>
<p>启动Nginx</p>
<p>启动<code>Nginx</code></p>
<pre><code> sudo service nginx start</code></pre>
<p>重启Nginx</p>
<p>重启<code>Nginx</code></p>
<pre><code> sudo service nginx restart</pre><code>
<p>查看Nginx状态</p>
<p>查看<code>Nginx</code>状态</p>
<pre><code> sudo service nginx status</pre><code>
<p>停止Nginx</p>
<p>停止<code>Nginx</code></p>
<pre><code> sudo service nginx stop</pre><code>

<hr>
Expand Down
57 changes: 57 additions & 0 deletions html/snowflake.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="author" content="Gaolei He">
<meta name="description" content="how to setup nginx on your server">
<title>Koch curve</title>
</head>

<body>
<h1><a href="https://zh.wikipedia.org/wiki/%E7%A7%91%E8%B5%AB%E6%9B%B2%E7%B7%9A">雪花曲线</a></h1>

<hr>
<i>Code</i>
<p><table cellPadding=10px><tr><td><font color="#000000"><font face="monospace">
<pre>
# 用Python在本地跑
import turtle


def snow(n, size):
if n == 0:
turtle.fd(size)
return
for angle in [0, 60, -120, 60]:
turtle.left(angle)
snow(n - 1, size / 3)


# 输入n表示雪花曲线级数
# 设为[1,4]即可,数值太大效果不好
n = 3

turtle.setup(1920, 1080)
turtle.speed(1000)
turtle.penup()
turtle.goto(-300, 300)
turtle.pendown()
turtle.pensize(1)

for angle in [0, 120, 120]:
turtle.right(angle)
snow(n, 600)

turtle.done()
</pre>
</font></font></td></tr></table></p>

<hr>

<footer>
<p>Copyright &copy; <a href="https://github.com/gaolei-he">Gaolei He</a></p>
</footer>
</body>


</html>
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<h1>Welcome to my blog</h1>
<nav>
<ul>
<li>
<a href="html/snowflake.html">snowflake for you</a>
<li>
<a href="html/pointer.html">指针:循环队列的实现</a>
</li>
Expand Down Expand Up @@ -43,7 +45,7 @@ <h1>Welcome to my blog</h1>
<main></main>
<hr>
<footer>
<p>Copyright &copy; Gaolei He</p>
<p>Copyright &copy; <a href="https://github.com/gaolei-he">Gaolei He</a></p>
</footer>
</body>

Expand Down

0 comments on commit eaf5a74

Please sign in to comment.