diff --git a/.gitkeep b/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..858deb57 --- /dev/null +++ b/404.html @@ -0,0 +1,132 @@ + + + + + + + + + + 404 Page not found · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

404 - Page not found

+

The content you're looking for doesn't seem to exist.

+
+ + + +
+ + + +
+ + diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..f02a4f0b --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +sjtug.org diff --git a/about/index.html b/about/index.html new file mode 100644 index 00000000..c72e208c --- /dev/null +++ b/about/index.html @@ -0,0 +1,103 @@ + + + + + + + + + + About · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+

SJTUG’s a Joyful Techie User Group in Shanghai Jiao Tong University. Topics will range over projects, techniques, resources, problems, cool ideas, or just any cool stuff relevant to technology. Discussions and talks take in the form of traditional Linux User Groups that involves mailing lists and meet-ups. Hacking Thursday is our primary on-campus event since 2013 that we meet once a week for round table discussions. SJTUG is non-profit and absolutely free. All you need is curiosity and a passion for cool technologies.

+ + + +
+ + + + + + + + + + + + + + diff --git a/about/index.xml b/about/index.xml new file mode 100644 index 00000000..421bef51 --- /dev/null +++ b/about/index.xml @@ -0,0 +1,28 @@ + + + About on SJTUG - A Joyful Techie User Group + https://sjtug.org/about/ + Recent content in About on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Sun, 27 Nov 2016 15:12:37 +0800 + + + + + + About + https://sjtug.org/about/ + Sat, 20 Jun 2015 14:02:37 +0200 + + https://sjtug.org/about/ + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa ullam earum dolorum! Sed, perspiciatis.</p> +<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p> +<hr> +<h3 id="lorem-ipsum-dolor">Lorem ipsum dolor.</h3> +<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea dicta corporis ad inventore itaque impedit dolor atque amet exercitationem! Veniam qui voluptas maiores vel laudantium necessitatibus, velit ducimus! Iste hic facere, accusamus fugiat enim facilis.</p> + + + + + \ No newline at end of file diff --git a/contacts/index.html b/contacts/index.html new file mode 100644 index 00000000..7f5ddfd6 --- /dev/null +++ b/contacts/index.html @@ -0,0 +1,119 @@ + + + + + + + + + + Contacts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+

Code of conduct

+
+

You just talk about whatever you’d like to talk +about technology.

+
+
+

你可以畅所欲言 有关科技方面

+
+

To join us, you promise to follow the Code of Conduct above.

+

要加入我们,你承诺遵守上述 Code of Conduct

+

Join us

+

SJTUG 的成员分布在各个讨论组中。欢迎加入我们:SJTUG 2021 年春季招新

+

也欢迎关注我们的公共社交账号:

+ + + + +
+ + + + + + + + + + + + + + diff --git a/contacts/index.xml b/contacts/index.xml new file mode 100644 index 00000000..1bb5deb8 --- /dev/null +++ b/contacts/index.xml @@ -0,0 +1,14 @@ + + + Contacts on SJTUG - A Joyful Techie User Group + https://sjtug.org/contacts/ + Recent content in Contacts on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Sun, 27 Nov 2016 15:26:37 +0800 + + + + + + \ No newline at end of file diff --git a/css/fonts/CevicheOne-Regular.ttf b/css/fonts/CevicheOne-Regular.ttf new file mode 100644 index 00000000..c22c6d1c Binary files /dev/null and b/css/fonts/CevicheOne-Regular.ttf differ diff --git a/css/fonts/Gafata-Regular.ttf b/css/fonts/Gafata-Regular.ttf new file mode 100644 index 00000000..f07035c0 Binary files /dev/null and b/css/fonts/Gafata-Regular.ttf differ diff --git a/css/highlight.css b/css/highlight.css new file mode 100644 index 00000000..2d4e0878 --- /dev/null +++ b/css/highlight.css @@ -0,0 +1,107 @@ +/* + IR_Black style (c) Vasily Mikhailitchenko +*/ + +.hljs { + display: block; + overflow-x: auto; + /*padding: 0.5em;*/ + background: #272b2d; + color: #d0d0d0; + -webkit-text-size-adjust: none; +} + +.hljs-shebang, +.hljs-comment { + color: #777279; +} + +.hljs-keyword, +.hljs-tag, +.tex .hljs-command, +.hljs-request, +.hljs-status, +.clojure .hljs-attribute { + color: #ebde68; +} + +.hljs-sub .hljs-keyword, +.method, +.hljs-list .hljs-title, +.nginx .hljs-title { + color: #ffffb6; +} + +.hljs-string, +.hljs-tag .hljs-value, +.hljs-cdata, +.hljs-filter .hljs-argument, +.hljs-attr_selector, +.apache .hljs-cbracket, +.hljs-date, +.coffeescript .hljs-attribute { + color: #c1ef65; +} + +.hljs-subst { + color: #daefa3; +} + +.hljs-regexp { + color: #e9c062; +} + +.hljs-title, +.hljs-sub .hljs-identifier, +.hljs-pi, +.hljs-decorator, +.tex .hljs-special, +.hljs-type, +.hljs-constant, +.smalltalk .hljs-class, +.hljs-doctag, +.nginx .hljs-built_in { + color: #c1ef65; +} + +.hljs-symbol, +.ruby .hljs-symbol .hljs-string, +.hljs-number, +.hljs-variable, +.vbscript, +.hljs-literal, +.hljs-name { + color: #77bcd7; +} + +.css .hljs-tag { + color: #96cbfe; +} + +.css .hljs-rule .hljs-property, +.css .hljs-id { + color: #ffffb6; +} + +.css .hljs-class { + color: #fff; +} + +.hljs-hexcolor { + color: #c6c5fe; +} + +.hljs-number { + color:#77bcd7; +} + +.coffeescript .javascript, +.javascript .xml, +.tex .hljs-formula, +.xml .javascript, +.xml .vbscript, +.xml .css, +.xml .hljs-cdata { + opacity: 0.7; +} + diff --git a/css/monosocialiconsfont.css b/css/monosocialiconsfont.css new file mode 100755 index 00000000..c2eb817e --- /dev/null +++ b/css/monosocialiconsfont.css @@ -0,0 +1,25 @@ +@font-face { + font-family: 'Mono Social Icons Font'; + src: url('../fonts/MonoSocialIconsFont-1.10.eot'); + src: url('../fonts/MonoSocialIconsFont-1.10.eot?#iefix') format('embedded-opentype'), + url('../fonts/MonoSocialIconsFont-1.10.woff') format('woff'), + url('../fonts/MonoSocialIconsFont-1.10.ttf') format('truetype'), + url('../fonts/MonoSocialIconsFont-1.10.svg#MonoSocialIconsFont') format('svg'); + src: url('../fonts/MonoSocialIconsFont-1.10.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +.symbol, a.symbol:before { + font-family: 'Mono Social Icons Font'; + -webkit-text-rendering: optimizeLegibility; + -moz-text-rendering: optimizeLegibility; + -ms-text-rendering: optimizeLegibility; + -o-text-rendering: optimizeLegibility; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-font-smoothing: antialiased; + -ms-font-smoothing: antialiased; + -o-font-smoothing: antialiased; + font-smoothing: antialiased; +} \ No newline at end of file diff --git a/css/style.css b/css/style.css new file mode 100644 index 00000000..da727058 --- /dev/null +++ b/css/style.css @@ -0,0 +1,736 @@ +/* Reset */ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} +*, *:before, *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } + +/* Clearfix */ +.clearfix:after { + content: ""; + display: table; + clear: both; +} +.hidden { display: none; } + +/* Icons */ +@font-face { + font-family: 'icons'; + src: url('../fonts/icons.eot'); + src: url('../fonts/icons.eot#iefix') format('embedded-opentype'), + url('../fonts/icons.woff') format('woff'), + url('../fonts/icons.ttf') format('truetype'), + url('../fonts/icons.svg#icons') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="icon-"]:before, [class*=" icon-"]:before { + font-family: "icons"; + font-style: normal; + font-weight: normal; + speak: none; + display: inline-block; + text-decoration: inherit; + text-align: center; + font-variant: normal; + text-transform: none; + line-height: 1em; +} +.icon-facebook:before { content: '\e802'; } +.icon-facebook-squared:before { content: '\e800'; } +.icon-twitter:before { content: '\e801'; } +.icon-twitter-1:before { content: '\e804'; } +.icon-facebook-circled:before { content: '\e805'; } +.icon-twitter-circled:before { content: '\e806'; } +.icon-facebook-rect:before { content: '\e803'; } + +/* Spacing */ +.post h1, h3, h4, h5, p, .post-body ul, #post-list li, pre { +margin-bottom: 20px; +} + +/* Base */ +html, body { height: 100%; } + +body { + font:16px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; + color: #666; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; +} + +h1 { + font-size: 30px; + letter-spacing: -1px; + color: #222; + font-weight: bold; +} + +h2 { + font: italic 19px/1.3em Georgia,serif; + color: #bbb; +} + +.profile #wrapper { + padding: 100px 40px 0px; + max-width: 600px; + margin: 0 auto; +} + +.profile #header { + border-bottom: 1px solid #eee; + margin-bottom: 40px; + padding-bottom: 40px; + text-align: center; + position: relative; +} + +.profile #avatar { + display: inline-block; + width: 150px; + height: 150px; + background-image: url(/images/avatar.png); + background-position: center center; + background-repeat: no-repeat; +} + +.profile h1 { + font-weight: 400; + letter-spacing: 0px; + font-size: 20px; + color: #222; +} + +.profile h2 { + font-size: 20px; + font-weight: 300; + color: #aaa; + margin-top: 10px; + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-style: normal; + +} + +nav.main-nav { + padding: 20px 20px 0; + + /*max-width: 600px;*/ + /*width:100%;*/ + background: #fff; + background: rgba(255,255,255,.90); + margin: 0 auto; + text-align: right; + /*position: fixed;*/ + z-index: 100; +} + +nav.main-nav a { + top: 8px; + right: 6px; + padding: 8px 12px; + color: #5badf0; + font-size: 13px; + /*font-weight: bold;*/ + line-height: 1.35; + border-radius: 3px; + +} +nav.main-nav a.cta { + background: #5badf0; + color: #fff; + margin-left: 12px; +} + +#wrapper { + max-width: 600px; + margin: 0 auto; + padding: 60px 40px 100px 40px; +} + +#wrapper.home { + max-width: 600px; + margin: 0 auto; + padding: 0px 40px 20px 40px; +} + +.home #avatar { + float: right; + width: 40px; + height: 40px; + border-radius: 50%; +} + +/* Typography */ +/*Accent color*/ +a, +#post-list a:hover, +#post-list li:hover .dates { + text-decoration: none; + color: #5badf0; + color: #5694f1; +} + +p a { color: #5694f1; } + +/*Transitions*/ +a, +#post-nav a, +#post-list a { + -webkit-transition: all 0.15s ease; + -moz-transition: all 0.15s ease; + -ms-transition: all 0.15s ease; + -o-transition: all 0.15s ease; + transition: all 0.15s ease; +} + +ul { margin:0; padding:0; } +li { list-style-type:circle; list-style-position:inside; } + +/* Line Height */ +#post-body, p { line-height:1.7; } + +b, strong { font-weight: 500; + color: #1E2025; } +em, i { font-style: italic; } + +.description { + float: right; + font: italic 14px/1.4em Georgia,serif; + color: #aaa; +} + + + +.home h1 { + font-size: 30px; + letter-spacing: -1px; + color: #222; + font-weight: bold; +} + +.home h2 { + font: italic 19px/1.3em Georgia,serif; + color: #bbb; +} + +.post header { + text-align:center; + +} + +.post h1 { + margin-bottom: 20px; + color: #222; + font: 300 32px/1.4em "Helvetica Neue", Helvetica,Arial,sans-serif; +} + +.post h2 { + margin-bottom: 40px; + font: 300 24px/1.5 "Helvetica Neue",Helvetica,Arial,sans-serif; + color: #111; +} + + +.post h2.headline { + /*font: italic 22px/1.3em Georgia,serif;*/ + font: normal 13px/1.5em "Helvetica Neue",Helvetica,Arial,sans-serif; + margin: -5px 0 40px 0; + color: #b2b9be; + font-size: 13px; + text-transform: uppercase; + letter-spacing: 2px; + /*margin-top: 15px;*/ + display: inline-block; +} + +#post-list h2 { + font: normal 17px/1.5em "Helvetica Neue",Helvetica,Arial,sans-serif; + color: #aaa; + max-width: 400px; + margin-top: 2px; +} + +h3, h4, h5 { color:#333; } + +h3 { font-size:20px; font-weight: 400; } +h4 { font-size:16px; font-weight:bold; } +h5 { font-size:15px; font-weight: bold; } + +h6 { + font-size: 13px; + font-weight: bold; + color: #666; + margin-bottom: 6px; +} + +p.small { + color: #bbb; + font-size: 14px; + line-height: 1.5; + display: block; + text-align: center; + margin-top: 20px; +} + +blockquote { + padding-left: 15px; + border-left: 3px solid #eee; +} + +hr { + display: block; + border: none; + height: 1px; + margin: 40px auto; + background: #eee; +} + +span.code { font-family:Menlo, Monaco, Courier; background-color:#EEE; font-size:14px; } + +pre { + font-family:Menlo, Monaco, Courier; + white-space:pre-wrap; + /*border: 1px solid #ddd;*/ + padding:20px; + background-color:#fdfdfd; + /*font-size:14px;*/ + overflow:auto; + border-radius: 3px; + background: #272b2d; + font-family: 'Source Code Pro',Menlo,monospace; + font-size: 13px; + line-height: 1.5em; + font-weight: 500; + color: #d0d4d7; + +} + +table { + width: 100%; + margin: 40px 0; + border-collapse: collapse; + font-size: 13px; + line-height: 1.5em; +} + +th,td { + text-align: left; + padding-right: 20px; + vertical-align: top; +} + +table td,td { + border-spacing: none; + border-style: solid; + padding: 10px 15px; + border-width: 1px 0 0 0; +} + +tr>td { + border-top: 1px solid #eaeaea; +} + +tr:nth-child(odd)>td { + background: #fcfcfc; +} + +thead th,th { + text-align: left; + padding: 10px 15px; + height: 20px; + font-size: 13px; + font-weight: bold; + color: #444; + border-bottom: 1px solid #dadadc; + cursor: default; + white-space: nowrap; +} + +img { + width: 100%; + max-width: 100%; + border-radius: 3px; +} + +/* Made with Cactus Badge */ +#badge { + position: absolute; + bottom: 8px; + right: 8px; + height: 48px; + width: 48px; +} + +/*========================================= +Post List +=========================================== */ +#post-list,#archive-list { + margin-top: 100px; +} + +#post-list li,#archive-list li { + list-style-type: none; +} + +#post-list li:last-child { + margin-bottom: 0; +} + +#post-list li+li { + padding-top: 20px; + border-top: 1px solid #eee; +} + +#post-list a { + color: #333; + display: block; + font: bold 19px/1.7 "Helvetica Neue",helvetica,Arial,sans-serif; +} + +#post-list .dates { + float: right; + position: relative; + top: 1px; + font: 300 17px/1.8 "Helvetica Neue",helvetica,Arial,sans-serif; + color: #bbb; +} + +#post-list-footer { + border-top: 1px solid #eee; + margin-top: 20px; + padding-top: 100px; +} + +#archive-link { + display: inline-block; + font-size: 13px; + font-weight: bold; + border-radius: 4px; + padding: 3px 10px 6px; + box-shadow: 0 0 0 1px hsla(207,83%,80%,1); +} + +#archive-link:hover { + background: #5694f1; + color: #fff; + box-shadow: 0 0 0 1px #5694f1; +} + +#archive-link span { + position: relative; + top: 0; + font-size: 17px; +} + +#footer { + box-shadow: inset 0 1px 0 #eee; + padding: 40px 0 0 0; + margin-top: 100px; +} + +/* Post Page */ +#header { + border-bottom: 1px solid #eee; +} + +.post { + margin: 80px 0 0 0; +} + +#post-meta { + font-size: 13px; + font-weight: bold; + line-height: 1.4; + border-top: 1px solid #eee; + padding-top: 40px; + margin-bottom: 40px; + padding-bottom: 40px; + margin-top: 40px; + color:#444; + border-bottom: 1px solid #eee; +} + +#post-meta div span { + color: #aaa; + font-weight: 500; + display: block; +} + +#post-meta div span.dark { + color: #1E2025; + +} + +#post-meta div { + margin: 0 25px 0 0; + float: left; +} + +#sharing { + float: right; + margin: -2px; +} + +#sharing a { + font-size: 20px; + font-size: 23px; + margin-left: 1px; + margin-top: 4px; + color: #d4d4d4; + display: inline-block; + vertical-align: middle; +} + +#sharing a:hover { + /*color: #444;*/ + opacity: 0.8; +} + +/* Post Navigation */ +#post-nav { + border-top:1px solid #eee; + text-align:center; + padding-top:20px; + font-size:13px; + font-weight:500; + margin-top: 40px; +} + +#post-nav span { + -webkit-transition: all 0.1s linear; + -moz-transition: all 0.1s linear; + -ms-transition: all 0.1s linear; + -o-transition: all 0.1s linear; + transition: all 0.1s linear; + position: relative; +} + +#post-nav span.prev { + float: left; +} + +#post-nav span.next { + float: right; +} + +#post-nav span .arrow { + position: relative; + padding: 1px; +} + +#post-nav span.prev:hover .arrow { + left: -4px; +} + +#post-nav span.next:hover .arrow { + right: -4px; +} + +#post-nav span.prev:hover { + left: -3px; +} + +#post-nav span.next:hover { + right: -3px; +} + +/* Archive */ +h1.archive { + margin-bottom: 0px; +} + +h2.month { + width: 100%; + font: bold 13px/1 "Helvetica Neue",helvetica,Arial,sans-serif; + text-transform: uppercase; + margin-top: 40px; + margin-bottom: 10px; + padding-bottom: 10px; + border-bottom: 1px solid #eee; +} + +#archive-list li:last-child { + margin-bottom: 0; +} + +#archive-list a { + display: block; + font: bold 17px/1.7 "Helvetica Neue",helvetica,Arial,sans-serif; + color: #333; +} + +#archive-list .dates { + float: right; + position: relative; + top: 1px; + font: 300 17px/1.7 "Helvetica Neue",helvetica,Arial,sans-serif; + color: #bbb; +} + +#archive-list li a:hover,#archive-list li:hover .dates { + color: #5694f1; +} + +#post-meta img.avatar { + height: 36px; + width: 36px; + float: left; + border-radius: 50%; + margin-top: 3px; + margin-right: 20px; + box-shadow: 0 0 0 3px #fff, 0 0 0 4px #eee; +} + +#post-list.archive.readmore h3{ + + font: 400 20px "Helvetica Neue", Helvetica,Arial,sans-serif; + margin-bottom: 30px; +} + +#post-list.archive.readmore a{ + font: 400 16px/1.6 "Helvetica Neue",helvetica,Arial,sans-serif; + color: #5694f1; +} + +#post-list.archive.readmore a:hover{ + opacity: 0.8; +} + +#post-list.archive.readmore .dates{ + font: 300 16px/1.6 "Helvetica Neue",helvetica,Arial,sans-serif; +} +#sharing a.facebook { + background: #4361b3; +} +#sharing a.twitter { + background: #4fafed; +} + +#sharing a { + font-size: 20px; + font-size: 13px; + font-weight: bold; + color: #fff; + padding: 6px 10px; + border-radius: 4px; + margin-left: 2px; +} + +/* Media Queries */ +@media screen and (max-width: 540px) { + #wrapper { padding:20px 20px 20px 20px;} + #header { margin-bottom: 60px; border-bottom: 1px solid #eee; } + .post { margin: 40px 0; } + #footer { margin-top: 60px; } + + #post-list, #archive-list { margin-top: 0; } + #post-meta { margin-top: 60px; } + + #post-list .dates { display: none; } + + #post-list-footer { margin-top: 20px; padding-top: 40px; } + + h1 { font-size: 26px; } + .post h2.headline { font-size: 13px; } + .post h1 { font-size:24px; } + .post h2 { font-size:20px; } +} + + +/* CUSTOM ADDITIONS */ + +#social { + display: flex; + flex-direction: row; + justify-content: center; +} + +a.symbol { + color: #cdd4da; + font-size: 2rem; + text-decoration: none; + margin-right: 0.3rem; +} + +a.symbol:hover { + color: #BCD4DA; +} + +code { + font-family:Menlo, Monaco, Courier; + background-color:#EEE; font-size:14px; + padding: 4px; + font-weight: 600; +} + +/* Rocket */ + +@font-face { + font-family: 'Gafata'; + font-style: normal; + font-weight: 400; + src: url(fonts/Gafata-Regular.ttf) format('truetype'); +} + +@font-face { + font-family: 'Ceviche One'; + font-style: normal; + font-weight: 400; + src: url(fonts/CevicheOne-Regular.ttf) format('truetype'); +} + +.container { + width: 240px; + margin: 0 auto; +} + +#logo { + width:240px; + height:240px; + background-image: url(/images/Rocket240.png); + background-position: center center; + background-size: 100% 100%; + background-repeat: no-repeat; +} + +#logo .backcircle { + display:none; + background: rgb(243,165,51); + width:220px; + height:220px; + margin:10px; + position: absolute; + z-index:-99; + -webkit-border-radius: 110px; + -moz-border-radius: 110px; + -ms-border-radius: 110px; + -o-border-radius: 110px; + border-radius: 110px; +} + +#logo.ani { + background-image: none; +} + +#logo.ani .backcircle{ + display:block; +} + +#title { + text-align: center; + margin: 20px 0 40px; +} + +#title h1 { + font-family: 'Ceviche One', cursive; + font-size: 80px; + margin:0; +} + +#title small { + font-size: 22px; + color: #666; +} + +.list-image-wrapper { + max-height: 300px; + overflow: hidden; +} diff --git a/fontawesome/css/font-awesome.min.css b/fontawesome/css/font-awesome.min.css new file mode 100644 index 00000000..d0603cb4 --- /dev/null +++ b/fontawesome/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"} diff --git a/fontawesome/fonts/FontAwesome.otf b/fontawesome/fonts/FontAwesome.otf new file mode 100644 index 00000000..3ed7f8b4 Binary files /dev/null and b/fontawesome/fonts/FontAwesome.otf differ diff --git a/fontawesome/fonts/fontawesome-webfont.eot b/fontawesome/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..9b6afaed Binary files /dev/null and b/fontawesome/fonts/fontawesome-webfont.eot differ diff --git a/fontawesome/fonts/fontawesome-webfont.svg b/fontawesome/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..d05688e9 --- /dev/null +++ b/fontawesome/fonts/fontawesome-webfont.svg @@ -0,0 +1,655 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fontawesome/fonts/fontawesome-webfont.ttf b/fontawesome/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..26dea795 Binary files /dev/null and b/fontawesome/fonts/fontawesome-webfont.ttf differ diff --git a/fontawesome/fonts/fontawesome-webfont.woff b/fontawesome/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..dc35ce3c Binary files /dev/null and b/fontawesome/fonts/fontawesome-webfont.woff differ diff --git a/fontawesome/fonts/fontawesome-webfont.woff2 b/fontawesome/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000..500e5172 Binary files /dev/null and b/fontawesome/fonts/fontawesome-webfont.woff2 differ diff --git a/fonts/MonoSocialIconsFont-1.10.eot b/fonts/MonoSocialIconsFont-1.10.eot new file mode 100755 index 00000000..100b2b34 Binary files /dev/null and b/fonts/MonoSocialIconsFont-1.10.eot differ diff --git a/fonts/MonoSocialIconsFont-1.10.otf b/fonts/MonoSocialIconsFont-1.10.otf new file mode 100755 index 00000000..6debb040 Binary files /dev/null and b/fonts/MonoSocialIconsFont-1.10.otf differ diff --git a/fonts/MonoSocialIconsFont-1.10.svg b/fonts/MonoSocialIconsFont-1.10.svg new file mode 100755 index 00000000..ead38ff3 --- /dev/null +++ b/fonts/MonoSocialIconsFont-1.10.svg @@ -0,0 +1,1013 @@ + + + + +Created by Ivan Drinchev. OFL license +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/MonoSocialIconsFont-1.10.ttf b/fonts/MonoSocialIconsFont-1.10.ttf new file mode 100755 index 00000000..20cdb85f Binary files /dev/null and b/fonts/MonoSocialIconsFont-1.10.ttf differ diff --git a/fonts/MonoSocialIconsFont-1.10.woff b/fonts/MonoSocialIconsFont-1.10.woff new file mode 100755 index 00000000..47df3a9b Binary files /dev/null and b/fonts/MonoSocialIconsFont-1.10.woff differ diff --git a/fonts/icons.svg b/fonts/icons.svg new file mode 100644 index 00000000..83f103bf --- /dev/null +++ b/fonts/icons.svg @@ -0,0 +1,18 @@ + + + +Copyright (C) 2013 by original authors @ fontello.com + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fonts/icons.ttf b/fonts/icons.ttf new file mode 100644 index 00000000..1b4e5a00 Binary files /dev/null and b/fonts/icons.ttf differ diff --git a/fonts/icons.woff b/fonts/icons.woff new file mode 100644 index 00000000..a6469ba8 Binary files /dev/null and b/fonts/icons.woff differ diff --git a/images/2018-01.jpg b/images/2018-01.jpg new file mode 100644 index 00000000..3b3f68b0 Binary files /dev/null and b/images/2018-01.jpg differ diff --git a/images/2021-11.cover.jpeg b/images/2021-11.cover.jpeg new file mode 100644 index 00000000..e5319cd9 Binary files /dev/null and b/images/2021-11.cover.jpeg differ diff --git a/images/2021-11.in-event.jpeg b/images/2021-11.in-event.jpeg new file mode 100644 index 00000000..fe7ee47c Binary files /dev/null and b/images/2021-11.in-event.jpeg differ diff --git a/images/2023-06.cover.jpeg b/images/2023-06.cover.jpeg new file mode 100644 index 00000000..7d812afe Binary files /dev/null and b/images/2023-06.cover.jpeg differ diff --git a/images/2023-06.in-event.jpeg b/images/2023-06.in-event.jpeg new file mode 100644 index 00000000..2de914bb Binary files /dev/null and b/images/2023-06.in-event.jpeg differ diff --git a/images/Rocket240.png b/images/Rocket240.png new file mode 100644 index 00000000..52248d35 Binary files /dev/null and b/images/Rocket240.png differ diff --git a/images/Rocket480.png b/images/Rocket480.png new file mode 100644 index 00000000..aa7fc16c Binary files /dev/null and b/images/Rocket480.png differ diff --git a/images/act.jpeg b/images/act.jpeg new file mode 100644 index 00000000..70e2f471 Binary files /dev/null and b/images/act.jpeg differ diff --git a/images/act2.jpeg b/images/act2.jpeg new file mode 100644 index 00000000..52bc4c69 Binary files /dev/null and b/images/act2.jpeg differ diff --git a/images/avatar.png b/images/avatar.png new file mode 100644 index 00000000..aa7fc16c Binary files /dev/null and b/images/avatar.png differ diff --git a/images/avatar@2x.png b/images/avatar@2x.png new file mode 100644 index 00000000..da069a09 Binary files /dev/null and b/images/avatar@2x.png differ diff --git a/images/dependent-type.jpg b/images/dependent-type.jpg new file mode 100644 index 00000000..010662d6 Binary files /dev/null and b/images/dependent-type.jpg differ diff --git a/images/favicon.ico b/images/favicon.ico new file mode 100644 index 00000000..a2853f4a Binary files /dev/null and b/images/favicon.ico differ diff --git a/images/halvm.jpg b/images/halvm.jpg new file mode 100644 index 00000000..f00e137c Binary files /dev/null and b/images/halvm.jpg differ diff --git a/images/life-of-a-packet.png b/images/life-of-a-packet.png new file mode 100644 index 00000000..2481b9b8 Binary files /dev/null and b/images/life-of-a-packet.png differ diff --git a/images/memory-model.png b/images/memory-model.png new file mode 100644 index 00000000..a2d69d91 Binary files /dev/null and b/images/memory-model.png differ diff --git a/images/physics-engine.png b/images/physics-engine.png new file mode 100644 index 00000000..6f74169f Binary files /dev/null and b/images/physics-engine.png differ diff --git a/images/wechat_qrcode.jpg b/images/wechat_qrcode.jpg new file mode 100644 index 00000000..853ccd1a Binary files /dev/null and b/images/wechat_qrcode.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..1e58ca0a --- /dev/null +++ b/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/index.xml b/index.xml new file mode 100644 index 00000000..56ed21ea --- /dev/null +++ b/index.xml @@ -0,0 +1,59 @@ + + + SJTUG - A Joyful Techie User Group + https://sjtug.org/ + Recent content on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Thu, 02 Nov 2023 12:08:00 -0700 + + + + + + Posts + https://sjtug.org/post/ + Thu, 02 Nov 2023 12:08:00 -0700 + + https://sjtug.org/post/ + + + + + Contacts + https://sjtug.org/contacts/ + Sun, 27 Nov 2016 15:26:37 +0800 + + https://sjtug.org/contacts/ + <h2 id="code-of-conduct">Code of conduct</h2> +<blockquote> +<p>You just talk about whatever you&rsquo;d like to talk +about technology.</p> +</blockquote> +<blockquote> +<p>你可以畅所欲言 有关科技方面</p> +</blockquote> +<p>To join us, you promise to follow the Code of Conduct above.</p> +<p>要加入我们,你承诺遵守上述 Code of Conduct</p> +<h2 id="join-us">Join us</h2> +<p>SJTUG 的成员分布在各个讨论组中。欢迎加入我们:<a href="https://sjtug.org/post/2021-03-09-welcome/">SJTUG 2021 年春季招新</a>。</p> +<p>也欢迎关注我们的公共社交账号:</p> +<ul> +<li>Twitter: <a href="http://twitter.com/sjtug">@sjtug</a></li> +<li>GitHub: <a href="https://github.com/sjtug">@sjtug</a></li> +</ul> + + + + + About + https://sjtug.org/about/ + Sun, 27 Nov 2016 15:12:37 +0800 + + https://sjtug.org/about/ + <p>SJTUG&rsquo;s a Joyful Techie User Group in <a href="http://sjtu.edu.cn">Shanghai Jiao Tong University</a>. Topics will range over projects, techniques, resources, problems, cool ideas, or just any cool stuff relevant to technology. Discussions and talks take in the form of traditional <a href="https://en.wikipedia.org/wiki/Linux_user_group">Linux User Groups</a> that involves mailing lists and meet-ups. Hacking Thursday is our primary on-campus event since 2013 that we meet once a week for round table discussions. SJTUG is non-profit and absolutely free. All you need is curiosity and a passion for cool technologies.</p> + + + + + \ No newline at end of file diff --git a/js/highlight.js b/js/highlight.js new file mode 100644 index 00000000..3c555716 --- /dev/null +++ b/js/highlight.js @@ -0,0 +1 @@ +!function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(//gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/no-?highlight|plain|text/.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/.exec(i))return E(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(E(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset"}function u(e){f+=""}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,f="",l=[];e.length||r.length;){var g=i();if(f+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){l.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);l.reverse().forEach(o)}else"start"==g[0].event?l.push(g[0].node):l.pop(),c(g.splice(0,1)[0])}return f+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var f=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=f.length?t(f.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){for(var t=0;t";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(B);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(B);r;){e+=n(B.substr(t,r.index-t));var a=g(L,r);a?(y+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(B)}return e+n(B.substr(t))}function d(){if(L.sL&&!x[L.sL])return n(B);var e=L.sL?f(L.sL,B,!0,M[L.sL]):l(B);return L.r>0&&(y+=e.r),"continuous"==L.subLanguageMode&&(M[L.sL]=e.top),h(e.language,e.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,B=""):e.eB?(k+=n(t)+r,B=""):(k+=r,B=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(B+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(B+=t),k+=b();do L.cN&&(k+=""),y+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),B="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"")+'"');return B+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,L=i||N,M={},k="";for(R=L;R!=N;R=R.parent)R.cN&&(k=h(R.cN,"",!0)+k);var B="",y=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),R=L;R.parent;R=R.parent)R.cN&&(k+="");return{r:y,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function l(e,t){t=t||w.languages||Object.keys(x);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(E(n)){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return w.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,w.tabReplace)})),w.useBR&&(e=e.replace(/\n/g,"
")),e}function h(e,n,t){var r=n?R[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;w.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e;var r=t.textContent,o=n?f(n,r,!0):l(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){w=o(w,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){R[e]=n})}function N(){return Object.keys(x)}function E(e){return x[e]||x[R[e]]}var w={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},x={},R={};return e.highlight=f,e.highlightAuto=l,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=E,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",bK:"TODO FIXME NOTE BUG XXX",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(r)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:r.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{cN:"attribute",b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"[a-z\\d_]*_t"},r={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c","cc","h","c++","h++","hpp"],k:r,i:""]',k:"include",i:"\\n"},t.CLCM]},{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:r,c:["self",e]},{b:t.IR+"::",k:r},{bK:"new throw return else",r:0},{cN:"function",b:"("+t.IR+"\\s+)+"+t.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:t.IR+"\\s*\\(",rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[t.CBCM]},t.CLCM,t.CBCM]}]}});hljs.registerLanguage("swift",function(e){var i={keyword:"class deinit enum extension func import init let protocol static struct subscript typealias var break case continue default do else fallthrough if in for return switch where while as dynamicType is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ __LINE__ associativity didSet get infix inout left mutating none nonmutating operator override postfix precedence prefix right set unowned unowned safe unsafe weak willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue assert bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced join lexicographicalCompare map max maxElement min minElement numericCast partition posix print println quickSort reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith strideof strideofValue swap swift toString transcode underestimateCount unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafePointers withVaList"},t={cN:"type",b:"\\b[A-Z][\\w']*",r:0},n=e.C("/\\*","\\*/",{c:["self"]}),r={cN:"subst",b:/\\\(/,e:"\\)",k:i,c:[]},s={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0},o=e.inherit(e.QSM,{c:[r,e.BE]});return r.c=[s],{k:i,c:[o,e.CLCM,n,t,s,{cN:"func",bK:"func",e:"{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/,i:/\(/}),{cN:"generics",b://,i:/>/},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:i,c:["self",s,o,e.CBCM,{b:":"}],i:/["']/}],i:/\[|%/},{cN:"class",bK:"struct protocol class extension enum",k:i,e:"\\{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{cN:"preprocessor",b:"(@assignment|@class_protocol|@exported|@final|@lazy|@noreturn|@NSCopying|@NSManaged|@objc|@optional|@required|@auto_closure|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix)"}]}});hljs.registerLanguage("python",function(e){var r={cN:"prompt",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},l={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},c={cN:"params",b:/\(/,e:/\)/,c:["self",r,l,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,l,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,c]},{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",e:/;/,eW:!0,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("java",function(e){var a=e.UIR+"(<"+e.UIR+">)?",t="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",c="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",r={cN:"number",b:c,r:0};return{aliases:["jsp"],k:t,i:/<\//,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+a+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},r,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("actionscript",function(e){var a="[a-zA-Z_$][a-zA-Z0-9_$]*",c="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",t={cN:"rest_arg",b:"[.]{3}",e:a,r:10};return{aliases:["as"],k:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},c:[e.ASM,e.QSM,e.CLCM,e.CBCM,e.CNM,{cN:"package",bK:"package",e:"{",c:[e.TM]},{cN:"class",bK:"class interface",e:"{",eE:!0,c:[{bK:"extends implements"},e.TM]},{cN:"preprocessor",bK:"import include",e:";"},{cN:"function",bK:"function",e:"[{;]",eE:!0,i:"\\S",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",c:[e.ASM,e.QSM,e.CLCM,e.CBCM,t]},{cN:"type",b:":",e:c,r:10}]}]}});hljs.registerLanguage("ruby",function(e){var c="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",b={cN:"doctag",b:"@[A-Za-z]+"},a={cN:"value",b:"#<",e:">"},n=[e.C("#","$",{c:[b]}),e.C("^\\=begin","^\\=end",{c:[b],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(n)},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:c}),i].concat(n)},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:c}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(n),r:0}].concat(n);s.c=d,i.c=d;var o="[>?]>",l="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",N=[{b:/^\s*=>/,cN:"status",starts:{e:"$",c:d}},{cN:"prompt",b:"^("+o+"|"+l+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,c:n.concat(N).concat(d)}});hljs.registerLanguage("dart",function(e){var t={cN:"subst",b:"\\$\\{",e:"}",k:"true false null this is new super"},r={cN:"string",v:[{b:"r'''",e:"'''"},{b:'r"""',e:'"""'},{b:"r'",e:"'",i:"\\n"},{b:'r"',e:'"',i:"\\n"},{b:"'''",e:"'''",c:[e.BE,t]},{b:'"""',e:'"""',c:[e.BE,t]},{b:"'",e:"'",i:"\\n",c:[e.BE,t]},{b:'"',e:'"',i:"\\n",c:[e.BE,t]}]};t.c=[e.CNM,r];var n={keyword:"assert break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch this throw true try var void while with",literal:"abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{k:n,c:[r,e.C("/\\*\\*","\\*/",{sL:"markdown",subLanguageMode:"continuous"}),e.C("///","$",{sL:"markdown",subLanguageMode:"continuous"}),e.CLCM,e.CBCM,{cN:"class",bK:"class interface",e:"{",eE:!0,c:[{bK:"extends implements"},e.UTM]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"},{b:"=>"}]}});hljs.registerLanguage("erlang",function(e){var r="[a-z'][a-zA-Z0-9_']*",c="("+r+":"+r+"|"+r+")",a={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},n=e.C("%","$"),i={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},b={b:"fun\\s+"+r+"/\\d+"},d={b:c+"\\(",e:"\\)",rB:!0,r:0,c:[{cN:"function_name",b:c,r:0},{b:"\\(",e:"\\)",eW:!0,rE:!0,r:0}]},o={cN:"tuple",b:"{",e:"}",r:0},t={cN:"variable",b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0},l={cN:"variable",b:"[A-Z][a-zA-Z0-9_]*",r:0},f={b:"#"+e.UIR,r:0,rB:!0,c:[{cN:"record_name",b:"#"+e.UIR,r:0},{b:"{",e:"}",r:0}]},s={bK:"fun receive if try case",e:"end",k:a};s.c=[n,b,e.inherit(e.ASM,{cN:""}),s,d,e.QSM,i,o,t,l,f];var u=[n,b,s,d,e.QSM,i,o,t,l,f];d.c[1].c=u,o.c=u,f.c[1].c=u;var v={cN:"params",b:"\\(",e:"\\)",c:u};return{aliases:["erl"],k:a,i:"(",rB:!0,i:"\\(|#|//|/\\*|\\\\|:|;",c:[v,e.inherit(e.TM,{b:r})],starts:{e:";|\\.",k:a,c:u}},n,{cN:"pp",b:"^-",e:"\\.",r:0,eE:!0,rB:!0,l:"-"+e.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",c:[v]},i,e.QSM,f,t,l,o,{b:/\.$/}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"(AV|CA|CF|CG|CI|MK|MP|NS|UI)\\w+"},i={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},o=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:i,l:o,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:o,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"pi",r:10,b:/^\s*['"]use (strict|asm)['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{bK:"import",e:"[;$]",k:"import from as",c:[e.ASM,e.QSM]},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]}]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"title",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link_url",e:"$"}}]}]}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],l={cN:"value",e:",",eW:!0,eE:!0,c:i,k:t},c={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:l}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(l,{cN:null})],i:"\\S"};return i.splice(i.length,0,c,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("php",function(e){var c={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},a={cN:"preprocessor",b:/<\?(php)?|\?>/},i={cN:"string",c:[e.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"},a]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},a,c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,i,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,n]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"tag",b:""},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("scheme",function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",r="(\\-|\\+)?\\d+([./]\\d+)?",i=r+"[+\\-]"+r+"i",a={built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},n={cN:"shebang",b:"^#!",e:"$"},c={cN:"literal",b:"(#t|#f|#\\\\"+t+"|#\\\\.)"},l={cN:"number",v:[{b:r,r:0},{b:i,r:0},{b:"#b[0-1]+(/[0-1]+)?"},{b:"#o[0-7]+(/[0-7]+)?"},{b:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},s=e.QSM,o=[e.C(";","$",{r:0}),e.C("#\\|","\\|#")],u={b:t,r:0},p={cN:"variable",b:"'"+t},d={eW:!0,r:0},g={cN:"list",v:[{b:"\\(",e:"\\)"},{b:"\\[",e:"\\]"}],c:[{cN:"keyword",b:t,l:t,k:a},d]};return d.c=[c,l,s,u,p,g].concat(o),{i:/\S/,c:[n,l,s,p,g].concat(o)}});hljs.registerLanguage("http",function(t){return{aliases:["https"],i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}});hljs.registerLanguage("less",function(e){var r="[\\w-]+",t="("+r+"|@{"+r+"})",a=[],c=[],n=function(e){return{cN:"string",b:"~?"+e+".*?"+e}},i=function(e,r,t){return{cN:e,b:r,r:t}},s=function(r,t,a){return e.inherit({cN:r,b:t+"\\(",e:"\\(",rB:!0,eE:!0,r:0},a)},b={b:"\\(",e:"\\)",c:c,r:0};c.push(e.CLCM,e.CBCM,n("'"),n('"'),e.CSSNM,i("hexcolor","#[0-9A-Fa-f]+\\b"),s("function","(url|data-uri)",{starts:{cN:"string",e:"[\\)\\n]",eE:!0}}),s("function",r),b,i("variable","@@?"+r,10),i("variable","@{"+r+"}"),i("built_in","~?`[^`]*?`"),{cN:"attribute",b:r+"\\s*:",e:":",rB:!0,eE:!0});var o=c.concat({b:"{",e:"}",c:a}),u={bK:"when",eW:!0,c:[{bK:"and not"}].concat(c)},C={cN:"attribute",b:t,e:":",eE:!0,c:[e.CLCM,e.CBCM],i:/\S/,starts:{e:"[;}]",rE:!0,c:c,i:"[<=$]"}},l={cN:"at_rule",b:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{e:"[;{}]",rE:!0,c:c,r:0}},d={cN:"variable",v:[{b:"@"+r+"\\s*:",r:15},{b:"@"+r}],starts:{e:"[;}]",rE:!0,c:o}},p={v:[{b:"[\\.#:&\\[]",e:"[;{}]"},{b:t+"[^;]*{",e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",c:[e.CLCM,e.CBCM,u,i("keyword","all\\b"),i("variable","@{"+r+"}"),i("tag",t+"%?",0),i("id","#"+t),i("class","\\."+t,0),i("keyword","&",0),s("pseudo",":not"),s("keyword",":extend"),i("pseudo","::?"+t),{cN:"attr_selector",b:"\\[",e:"\\]"},{b:"\\(",e:"\\)",c:o},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,l,d,p,C),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",a={cN:"function",b:c+"\\(",rB:!0,eE:!0,e:"\\("},r={cN:"rule",b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{cN:"value",eW:!0,eE:!0,c:[a,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,r,{cN:"id",b:/\#[A-Za-z0-9_-]+/},{cN:"class",b:/\.[A-Za-z0-9_-]+/},{cN:"attr_selector",b:/\[/,e:/\]/,i:"$"},{cN:"pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[a,e.ASM,e.QSM,e.CSSNM]}]},{cN:"tag",b:c,r:0},{cN:"rules",b:"{",e:"}",i:/\S/,c:[e.CBCM,r]}]}});hljs.registerLanguage("cs",function(e){var r="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",t=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:r,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[{cN:"title",b:"[a-zA-Z](\\.?\\w)*",r:0},e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("haskell",function(e){var c=[e.C("--","$"),e.C("{-","-}",{c:["self"]})],a={cN:"pragma",b:"{-#",e:"#-}"},i={cN:"preprocessor",b:"^#",e:"$"},n={cN:"type",b:"\\b[A-Z][\\w']*",r:0},t={cN:"container",b:"\\(",e:"\\)",i:'"',c:[a,i,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"})].concat(c)},l={cN:"container",b:"{",e:"}",c:t.c};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{cN:"module",b:"\\bmodule\\b",e:"where",k:"module where",c:[t].concat(c),i:"\\W\\.|;"},{cN:"import",b:"\\bimport\\b",e:"$",k:"import|0 qualified as hiding",c:[t].concat(c),i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[n,t].concat(c)},{cN:"typedef",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[a,n,t,l].concat(c)},{cN:"default",bK:"default",e:"$",c:[n,t].concat(c)},{cN:"infix",bK:"infix infixl infixr",e:"$",c:[e.CNM].concat(c)},{cN:"foreign",b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[n,e.QSM].concat(c)},{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},a,i,e.QSM,e.CNM,n,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),{b:"->|<-"}].concat(c)}});hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",a="\\]=*\\]",r={b:t,e:a,c:["self"]},n=[e.C("--(?!"+t+")","$"),e.C("--"+t,a,{c:[r],r:10})];return{l:e.UIR,k:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},c:n.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:n}].concat(n)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:a,c:[r],r:5}])}});hljs.registerLanguage("xml",function(t){var e="[A-Za-z0-9\\._:-]+",s={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},c={eW:!0,i:/]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},t.C("",{r:10}),{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[c],starts:{e:"",rE:!0,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[c],starts:{e:"",rE:!0,sL:""}},s,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},c]}]}});hljs.registerLanguage("lisp",function(b){var e="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",c="\\|[^]*?\\|",r="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",a={cN:"shebang",b:"^#!",e:"$"},i={cN:"literal",b:"\\b(t{1}|nil)\\b"},l={cN:"number",v:[{b:r,r:0},{b:"#(b|B)[0-1]+(/[0-1]+)?"},{b:"#(o|O)[0-7]+(/[0-7]+)?"},{b:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{b:"#(c|C)\\("+r+" +"+r,e:"\\)"}]},t=b.inherit(b.QSM,{i:null}),d=b.C(";","$",{r:0}),n={cN:"variable",b:"\\*",e:"\\*"},u={cN:"keyword",b:"[:&]"+e},N={b:e,r:0},o={b:c},s={b:"\\(",e:"\\)",c:["self",i,t,l,N]},v={cN:"quoted",c:[l,t,n,u,s,N],v:[{b:"['`]\\(",e:"\\)"},{b:"\\(quote ",e:"\\)",k:"quote"},{b:"'"+c}]},f={cN:"quoted",v:[{b:"'"+e},{b:"#'"+e+"(::"+e+")*"}]},g={cN:"list",b:"\\(\\s*",e:"\\)"},q={eW:!0,r:0};return g.c=[{cN:"keyword",v:[{b:e},{b:c}]},q],q.c=[v,f,g,i,l,t,d,n,u,o,N],{i:/\S/,c:[l,a,i,t,d,v,f,g,N]}});hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",i={cN:"variable",b:"(\\$"+t+")\\b"},r={cN:"function",b:t+"\\(",rB:!0,eE:!0,e:"\\("},o={cN:"hexcolor",b:"#[0-9A-Fa-f]+"};({cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[r,o,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"important",b:"!important"}]}});return{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,r,{cN:"id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{cN:"pseudo",b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{cN:"pseudo",b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},i,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{cN:"value",b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{cN:"value",b:":",e:";",c:[r,i,o,e.CSSNM,e.QSM,e.ASM,{cN:"important",b:"!important"}]},{cN:"at_rule",b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[r,i,e.QSM,e.ASM,o,e.CSSNM,{cN:"preprocessor",b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("scala",function(e){var t={cN:"annotation",b:"@[A-Za-z]+"},a={cN:"string",b:'u?r?"""',e:'"""',r:10},r={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},c={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},i={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},l={cN:"class",bK:"class object trait type",e:/[:={\[(\n;]/,c:[{cN:"keyword",bK:"extends with",r:10},i]},n={cN:"function",bK:"def val",e:/[:={\[(\n;]/,c:[i]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,a,e.QSM,r,c,n,l,e.CNM,t]}});hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[e.C(";","$"),{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,s,a,t]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={cN:"variable",v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=e.C("^(__END__|__DATA__)","\\n$",{r:5}),o=[e.BE,r,n],a=[n,e.HCM,i,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:o,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,i,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return r.c=a,s.c=a,{aliases:["pl"],k:t,c:a}});hljs.registerLanguage("haml",function(s){return{cI:!0,c:[{cN:"doctype",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},s.C("^\\s*(!=#|=#|-#|/).*$",!1,{r:0}),{b:"^\\s*(-|=|!=)(?!#)",starts:{e:"\\n",sL:"ruby"}},{cN:"tag",b:"^\\s*%",c:[{cN:"title",b:"\\w+"},{cN:"value",b:"[#\\.][\\w-]+"},{b:"{\\s*",e:"\\s*}",eE:!0,c:[{b:":\\w+\\s*=>",e:",\\s+",rB:!0,eW:!0,c:[{cN:"symbol",b:":\\w+"},s.ASM,s.QSM,{b:"\\w+",r:0}]}]},{b:"\\(\\s*",e:"\\s*\\)",eE:!0,c:[{b:"\\w+\\s*=",e:"\\s+",rB:!0,eW:!0,c:[{cN:"attribute",b:"\\w+",r:0},s.ASM,s.QSM,{b:"\\w+",r:0}]}]}]},{cN:"bullet",b:"^\\s*[=~]\\s*",r:0},{b:"#{",starts:{e:"}",sL:"ruby"}}]}});hljs.registerLanguage("clojure",function(e){var t={built_in:"def cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},r="a-zA-Z_\\-!.?+*=<>&#'",n="["+r+"]["+r+"0-9/;:]*",a="[-+]?\\d+(\\.\\d+)?",o={b:n,r:0},s={cN:"number",b:a,r:0},i=e.inherit(e.QSM,{i:null}),c=e.C(";","$",{r:0}),d={cN:"literal",b:/\b(true|false|nil)\b/},l={cN:"collection",b:"[\\[\\{]",e:"[\\]\\}]"},m={cN:"comment",b:"\\^"+n},p=e.C("\\^\\{","\\}"),u={cN:"attribute",b:"[:]"+n},f={cN:"list",b:"\\(",e:"\\)"},h={eW:!0,r:0},y={k:t,l:n,cN:"keyword",b:n,starts:h},b=[f,i,m,p,c,u,l,s,d,o];return f.c=[e.C("comment",""),y,h],h.c=b,l.c=b,{aliases:["clj"],i:/\S/,c:[f,i,m,p,c,u,l,s,d]}}); \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100644 index 00000000..c5d6c856 --- /dev/null +++ b/js/main.js @@ -0,0 +1,36 @@ +// To make images retina, add a class "2x" to the img element +// and add a @2x.png image. Assumes jquery is loaded. + +function isRetina() { + var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\ + (min--moz-device-pixel-ratio: 1.5),\ + (-o-min-device-pixel-ratio: 3/2),\ + (min-resolution: 1.5dppx)"; + + if (window.devicePixelRatio > 1) + return true; + + if (window.matchMedia && window.matchMedia(mediaQuery).matches) + return true; + + return false; +}; + + +function retina() { + + if (!isRetina()) + return; + + $("img.2x").map(function(i, image) { + + var path = $(image).attr("src"); + + path = path.replace(".png", "@2x.png"); + path = path.replace(".jpg", "@2x.jpg"); + + $(image).attr("src", path); + }); +}; + +$(document).ready(retina); \ No newline at end of file diff --git a/js/rocket.js b/js/rocket.js new file mode 100644 index 00000000..3b4721b8 --- /dev/null +++ b/js/rocket.js @@ -0,0 +1,174 @@ +var scene, camera, renderer, rocket, fire, mx, my; + +var firescale = 1; + +var rot_axis = new THREE.Vector3(0, 0, 1); +var trans_axis = new THREE.Vector3(-0.5, 0, 0.8); +var rot_lean = new THREE.Vector3(0, 1, 0); + +var axis_c = new THREE.Vector3(0,0,0); +var axis_s = new THREE.Vector3(0,0,0); +var axis_h = (new THREE.Vector3(0,1,0)).applyAxisAngle(rot_axis, -0.02); +var axis_w = (new THREE.Vector3(1,0,0)).applyAxisAngle(rot_axis, -0.02); +var camera_pos = new THREE.Vector3(0, 0, 30); +var current_pos = new THREE.Vector3(0,0,0); +var delta = new THREE.Vector3(0,0,0); +var speedX = 0; +var speedY = 0; +var firel = 0.4; +var firer = 0.2; + + +var mx = 0; +var my = 0; +var xs = 0; + +init(); + +function init(){ + //scene = new THREE.Scene(); + var WIDTH = 240; + var HEIGHT = 240; + + renderer = new THREE.WebGLRenderer({'antialias':true}); + renderer.setSize(WIDTH, HEIGHT); + + + camera = new THREE.PerspectiveCamera(45, WIDTH/HEIGHT, 0.1, 20000); + camera.position = camera_pos; + camera.lookAt(axis_c); + + var loader = new THREE.SceneLoader(); + loader.load("/js/rocket.json", function(s){ + scene = s.scene; + rocket = s.objects['Rocket']; + fire = s.objects['Fire']; + + rocket.rotateOnAxis(rot_axis, 1.508); + rocket.translateOnAxis(trans_axis, -2) + rocket.rotateOnAxis(rot_lean, -0.63); + + fire.rotateOnAxis(rot_axis, 1.508); + fire.translateOnAxis(trans_axis, -2) + fire.rotateOnAxis(rot_lean, -0.63); + + scene.add(camera); + + document.body.onmousemove = function(e){ + var w = document.body.clientWidth/2; + mx = w-e.pageX; + if(firel<0.7) my = 300-e.pageY; + else { + mx=mx*0.2+xs; + my=300; + } + } + + if (window.DeviceMotionEvent) { + deviceMotionHandler = function(e) { + document.body.onmousemove = null; + var ax = event.accelerationIncludingGravity.x; + var ay = event.accelerationIncludingGravity.y; + var orient = window.orientation; + if (orient==0) { + mx = -ax * 80; + my = -ay * 80; + } + else if (orient==90) { + mx = ay * 80; + my = -ax * 80; + } + else if (orient==-90) { + mx = -ay * 80; + my = -ax * 80; + } + else if (orient==180) { + mx = -ax * 80; + my = ay * 80; + } + } + window.ondevicemotion = function(e) { + var acc = e.acceleration; + if (acc.x != null || acc.y != null || acc.z != null) { + document.body.onmousemove = null; + window.ondevicemotion = deviceMotionHandler; + } else { + window.ondevicemotion = null; + } + } + } + + var logo = document.getElementById('logo'); + logo.classList.add('ani'); + logo.appendChild(renderer.domElement); + + var joinLink = document.getElementById('join'); + + if (joinLink) { + joinLink.onmouseover = function(e){ + firel = 0.8; + firer = 0.1; + var w = document.body.clientWidth/2; + xs = w - e.pageX; + if (xs>80) xs=160; + else if (xs<-80) xs=-160; + else xs = 0; + } + + joinLink.onmouseout = function(e){ + firel = 0.4; + firer = 0.2; + } + } else { // support pages with no join link + firel = 0.4; + firer = 0.2; + } + + animate(); + }); +} + + +function step(camera) { + if (mx > 1000) mx = 1000; + else if (mx < -1000) mx = -1000; + if (my > 1000) my = 1000 + else if (my < -1000) my = -1000; + + delta.set(-mx, my, 0).applyAxisAngle(rot_axis, -0.02).sub(current_pos); + + if (delta.x>20) delta.x=20; + else if (delta.x<-20) delta.x=-20; + if (delta.y>50) delta.y=50; + else if (delta.y<-50) delta.y=-50; + + speedX += delta.x/2000; + speedY += delta.y/8000; + + speedX *= 0.95; + speedY *= 0.80; + + rocket.rotateOnAxis(rot_axis, speedX); + camera.position.applyAxisAngle(axis_w, speedY); + + delta.x *= 0.5; + + current_pos.add(delta); + + if(firescale>=1) firescale = firel - firer*Math.random(); + else firescale = firel + firer*Math.random(); + fire.scale.z = firescale; + + if (firel>0.7) { + axis_s.set(-Math.random(), -Math.random(), 0); + axis_s.multiplyScalar(0.4); + camera.lookAt(axis_s); + } + else camera.lookAt(axis_c); +} + +function animate() { + requestAnimationFrame(animate); + step(camera); + renderer.render(scene, camera); +} diff --git a/js/rocket.json b/js/rocket.json new file mode 100644 index 00000000..0a6bafc1 --- /dev/null +++ b/js/rocket.json @@ -0,0 +1,162 @@ +{ + +"metadata" : +{ + "formatVersion" : 3.2, + "type" : "scene", + "sourceFile" : "rocket4.blend", + "generatedBy" : "Blender 2.65 Exporter", + "objects" : 2, + "geometries" : 2, + "materials" : 3, + "textures" : 0 +}, + +"urlBaseType" : "relativeToScene", + + +"objects" : +{ + "Fire" : { + "geometry" : "geo_fire", + "groups" : [ ], + "material" : "FireOrange", + "position" : [ 0, 0, 0 ], + "rotation" : [ -1.5708, 0, 1.5708 ], + "quaternion": [ -0.5, 0.5, 0.5, 0.5 ], + "scale" : [ 1, 1, 1 ], + "visible" : true, + "castShadow" : false, + "receiveShadow" : false, + "doubleSided" : false + }, + + "Rocket" : { + "geometry" : "geo_rocket", + "groups" : [ ], + "material" : "", + "position" : [ 0, 0, 0 ], + "rotation" : [ -1.5708, 0, 1.5708 ], + "quaternion": [ -0.5, 0.5, 0.5, 0.5 ], + "scale" : [ 1, 1, 1 ], + "visible" : true, + "castShadow" : false, + "receiveShadow" : false, + "doubleSided" : false + } +}, + + +"geometries" : +{ + "geo_fire" : { + "type" : "embedded", + "id" : "emb_fire" + }, + + "geo_rocket" : { + "type" : "embedded", + "id" : "emb_rocket" + } +}, + + +"materials" : +{ + "BodyOrange" : { + "type": "MeshBasicMaterial", + "parameters": { "color": 13389056 } + }, + + "BodyWhite" : { + "type": "MeshBasicMaterial", + "parameters": { "color": 16777215 } + }, + + "FireOrange" : { + "type": "MeshBasicMaterial", + "parameters": { "color": 16302899 } + } +}, + + +"embeds" : +{ +"emb_rocket": { "scale" : 1.000000, + + "materials" : [ { + "colorDiffuse" : [1.0, 1.0, 1.0], + "shading" : "Basic" + }, + + { + "colorDiffuse" : [0.952941, 0.647059, 0.2], + "shading" : "Basic" + }], + + "vertices" : [-1.99319,-0.172235,-0.682755,-3.26215,-0.171287,-2.44045,-3.50639,-0.171288,-3.48371,-3.18545,-0.171291,-4.89163,-2.77631,-0.171294,-6.48053,-1.24162,-2.99756,3.36497,-2.99753,-1.24165,3.36497,-1.86242,-0.792864,10.1137,-0.771439,-1.88384,10.1137,-2.78476,-1.15352,7.0054,-1.15349,-2.7848,7.0054,-0.891772,-2.15296,-0.256499,-2.15293,-0.891804,-0.256499,-0.832542,-0.373408,11.9447,-0.344851,-0.8611,11.9447,-1.19783,-0.49619,-2.49896,-0.496157,-1.19786,-2.49896,-0.787707,-0.326313,-2.97429,-0.326279,-0.787742,-2.97429,-1.33333,-0.129651,0.337142,-2.75034,-0.171524,-1.80211,-2.61828,-0.129177,0.422876,-1.36811,-0.129177,-1.78839,-3.51778,-0.171287,-2.90018,-4.22341,-0.128465,-1.53425,-2.30089,-0.128465,-3.34664,-3.35371,-0.171289,-4.1584,-4.5126,-0.128467,-2.995,-2.50018,-0.128467,-3.97242,-2.55663,-0.12847,-4.92149,-3.81427,-0.128469,-4.86176,-2.99514,-0.171293,-5.6701,-2.58134,-0.128472,-6.62224,-2.90017,-0.128472,-6.8549,-0.637821,-1.53987,-1.76774,-1.23946,-2.99236,5.13518,-1.65295,-1.65298,-0.256499,-1.53984,-0.637854,-1.76774,-2.99232,-1.23949,5.13518,-0.53771,-1.33205,11.1655,-1.29815,-0.571615,11.1655,-1.4299,-1.45133,10.1137,-2.13805,-2.13808,7.0054,-2.3998,-0.999413,8.74258,-0.994033,-2.40519,8.74258,-2.30141,-2.30144,3.36497,-1.13428,-2.73843,1.59949,-2.73839,-1.13431,1.59949,-0.552986,-0.577978,12.1055,-0.410927,-0.9921,-2.7884,-0.992065,-0.410961,-2.7884,-0.919653,-0.919687,-2.49896,-0.202531,-0.488987,-3.07487,-0.488953,-0.202565,-3.07487,-0.488952,0.243212,-3.07487,-0.604776,-0.60481,-2.97429,-1.07697,-0.0958975,-0.770557,-1.93185,-0.0958975,0.916006,-1.98116,-0.128643,-2.81688,-3.51952,-0.128643,-0.787337,-2.43725,-0.128466,-3.64328,-4.59831,-0.128466,-2.15707,-2.52741,-0.128468,-4.38238,-4.18001,-0.128468,-3.93442,-2.59501,-0.0951672,-7.12329,-2.55199,-0.128471,-5.67445,-3.39459,-0.128471,-5.82069,-1.18224,-1.18227,-1.76774,-2.29741,-2.29744,5.13518,-0.975121,-1.00813,11.2056,-1.84249,-1.84787,8.74258,-2.10245,-2.10248,1.59949,-0.761675,-0.761709,-2.7884,-0.452339,-0.452373,-3.04879,-1.09888,-2.65296,1.32855,-2.65292,-1.09891,1.32855,-2.03683,-2.03686,1.32855,-0.849477,-2.05085,-0.508193,-2.05082,-0.849509,-0.508193,-1.57455,-1.57458,-0.508193,-1.10725,-2.01142,-0.256499,-1.32825,-2.50229,1.32855,-1.05279,-1.9173,-0.508193,0.398424,-2.61355,8.75698,0.368096,-2.56984,8.90306,0.281728,-2.53279,9.02689,0.15247,-2.50803,9.10963,-0.15247,-2.50803,9.10963,-0.281728,-2.53279,9.02689,-0.368096,-2.56984,8.90306,-0.398424,-2.61354,8.75698,-0.368096,-2.65725,8.61091,-0.281729,-2.6943,8.48708,-0.15247,-2.71906,8.40434,0.15247,-2.71906,8.40434,0.281728,-2.6943,8.48708,0.368096,-2.65725,8.61091,1.99319,-0.172235,-0.682755,3.26215,-0.171287,-2.44045,3.50639,-0.171288,-3.48371,3.18545,-0.171291,-4.89163,2.77631,-0.171294,-6.48053,1.24162,-2.99756,3.36497,2.99753,-1.24165,3.36497,1.86242,-0.792864,10.1137,0.771439,-1.88384,10.1137,2.78476,-1.15352,7.0054,1.15349,-2.7848,7.0054,0.891772,-2.15296,-0.256499,2.15293,-0.891804,-0.256499,0.832542,-0.373408,11.9447,0.344851,-0.8611,11.9447,1.19783,-0.49619,-2.49896,0.496157,-1.19786,-2.49896,0.787707,-0.326313,-2.97429,0.326279,-0.787742,-2.97429,1.33333,-0.129651,0.337142,2.75034,-0.171524,-1.80211,2.61828,-0.129177,0.422876,1.36811,-0.129177,-1.78839,3.51778,-0.171287,-2.90018,4.22341,-0.128465,-1.53425,2.30089,-0.128465,-3.34664,3.35371,-0.171289,-4.1584,4.5126,-0.128467,-2.995,2.50018,-0.128467,-3.97242,2.55663,-0.12847,-4.92149,3.81427,-0.128469,-4.86176,2.99514,-0.171293,-5.6701,2.58134,-0.128472,-6.62224,2.90017,-0.128472,-6.8549,0,-2.29694,-0.256499,0.637821,-1.53987,-1.76774,1.23946,-2.99236,5.13518,1.65295,-1.65298,-0.256499,1.53984,-0.637854,-1.76774,2.99232,-1.23949,5.13518,0.53771,-1.33205,11.1655,1.29815,-0.571615,11.1655,1.4299,-1.45133,10.1137,0,-2.0029,10.1137,2.13805,-2.13808,7.0054,0,-2.98297,7.0054,2.3998,-0.999413,8.74258,0.994033,-2.40519,8.74258,0,-3.214,3.36497,2.30141,-2.30144,3.36497,1.13428,-2.73843,1.59949,2.73839,-1.13431,1.59949,0.552986,-0.577978,12.1055,0,-0.766317,12.1055,0.410927,-0.9921,-2.7884,0.992065,-0.410961,-2.7884,0.919653,-0.919687,-2.49896,0,-1.2599,-2.49896,0.202531,-0.488987,-3.07487,0.488953,-0.202565,-3.07487,0.488952,0.243212,-3.07487,0.604776,-0.60481,-2.97429,0,-0.814601,-2.97429,1.07697,-0.0958975,-0.770557,1.93185,-0.0958975,0.916006,1.98116,-0.128643,-2.81688,3.51952,-0.128643,-0.787337,2.43725,-0.128466,-3.64328,4.59831,-0.128466,-2.15707,2.52741,-0.128468,-4.38238,4.18001,-0.128468,-3.93442,2.59501,-0.0951672,-7.12329,2.55199,-0.128471,-5.67445,3.39459,-0.128471,-5.82069,0,-1.63125,-1.76774,0,-3.20834,5.13518,1.18224,-1.18227,-1.76774,2.29741,-2.29744,5.13518,0,-1.37133,11.2056,0.975121,-1.00813,11.2056,1.84249,-1.84787,8.74258,0,-2.57034,8.74258,0,-2.93263,1.59949,2.10245,-2.10248,1.59949,0,-1.03649,-2.7884,0.761675,-0.761709,-2.7884,0,-0.599023,-3.04879,0.452339,-0.452373,-3.04879,1.09888,-2.65296,1.32855,2.65292,-1.09891,1.32855,0,-2.83983,1.32855,2.03683,-2.03686,1.32855,0.849477,-2.05085,-0.508193,2.05082,-0.849509,-0.508193,0,-2.18607,-0.508193,1.57455,-1.57458,-0.508193,1.10725,-2.01142,-0.256499,1.32825,-2.50229,1.32855,1.05279,-1.9173,-0.508193,-0.398424,-2.61355,8.75698,-0.368096,-2.56984,8.90306,-0.281728,-2.53279,9.02689,-0.15247,-2.50803,9.10963,0,-2.49934,9.13869,0.15247,-2.50803,9.10963,0.281728,-2.53279,9.02689,0.368096,-2.56984,8.90306,0.398424,-2.61354,8.75698,0.368096,-2.65725,8.61091,0.281729,-2.6943,8.48708,0.15247,-2.71906,8.40434,0,-2.72775,8.37528,-0.15247,-2.71906,8.40434,-0.281728,-2.6943,8.48708,-0.368096,-2.65725,8.61091,0,-2.57034,8.74258,-1.11338,0,0.677108,-4.49197,0,-1.23219,-2.82664,0,0.79142,-1.99319,0.172235,-0.682755,-1.15975,0,-2.15693,-4.84801,0,-2.83209,-3.26215,0.171287,-2.44045,-1.98047,0,-3.64871,-3.50639,0.171288,-3.48371,-2.16478,0,-4.13532,-2.34702,0,-4.93144,-3.18545,0.171291,-4.89163,-4.02388,0,-4.85181,-2.94146,0,-6.97969,-2.48177,0,-6.70405,-2.77631,0.171294,-6.48053,-1.24162,2.99756,3.36497,-2.99753,1.24165,3.36497,-1.86242,0.792864,10.1137,-0.771439,1.88384,10.1137,-2.78476,1.15352,7.0054,-1.15349,2.7848,7.0054,-0.891772,2.15296,-0.256499,-2.15293,0.891804,-0.256499,-0.832542,0.373408,11.9447,-0.344851,0.8611,11.9447,-1.19783,0.49619,-2.49896,-0.496157,1.19786,-2.49896,-0.787707,0.326313,-2.97429,-0.326279,0.787742,-2.97429,-0.788315,0,-0.823153,-1.33333,0.129651,0.337142,-1.87835,0,1.49744,-1.72476,0,-3.15514,-2.75034,0.171524,-1.80211,-3.81048,0,-0.397224,-2.61828,0.129177,0.422876,-1.36811,0.129177,-1.78839,-2.07707,0,-3.89099,-3.51778,0.171287,-2.90018,-4.95849,0,-1.90937,-4.22341,0.128465,-1.53425,-2.30089,0.128465,-3.34664,-2.25197,0,-4.45704,-3.35371,0.171289,-4.1584,-4.45545,0,-3.85976,-4.5126,0.128467,-2.995,-2.50018,0.128467,-3.97242,-2.48493,0,-7.51353,-2.55663,0.12847,-4.92149,-3.81427,0.128469,-4.86176,-2.40427,0,-5.6759,-2.99514,0.171293,-5.6701,-3.52774,0,-5.87089,-2.58134,0.128472,-6.62224,-2.90017,0.128472,-6.8549,-0.637821,1.53987,-1.76774,-1.23946,2.99236,5.13518,-1.65295,1.65298,-0.256499,-1.53984,0.637854,-1.76774,-2.99232,1.23949,5.13518,-2.33762,0,-0.256499,-0.53771,1.33205,11.1655,-1.29815,0.571615,11.1655,-2.02219,0,10.1137,-1.4299,1.45133,10.1137,-3.02366,0,7.0054,-2.13805,2.13808,7.0054,-2.3998,0.999413,8.74258,-0.994033,2.40519,8.74258,-2.30141,2.30144,3.36497,-3.25468,0,3.36497,-1.13428,2.73843,1.59949,-2.73839,1.13431,1.59949,-0.78204,0,12.1055,-0.552986,0.577978,12.1055,-0.410927,0.9921,-2.7884,-0.992065,0.410961,-2.7884,-1.30059,0,-2.49896,-0.919653,0.919687,-2.49896,-0.202531,0.488987,-3.07487,-0.488953,0.202565,-3.07487,-0.488952,-0.243212,-3.07487,-0.855282,0,-2.97429,-0.604776,0.60481,-2.97429,-1.07697,0.0958975,-0.770557,-1.93185,0.0958975,0.916006,-1.98116,0.128643,-2.81688,-3.51952,0.128643,-0.787337,-2.43725,0.128466,-3.64328,-4.59831,0.128466,-2.15707,-2.52741,0.128468,-4.38238,-4.18001,0.128468,-3.93442,-2.59501,0.0951672,-7.12329,-2.55199,0.128471,-5.67445,-3.39459,0.128471,-5.82069,-1.18224,1.18227,-1.76774,-2.29741,2.29744,5.13518,-1.67193,0,-1.76774,-3.24902,0,5.13518,-0.975121,1.00813,11.2056,-1.37903,0,11.2056,-2.60567,0,8.74258,-1.84249,1.84787,8.74258,-2.10245,2.10248,1.59949,-2.97331,0,1.59949,-0.761675,0.761709,-2.7884,-1.07717,0,-2.7884,-0.452339,0.452373,-3.04879,-0.639704,0,-3.04879,-1.09888,2.65296,1.32855,-2.65292,1.09891,1.32855,-2.03683,2.03686,1.32855,-2.88051,0,1.32855,-0.849477,2.05085,-0.508193,-2.05082,0.849509,-0.508193,-1.57455,1.57458,-0.508193,-2.22675,0,-0.508193,-1.10725,2.01142,-0.256499,-1.32825,2.50229,1.32855,-1.05279,1.9173,-0.508193,0.398424,2.61355,8.75698,0.368096,2.56984,8.90306,0.281728,2.53279,9.02689,0.15247,2.50803,9.10963,-0.15247,2.50803,9.10963,-0.281728,2.53279,9.02689,-0.368096,2.56984,8.90306,-0.398424,2.61354,8.75698,-0.368096,2.65725,8.61091,-0.281729,2.6943,8.48708,-0.15247,2.71906,8.40434,0.15247,2.71906,8.40434,0.281728,2.6943,8.48708,0.368096,2.65725,8.61091,1.11338,0,0.677108,4.49197,0,-1.23219,2.82664,0,0.79142,1.99319,0.172235,-0.682755,1.15975,0,-2.15693,4.84801,0,-2.83209,3.26215,0.171287,-2.44045,1.98047,0,-3.64871,3.50639,0.171288,-3.48371,2.16478,0,-4.13532,2.34702,0,-4.93144,3.18545,0.171291,-4.89163,4.02388,0,-4.85181,2.94146,0,-6.97969,2.48177,0,-6.70405,2.77631,0.171294,-6.48053,1.24162,2.99756,3.36497,2.99753,1.24165,3.36497,1.86242,0.792864,10.1137,0.771439,1.88384,10.1137,2.78476,1.15352,7.0054,1.15349,2.7848,7.0054,0.891772,2.15296,-0.256499,2.15293,0.891804,-0.256499,0.832542,0.373408,11.9447,0.344851,0.8611,11.9447,1.19783,0.49619,-2.49896,0.496157,1.19786,-2.49896,0,0,-3.1084,0.787707,0.326313,-2.97429,0.326279,0.787742,-2.97429,0.788315,0,-0.823153,1.33333,0.129651,0.337142,1.87835,0,1.49744,1.72476,0,-3.15514,2.75034,0.171524,-1.80211,3.81048,0,-0.397224,2.61828,0.129177,0.422876,1.36811,0.129177,-1.78839,2.07707,0,-3.89099,3.51778,0.171287,-2.90018,4.95849,0,-1.90937,4.22341,0.128465,-1.53425,2.30089,0.128465,-3.34664,2.25197,0,-4.45704,3.35371,0.171289,-4.1584,4.45545,0,-3.85976,4.5126,0.128467,-2.995,2.50018,0.128467,-3.97242,2.48493,0,-7.51353,2.55663,0.12847,-4.92149,3.81427,0.128469,-4.86176,2.40427,0,-5.6759,2.99514,0.171293,-5.6701,3.52774,0,-5.87089,2.58134,0.128472,-6.62224,2.90017,0.128472,-6.8549,0,2.29694,-0.256499,0.637821,1.53987,-1.76774,1.23946,2.99236,5.13518,1.65295,1.65298,-0.256499,1.53984,0.637854,-1.76774,2.99232,1.23949,5.13518,2.33762,0,-0.256499,0.53771,1.33205,11.1655,1.29815,0.571615,11.1655,2.02219,0,10.1137,1.4299,1.45133,10.1137,0,2.0029,10.1137,3.02366,0,7.0054,2.13805,2.13808,7.0054,0,2.98297,7.0054,2.3998,0.999413,8.74258,0.994033,2.40519,8.74258,0,3.214,3.36497,2.30141,2.30144,3.36497,3.25468,0,3.36497,1.13428,2.73843,1.59949,2.73839,1.13431,1.59949,0.78204,0,12.1055,0.552986,0.577978,12.1055,0,0.766317,12.1055,0.410927,0.9921,-2.7884,0.992065,0.410961,-2.7884,1.30059,0,-2.49896,0.919653,0.919687,-2.49896,0,1.2599,-2.49896,0.202531,0.488987,-3.07487,0.488953,0.202565,-3.07487,0.488952,-0.243212,-3.07487,0.855282,0,-2.97429,0.604776,0.60481,-2.97429,0,0.814601,-2.97429,1.07697,0.0958975,-0.770557,1.93185,0.0958975,0.916006,1.98116,0.128643,-2.81688,3.51952,0.128643,-0.787337,2.43725,0.128466,-3.64328,4.59831,0.128466,-2.15707,2.52741,0.128468,-4.38238,4.18001,0.128468,-3.93442,2.59501,0.0951672,-7.12329,2.55199,0.128471,-5.67445,3.39459,0.128471,-5.82069,0,1.63125,-1.76774,0,3.20834,5.13518,1.18224,1.18227,-1.76774,2.29741,2.29744,5.13518,1.67193,0,-1.76774,3.24902,0,5.13518,0,1.37133,11.2056,0.975121,1.00813,11.2056,1.37903,0,11.2056,2.60567,0,8.74258,1.84249,1.84787,8.74258,0,2.57034,8.74258,0,2.93263,1.59949,2.10245,2.10248,1.59949,2.97331,0,1.59949,0,0,12.8288,0,1.03649,-2.7884,0.761675,0.761709,-2.7884,1.07717,0,-2.7884,0,0.599023,-3.04879,0.452339,0.452373,-3.04879,0.639704,0,-3.04879,1.09888,2.65296,1.32855,2.65292,1.09891,1.32855,0,2.83983,1.32855,2.03683,2.03686,1.32855,2.88051,0,1.32855,0.849477,2.05085,-0.508193,2.05082,0.849509,-0.508193,0,2.18607,-0.508193,1.57455,1.57458,-0.508193,2.22675,0,-0.508193,1.10725,2.01142,-0.256499,1.32825,2.50229,1.32855,1.05279,1.9173,-0.508193,-0.398424,2.61355,8.75698,-0.368096,2.56984,8.90306,-0.281728,2.53279,9.02689,-0.15247,2.50803,9.10963,0,2.49934,9.13869,0.15247,2.50803,9.10963,0.281728,2.53279,9.02689,0.368096,2.56984,8.90306,0.398424,2.61354,8.75698,0.368096,2.65725,8.61091,0.281729,2.6943,8.48708,0.15247,2.71906,8.40434,0,2.72775,8.37528,-0.15247,2.71906,8.40434,-0.281728,2.6943,8.48708,-0.368096,2.65725,8.61091,0,2.57034,8.74258], + + "morphTargets" : [], + + "normals" : [], + + "colors" : [], + + "uvs" : [[]], + + "faces" : [3,213,19,57,245,0,3,213,243,56,19,0,3,214,248,59,24,0,3,214,24,61,253,0,3,215,245,57,21,0,3,215,21,59,248,0,3,0,21,57,19,0,3,0,19,56,22,0,3,0,22,58,20,0,3,0,20,59,21,0,3,217,22,56,243,0,3,217,246,58,22,0,3,218,253,61,27,0,3,218,27,63,258,0,3,1,24,59,20,0,3,1,20,58,25,0,3,1,25,60,23,0,3,1,23,61,24,0,3,220,25,58,246,0,3,220,251,60,25,0,3,2,27,61,23,0,3,2,23,60,28,0,3,2,28,62,26,0,3,2,26,63,27,0,3,222,28,60,251,0,3,222,256,62,28,0,3,223,29,62,256,0,3,223,264,65,29,0,3,3,30,63,26,0,3,3,26,62,29,0,3,3,29,65,31,0,3,3,31,66,30,0,3,225,258,63,30,0,3,225,30,66,266,0,3,226,266,66,33,0,3,226,33,64,261,0,3,227,32,65,264,0,3,227,261,64,32,0,3,4,33,66,31,0,3,4,31,65,32,0,3,4,32,64,33,0,3,5,46,179,145,0,3,5,145,172,35,0,3,5,35,68,45,0,3,5,45,71,46,0,3,6,47,71,45,0,3,6,45,68,38,0,3,6,38,312,284,0,3,6,284,318,47,0,3,7,277,315,43,0,3,7,43,70,41,0,3,7,41,69,40,0,3,7,40,314,277,0,3,8,41,70,44,0,3,8,44,178,140,0,3,8,140,175,39,0,3,8,39,69,41,0,3,9,279,312,38,0,3,9,38,68,42,0,3,9,42,70,43,0,3,9,43,315,279,0,3,10,42,68,35,0,3,10,35,172,142,0,3,10,142,178,44,0,3,10,44,70,42,0,3,77,34,171,191,0,3,74,187,179,46,0,2,77,82,34,0,2,82,79,67,0,2,82,67,34,0,3,78,37,67,79,0,3,78,330,311,37,0,3,13,287,314,40,0,3,13,40,69,48,0,3,13,48,467,287,0,3,14,48,69,39,0,3,14,39,175,150,0,3,14,150,467,48,0,3,15,51,67,37,0,3,15,37,311,291,0,3,15,291,320,50,0,3,15,50,72,51,0,3,16,154,171,34,0,3,16,34,67,51,0,3,16,51,72,49,0,3,16,49,181,154,0,2,52,376,183,0,3,376,52,73,53,0,3,376,53,322,54,0,3,17,55,72,50,0,3,17,50,320,296,0,3,17,296,322,53,0,3,17,53,73,55,0,3,18,159,181,49,0,3,18,49,72,55,0,3,18,55,73,52,0,3,18,52,183,159,0,3,11,131,187,74,0,3,80,81,76,36,0,3,12,36,76,75,0,3,12,75,326,274,0,3,131,11,77,191,1,3,11,74,81,80,1,3,12,78,79,36,0,3,12,274,330,78,0,2,46,81,74,1,3,71,76,81,46,1,3,47,75,76,71,1,3,318,326,75,47,1,3,80,36,79,82,0,3,77,11,80,82,1,2,84,85,83,1,2,85,86,200,1,2,200,87,88,1,2,88,89,90,1,2,90,91,92,1,2,92,93,208,1,2,208,94,95,1,2,95,96,83,1,2,85,200,83,1,2,200,88,90,1,2,90,92,208,1,2,208,95,83,1,2,200,90,83,1,2,90,208,83,1,3,348,381,161,116,0,3,348,116,160,379,0,3,349,121,163,384,0,3,349,389,165,121,0,3,350,118,161,381,0,3,350,384,163,118,0,3,97,116,161,118,0,3,97,119,160,116,0,3,97,117,162,119,0,3,97,118,163,117,0,3,352,379,160,119,0,3,352,119,162,382,0,3,353,124,165,389,0,3,353,394,167,124,0,3,98,117,163,121,0,3,98,122,162,117,0,3,98,120,164,122,0,3,98,121,165,120,0,3,355,382,162,122,0,3,355,122,164,387,0,3,99,120,165,124,0,3,99,125,164,120,0,3,99,123,166,125,0,3,99,124,167,123,0,3,357,387,164,125,0,3,357,125,166,392,0,3,358,392,166,126,0,3,358,126,169,400,0,3,100,123,167,127,0,3,100,126,166,123,0,3,100,128,169,126,0,3,100,127,170,128,0,3,360,127,167,394,0,3,360,402,170,127,0,3,361,130,170,402,0,3,361,397,168,130,0,3,362,400,169,129,0,3,362,129,168,397,0,3,101,128,170,130,0,3,101,129,169,128,0,3,101,130,168,129,0,3,102,145,179,147,0,3,102,133,172,145,0,3,102,146,174,133,0,3,102,147,180,146,0,3,103,146,180,148,0,3,103,136,174,146,0,3,103,424,457,136,0,3,103,148,466,424,0,3,104,143,461,414,0,3,104,139,177,143,0,3,104,138,176,139,0,3,104,414,460,138,0,3,105,144,177,139,0,3,105,140,178,144,0,3,105,137,175,140,0,3,105,139,176,137,0,3,106,136,457,417,0,3,106,141,174,136,0,3,106,143,177,141,0,3,106,417,461,143,0,3,107,133,174,141,0,3,107,142,172,133,0,3,107,144,178,142,0,3,107,141,177,144,0,3,189,191,171,132,0,3,185,147,179,187,0,2,189,132,195,0,2,132,173,192,0,2,132,192,195,0,3,190,192,173,135,0,3,190,135,456,483,0,3,110,138,460,427,0,3,110,149,176,138,0,3,110,427,467,149,0,3,111,137,176,149,0,3,111,150,175,137,0,3,111,149,467,150,0,3,112,135,173,153,0,3,112,432,456,135,0,3,112,152,470,432,0,3,112,153,182,152,0,3,113,132,171,154,0,3,113,153,173,132,0,3,113,151,182,153,0,3,113,154,181,151,0,2,155,183,376,0,3,376,156,184,155,0,3,376,157,473,156,0,3,114,152,182,158,0,3,114,438,470,152,0,3,114,156,473,438,0,3,114,158,184,156,0,3,115,151,181,159,0,3,115,158,182,151,0,3,115,155,184,158,0,3,115,159,183,155,0,3,108,185,187,131,0,3,193,134,188,194,0,3,109,186,188,134,0,3,109,411,478,186,0,3,131,191,189,108,1,3,108,193,194,185,1,3,109,134,192,190,0,3,109,190,483,411,0,2,147,185,194,1,3,180,147,194,188,1,3,148,180,188,186,1,3,466,148,186,478,1,3,193,195,192,134,0,3,189,195,193,108,1,2,197,196,198,1,2,196,211,210,1,2,210,209,208,1,2,208,207,206,1,2,206,205,204,1,2,204,203,202,1,2,202,201,200,1,2,200,199,198,1,2,196,210,198,1,2,210,208,206,1,2,206,204,202,1,2,202,200,198,1,2,210,206,198,1,2,206,202,198,1,3,213,245,299,244,0,3,213,244,298,243,0,3,214,254,301,248,0,3,214,253,303,254,0,3,215,249,299,245,0,3,215,248,301,249,0,3,216,244,299,249,0,3,216,250,298,244,0,3,216,247,300,250,0,3,216,249,301,247,0,3,217,243,298,250,0,3,217,250,300,246,0,3,218,259,303,253,0,3,218,258,305,259,0,3,219,247,301,254,0,3,219,255,300,247,0,3,219,252,302,255,0,3,219,254,303,252,0,3,220,246,300,255,0,3,220,255,302,251,0,3,221,252,303,259,0,3,221,260,302,252,0,3,221,257,304,260,0,3,221,259,305,257,0,3,222,251,302,260,0,3,222,260,304,256,0,3,223,256,304,262,0,3,223,262,307,264,0,3,224,257,305,263,0,3,224,262,304,257,0,3,224,265,307,262,0,3,224,263,308,265,0,3,225,263,305,258,0,3,225,266,308,263,0,3,226,268,308,266,0,3,226,261,306,268,0,3,227,264,307,267,0,3,227,267,306,261,0,3,228,265,308,268,0,3,228,267,307,265,0,3,228,268,306,267,0,3,229,422,464,285,0,3,229,270,453,422,0,3,229,283,310,270,0,3,229,285,317,283,0,3,230,283,317,286,0,3,230,273,310,283,0,3,230,284,312,273,0,3,230,286,318,284,0,3,231,281,315,277,0,3,231,278,316,281,0,3,231,276,313,278,0,3,231,277,314,276,0,3,232,282,316,278,0,3,232,416,463,282,0,3,232,275,458,416,0,3,232,278,313,275,0,3,233,273,312,279,0,3,233,280,310,273,0,3,233,281,316,280,0,3,233,279,315,281,0,3,234,270,310,280,0,3,234,419,453,270,0,3,234,282,463,419,0,3,234,280,316,282,0,3,327,481,452,269,0,3,323,285,464,476,0,2,327,269,333,0,2,269,309,329,0,2,269,329,333,0,3,328,329,309,272,0,3,328,272,311,330,0,3,237,276,314,287,0,3,237,288,313,276,0,3,237,287,467,288,0,3,238,275,313,288,0,3,238,429,458,275,0,3,238,288,467,429,0,3,239,272,309,292,0,3,239,291,311,272,0,3,239,290,320,291,0,3,239,292,319,290,0,3,240,269,452,434,0,3,240,292,309,269,0,3,240,289,319,292,0,3,240,434,468,289,0,2,293,471,376,0,3,376,294,321,293,0,3,376,295,322,294,0,3,241,290,319,297,0,3,241,296,320,290,0,3,241,294,322,296,0,3,241,297,321,294,0,3,242,289,468,440,0,3,242,297,319,289,0,3,242,293,321,297,0,3,242,440,471,293,0,3,235,323,476,405,0,3,331,271,325,332,0,3,236,324,325,271,0,3,236,274,326,324,0,3,405,481,327,235,1,3,235,331,332,323,1,3,236,271,329,328,0,3,236,328,330,274,0,2,285,323,332,1,3,317,285,332,325,1,3,286,317,325,324,1,3,318,286,324,326,1,3,331,333,329,271,0,3,327,333,331,235,1,2,335,334,336,1,2,334,347,346,1,2,346,345,499,1,2,499,344,343,1,2,343,342,341,1,2,341,340,339,1,2,339,338,491,1,2,491,337,336,1,2,334,346,336,1,2,346,499,343,1,2,343,341,339,1,2,339,491,336,1,2,346,343,336,1,2,343,339,336,1,3,348,380,442,381,0,3,348,379,441,380,0,3,349,384,444,390,0,3,349,390,446,389,0,3,350,381,442,385,0,3,350,385,444,384,0,3,351,385,442,380,0,3,351,380,441,386,0,3,351,386,443,383,0,3,351,383,444,385,0,3,352,386,441,379,0,3,352,382,443,386,0,3,353,389,446,395,0,3,353,395,448,394,0,3,354,390,444,383,0,3,354,383,443,391,0,3,354,391,445,388,0,3,354,388,446,390,0,3,355,391,443,382,0,3,355,387,445,391,0,3,356,395,446,388,0,3,356,388,445,396,0,3,356,396,447,393,0,3,356,393,448,395,0,3,357,396,445,387,0,3,357,392,447,396,0,3,358,398,447,392,0,3,358,400,450,398,0,3,359,399,448,393,0,3,359,393,447,398,0,3,359,398,450,401,0,3,359,401,451,399,0,3,360,394,448,399,0,3,360,399,451,402,0,3,361,402,451,404,0,3,361,404,449,397,0,3,362,403,450,400,0,3,362,397,449,403,0,3,363,404,451,401,0,3,363,401,450,403,0,3,363,403,449,404,0,3,364,425,464,422,0,3,364,422,453,407,0,3,364,407,455,423,0,3,364,423,465,425,0,3,365,426,465,423,0,3,365,423,455,410,0,3,365,410,457,424,0,3,365,424,466,426,0,3,366,414,461,420,0,3,366,420,462,415,0,3,366,415,459,413,0,3,366,413,460,414,0,3,367,415,462,421,0,3,367,421,463,416,0,3,367,416,458,412,0,3,367,412,459,415,0,3,368,417,457,410,0,3,368,410,455,418,0,3,368,418,462,420,0,3,368,420,461,417,0,3,369,418,455,407,0,3,369,407,453,419,0,3,369,419,463,421,0,3,369,421,462,418,0,3,479,406,452,481,0,3,474,476,464,425,0,2,479,486,406,0,2,486,482,454,0,2,486,454,406,0,3,480,409,454,482,0,3,480,483,456,409,0,3,372,427,460,413,0,3,372,413,459,428,0,3,372,428,467,427,0,3,373,428,459,412,0,3,373,412,458,429,0,3,373,429,467,428,0,3,374,433,454,409,0,3,374,409,456,432,0,3,374,432,470,431,0,3,374,431,469,433,0,3,375,434,452,406,0,3,375,406,454,433,0,3,375,433,469,430,0,3,375,430,468,434,0,2,435,376,471,0,3,376,435,472,436,0,3,376,436,473,437,0,3,377,439,469,431,0,3,377,431,470,438,0,3,377,438,473,436,0,3,377,436,472,439,0,3,378,440,468,430,0,3,378,430,469,439,0,3,378,439,472,435,0,3,378,435,471,440,0,3,370,405,476,474,0,3,484,485,477,408,0,3,371,408,477,475,0,3,371,475,478,411,0,3,405,370,479,481,1,3,370,474,485,484,1,3,371,480,482,408,0,3,371,411,483,480,0,2,425,485,474,1,3,465,477,485,425,1,3,426,475,477,465,1,3,466,478,475,426,1,3,484,408,482,486,0,3,479,370,484,486,1,2,488,489,487,1,2,489,490,491,1,2,491,492,493,1,2,493,494,495,1,2,495,496,497,1,2,497,498,499,1,2,499,500,501,1,2,501,502,487,1,2,489,491,487,1,2,491,493,495,1,2,495,497,499,1,2,499,501,487,1,2,491,495,487,1,2,495,499,487,1], + + "bones" : [], + + "skinIndices" : [], + + "skinWeights" : [], + + "animations" : [] +}, + +"emb_fire": { "scale" : 1.000000, + + "materials" : [ { + "colorDiffuse" : [0.972549, 0.764705, 0.2], + "shading" : "Basic" + }], + + "vertices" : [0.837454,-5.21541e-07,-10.7416,1.06142,-6.70552e-07,-6.43234,0.592169,-0.592169,-10.7416,0.750538,-0.750538,-6.43234,5.73601e-07,-0.837453,-10.7416,-2.28302e-07,-1.06142,-6.43234,-0.592168,-0.592168,-10.7416,-0.750538,-0.750537,-6.43234,-0.837451,6.10948e-07,-10.7416,-1.06142,7.89762e-07,-6.43234,-0.592167,0.592169,-10.7416,-0.750537,0.750538,-6.43234,1.69173e-06,0.837453,-10.7416,1.18886e-06,1.06142,-6.43234,0.59217,0.592168,-10.7416,0.750539,0.750538,-6.43234,0.205937,-8.9407e-08,-3.23084,0.145619,-0.14562,-3.23084,-9.50652e-07,-0.205937,-3.23084,-0.145621,-0.14562,-3.23084,-0.205938,1.93715e-07,-3.23084,-0.14562,0.14562,-3.23084,-6.75695e-07,0.205937,-3.23084,0.145619,0.14562,-3.23084,1.11014e-06,4.47035e-08,-12.8889,-7.67902e-07,-0.871655,-4.79945,-0.616353,-0.616352,-4.79945,-0.871655,6.55651e-07,-4.79945,-0.616352,0.616353,-4.79945,3.9589e-07,0.871655,-4.79945,0.616353,0.616353,-4.79945,0.871655,-5.36442e-07,-4.79945,0.616352,-0.616353,-4.79945,1.12145,-7.00355e-07,-7.86722,0.792984,-0.792984,-7.86722,-5.62931e-08,-1.12145,-7.86722,-0.792984,-0.792983,-7.86722,-1.12145,8.19564e-07,-7.86722,-0.792982,0.792985,-7.86722,1.44101e-06,1.12145,-7.86722,0.792985,0.792983,-7.86722,0.758464,-0.758464,-9.27348,1.90236e-07,-1.07263,-9.27348,-0.758463,-0.758463,-9.27348,-1.07263,7.89762e-07,-9.27348,-0.758462,0.758464,-9.27348,1.62236e-06,1.07263,-9.27348,0.758465,0.758463,-9.27348,1.07263,-6.70552e-07,-9.27348,0.296476,0.296476,-3.54591,-4.38905e-07,0.419281,-3.5459,-0.296477,0.296477,-3.5459,-0.419281,3.42727e-07,-3.54591,-0.296477,-0.296476,-3.5459,-9.98708e-07,-0.419281,-3.5459,0.296475,-0.296476,-3.54591,0.41928,-2.38419e-07,-3.5459], + + "morphTargets" : [], + + "normals" : [], + + "colors" : [], + + "uvs" : [[]], + + "faces" : [3,33,1,3,34,0,3,34,3,5,35,0,3,35,5,7,36,0,3,36,7,9,37,0,3,37,9,11,38,0,3,38,11,13,39,0,3,56,49,23,16,0,3,40,15,1,33,0,3,39,13,15,40,0,3,45,38,39,46,0,2,17,16,18,0,2,16,23,22,0,2,22,21,20,0,2,20,19,18,0,2,16,22,18,0,2,22,20,18,0,3,49,50,22,23,0,3,50,51,21,22,0,3,51,52,20,21,0,3,52,53,19,20,0,3,53,54,18,19,0,3,54,55,17,18,0,3,55,56,16,17,0,3,44,37,38,45,0,3,43,36,37,44,0,3,42,35,36,43,0,3,41,34,35,42,0,3,48,33,34,41,0,3,3,1,31,32,0,3,5,3,32,25,0,3,7,5,25,26,0,3,9,7,26,27,0,3,11,9,27,28,0,3,13,11,28,29,0,3,15,13,29,30,0,3,1,15,30,31,0,2,14,0,24,0,2,12,14,24,0,2,10,12,24,0,2,8,10,24,0,2,6,8,24,0,2,4,6,24,0,2,2,4,24,0,2,0,2,24,0,3,47,40,33,48,0,3,46,39,40,47,0,3,10,45,46,12,0,3,8,44,45,10,0,3,6,43,44,8,0,3,4,42,43,6,0,3,2,41,42,4,0,3,0,48,41,2,0,3,48,0,14,47,0,3,12,46,47,14,0,3,31,30,49,56,0,3,30,29,50,49,0,3,29,28,51,50,0,3,28,27,52,51,0,3,27,26,53,52,0,3,26,25,54,53,0,3,25,32,55,54,0,3,32,31,56,55,0], + + "bones" : [], + + "skinIndices" : [], + + "skinWeights" : [], + + "animations" : [] +} +}, + + +"transform" : +{ + "position" : [ 0, 0, 0 ], + "rotation" : [ 0, 0, 0 ], + "scale" : [ 1, 1, 1 ] +}, + +"defaults" : +{ + "bgcolor" : [ 0, 0, 0 ], + "bgalpha" : 1.000000, + "camera" : "" +} + +} diff --git a/js/three.min.js b/js/three.min.js new file mode 100644 index 00000000..643c934a --- /dev/null +++ b/js/three.min.js @@ -0,0 +1,759 @@ +var self = self || {}; + +// High-resulution counter: emulate window.performance.now() for THREE.CLOCK +if( self.performance === undefined ) { + + self.performance = {}; + +} + +if( self.performance.now === undefined ) { + + // check if we are in a Node.js environment + if( ( process !== undefined ) && ( process.hrtime !== undefined ) ) { + + self.performance.now = function () { + + var time = process.hrtime(); + return ( time[0] + time[1] / 1e9 ) * 1000; + + }; + + } + // if not Node.js revert to using the Date class + else { + + self.performance.now = function() { + + return new Date().getTime(); + + }; + + } + +} +// three.js - http://github.com/mrdoob/three.js +'use strict';var THREE=THREE||{REVISION:"59dev"};self.console=self.console||{info:function(){},log:function(){},debug:function(){},warn:function(){},error:function(){}};self.Int32Array=self.Int32Array||Array;self.Float32Array=self.Float32Array||Array;String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")}; +THREE.extend=function(a,b){if(Object.keys)for(var c=Object.keys(b),d=0,e=c.length;d>16&255)/255;this.g=(a>>8&255)/255;this.b=(a&255)/255;return this},setRGB:function(a,b,c){this.r=a;this.g=b;this.b=c;return this},setHSL:function(a,b,c){if(0===b)this.r=this.g=this.b=c;else{var d=function(a,b,c){0>c&&(c+=1);1c?b:c<2/3?a+6*(b-a)*(2/3-c):a},b=0.5>=c?c*(1+b):c+b-c*b,c=2*c-b;this.r=d(c,b,a+1/3);this.g=d(c,b,a);this.b=d(c,b,a-1/3)}return this},setStyle:function(a){if(/^rgb\((\d+),(\d+),(\d+)\)$/i.test(a))return a=/^rgb\((\d+),(\d+),(\d+)\)$/i.exec(a),this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,this;if(/^rgb\((\d+)\%,(\d+)\%,(\d+)\%\)$/i.test(a))return a=/^rgb\((\d+)\%,(\d+)\%,(\d+)\%\)$/i.exec(a),this.r=Math.min(100, +parseInt(a[1],10))/100,this.g=Math.min(100,parseInt(a[2],10))/100,this.b=Math.min(100,parseInt(a[3],10))/100,this;if(/^\#([0-9a-f]{6})$/i.test(a))return a=/^\#([0-9a-f]{6})$/i.exec(a),this.setHex(parseInt(a[1],16)),this;if(/^\#([0-9a-f])([0-9a-f])([0-9a-f])$/i.test(a))return a=/^\#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(a),this.setHex(parseInt(a[1]+a[1]+a[2]+a[2]+a[3]+a[3],16)),this;if(/^(\w+)$/i.test(a))return this.setHex(THREE.ColorKeywords[a]),this},copy:function(a){this.r=a.r;this.g=a.g;this.b= +a.b;return this},copyGammaToLinear:function(a){this.r=a.r*a.r;this.g=a.g*a.g;this.b=a.b*a.b;return this},copyLinearToGamma:function(a){this.r=Math.sqrt(a.r);this.g=Math.sqrt(a.g);this.b=Math.sqrt(a.b);return this},convertGammaToLinear:function(){var a=this.r,b=this.g,c=this.b;this.r=a*a;this.g=b*b;this.b=c*c;return this},convertLinearToGamma:function(){this.r=Math.sqrt(this.r);this.g=Math.sqrt(this.g);this.b=Math.sqrt(this.b);return this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255* +this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(){var a={h:0,s:0,l:0};return function(){var b=this.r,c=this.g,d=this.b,e=Math.max(b,c,d),f=Math.min(b,c,d),h,g=(f+e)/2;if(f===e)f=h=0;else{var i=e-f,f=0.5>=g?i/(e+f):i/(2-e-f);switch(e){case b:h=(c-d)/i+(cf&&c>b?(c=2*Math.sqrt(1+c-f-b),this.w=(i-h)/c,this.x=0.25*c,this.y=(a+e)/c,this.z=(d+g)/c):f>b?(c=2*Math.sqrt(1+f-c-b),this.w=(d-g)/c,this.x=(a+e)/c,this.y=0.25*c,this.z=(h+i)/c):(c=2*Math.sqrt(1+b-c-f),this.w=(e-a)/c,this.x=(d+g)/c,this.y=(h+i)/c,this.z=0.25*c);return this},inverse:function(){this.conjugate().normalize(); +return this},conjugate:function(){this.x*=-1;this.y*=-1;this.z*=-1;return this},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},normalize:function(){var a=this.length();0===a?(this.z=this.y=this.x=0,this.w=1):(a=1/a,this.x*=a,this.y*=a,this.z*=a,this.w*=a);return this},multiply:function(a,b){return void 0!==b?(console.warn("DEPRECATED: Quaternion's .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), +this.multiplyQuaternions(a,b)):this.multiplyQuaternions(this,a)},multiplyQuaternions:function(a,b){var c=a.x,d=a.y,e=a.z,f=a.w,h=b.x,g=b.y,i=b.z,j=b.w;this.x=c*j+f*h+d*i-e*g;this.y=d*j+f*g+e*h-c*i;this.z=e*j+f*i+c*g-d*h;this.w=f*j-c*h-d*g-e*i;return this},multiplyVector3:function(a){console.warn("DEPRECATED: Quaternion's .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.");return a.applyQuaternion(this)},slerp:function(a,b){var c=this.x,d=this.y,e=this.z, +f=this.w,h=f*a.w+c*a.x+d*a.y+e*a.z;0>h?(this.w=-a.w,this.x=-a.x,this.y=-a.y,this.z=-a.z,h=-h):this.copy(a);if(1<=h)return this.w=f,this.x=c,this.y=d,this.z=e,this;var g=Math.acos(h),i=Math.sqrt(1-h*h);if(0.0010>Math.abs(i))return this.w=0.5*(f+this.w),this.x=0.5*(c+this.x),this.y=0.5*(d+this.y),this.z=0.5*(e+this.z),this;h=Math.sin((1-b)*g)/i;g=Math.sin(b*g)/i;this.w=f*h+this.w*g;this.x=c*h+this.x*g;this.y=d*h+this.y*g;this.z=e*h+this.z*g;return this},equals:function(a){return a.x===this.x&&a.y=== +this.y&&a.z===this.z&&a.w===this.w},fromArray:function(a){this.x=a[0];this.y=a[1];this.z=a[2];this.w=a[3];return this},toArray:function(){return[this.x,this.y,this.z,this.w]},clone:function(){return new THREE.Quaternion(this.x,this.y,this.z,this.w)}};THREE.Quaternion.slerp=function(a,b,c,d){return c.copy(a).slerp(b,d)};THREE.Vector2=function(a,b){this.x=a||0;this.y=b||0}; +THREE.Vector2.prototype={constructor:THREE.Vector2,set:function(a,b){this.x=a;this.y=b;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+a);}},copy:function(a){this.x=a.x;this.y=a.y;return this},add:function(a, +b){if(void 0!==b)return console.warn("DEPRECATED: Vector2's .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;return this},addScalar:function(a){this.x+=a;this.y+=a;return this},sub:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector2's .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-= +a.y;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;return this},divideScalar:function(a){0!==a?(this.x/=a,this.y/=a):this.set(0,0);return this},min:function(a){this.x>a.x&&(this.x=a.x);this.y>a.y&&(this.y=a.y);return this},max:function(a){this.xb.x&&(this.x=b.x);this.yb.y&&(this.y=b.y);return this}, +negate:function(){return this.multiplyScalar(-1)},dot:function(a){return this.x*a.x+this.y*a.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},normalize:function(){return this.divideScalar(this.length())},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,a=this.y-a.y;return b*b+a*a},setLength:function(a){var b=this.length();0!==b&&a!==b&&this.multiplyScalar(a/ +b);return this},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;return this},equals:function(a){return a.x===this.x&&a.y===this.y},fromArray:function(a){this.x=a[0];this.y=a[1];return this},toArray:function(){return[this.x,this.y]},clone:function(){return new THREE.Vector2(this.x,this.y)}};THREE.Vector3=function(a,b,c){this.x=a||0;this.y=b||0;this.z=c||0}; +THREE.Vector3.prototype={constructor:THREE.Vector3,set:function(a,b,c){this.x=a;this.y=b;this.z=c;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+ +a);}},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;return this},add:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector3's .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;return this},addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;return this},sub:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector3's .sub() now only accepts one argument. Use .subVectors( a, b ) instead."), +this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;return this},multiply:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector3's .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(a,b);this.x*=a.x;this.y*=a.y;this.z*=a.z;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;return this},multiplyVectors:function(a,b){this.x=a.x* +b.x;this.y=a.y*b.y;this.z=a.z*b.z;return this},applyMatrix3:function(a){var b=this.x,c=this.y,d=this.z,a=a.elements;this.x=a[0]*b+a[3]*c+a[6]*d;this.y=a[1]*b+a[4]*c+a[7]*d;this.z=a[2]*b+a[5]*c+a[8]*d;return this},applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12];this.y=a[1]*b+a[5]*c+a[9]*d+a[13];this.z=a[2]*b+a[6]*c+a[10]*d+a[14];return this},applyProjection:function(a){var b=this.x,c=this.y,d=this.z,a=a.elements,e=1/(a[3]*b+a[7]*c+a[11]*d+a[15]); +this.x=(a[0]*b+a[4]*c+a[8]*d+a[12])*e;this.y=(a[1]*b+a[5]*c+a[9]*d+a[13])*e;this.z=(a[2]*b+a[6]*c+a[10]*d+a[14])*e;return this},applyQuaternion:function(a){var b=this.x,c=this.y,d=this.z,e=a.x,f=a.y,h=a.z,a=a.w,g=a*b+f*d-h*c,i=a*c+h*b-e*d,j=a*d+e*c-f*b,b=-e*b-f*c-h*d;this.x=g*a+b*-e+i*-h-j*-f;this.y=i*a+b*-f+j*-e-g*-h;this.z=j*a+b*-h+g*-f-i*-e;return this},transformDirection:function(a){var b=this.x,c=this.y,d=this.z,a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d;this.y=a[1]*b+a[5]*c+a[9]*d;this.z=a[2]* +b+a[6]*c+a[10]*d;this.normalize();return this},divide:function(a){this.x/=a.x;this.y/=a.y;this.z/=a.z;return this},divideScalar:function(a){0!==a?(this.x/=a,this.y/=a,this.z/=a):this.z=this.y=this.x=0;return this},min:function(a){this.x>a.x&&(this.x=a.x);this.y>a.y&&(this.y=a.y);this.z>a.z&&(this.z=a.z);return this},max:function(a){this.xb.x&&(this.x=b.x);this.yb.y&&(this.y=b.y);this.zb.z&&(this.z=b.z);return this},negate:function(){return this.multiplyScalar(-1)},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){var b= +this.length();0!==b&&a!==b&&this.multiplyScalar(a/b);return this},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;return this},cross:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector3's .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(a,b);var c=this.x,d=this.y,e=this.z;this.x=d*a.z-e*a.y;this.y=e*a.x-c*a.z;this.z=c*a.y-d*a.x;return this},crossVectors:function(a,b){this.x=a.y*b.z-a.z*b.y;this.y= +a.z*b.x-a.x*b.z;this.z=a.x*b.y-a.y*b.x;return this},angleTo:function(a){a=this.dot(a)/(this.length()*a.length());return Math.acos(THREE.Math.clamp(a,-1,1))},distanceTo:function(a){return Math.sqrt(this.distanceToSquared(a))},distanceToSquared:function(a){var b=this.x-a.x,c=this.y-a.y,a=this.z-a.z;return b*b+c*c+a*a},setEulerFromRotationMatrix:function(a,b){function c(a){return Math.min(Math.max(a,-1),1)}var d=a.elements,e=d[0],f=d[4],h=d[8],g=d[1],i=d[5],j=d[9],l=d[2],n=d[6],d=d[10];void 0===b||"XYZ"=== +b?(this.y=Math.asin(c(h)),0.99999>Math.abs(h)?(this.x=Math.atan2(-j,d),this.z=Math.atan2(-f,e)):(this.x=Math.atan2(n,i),this.z=0)):"YXZ"===b?(this.x=Math.asin(-c(j)),0.99999>Math.abs(j)?(this.y=Math.atan2(h,d),this.z=Math.atan2(g,i)):(this.y=Math.atan2(-l,e),this.z=0)):"ZXY"===b?(this.x=Math.asin(c(n)),0.99999>Math.abs(n)?(this.y=Math.atan2(-l,d),this.z=Math.atan2(-f,i)):(this.y=0,this.z=Math.atan2(g,e))):"ZYX"===b?(this.y=Math.asin(-c(l)),0.99999>Math.abs(l)?(this.x=Math.atan2(n,d),this.z=Math.atan2(g, +e)):(this.x=0,this.z=Math.atan2(-f,i))):"YZX"===b?(this.z=Math.asin(c(g)),0.99999>Math.abs(g)?(this.x=Math.atan2(-j,i),this.y=Math.atan2(-l,e)):(this.x=0,this.y=Math.atan2(h,d))):"XZY"===b&&(this.z=Math.asin(-c(f)),0.99999>Math.abs(f)?(this.x=Math.atan2(n,i),this.y=Math.atan2(h,e)):(this.x=Math.atan2(-j,d),this.y=0));return this},setEulerFromQuaternion:function(a,b){function c(a){return Math.min(Math.max(a,-1),1)}var d=a.x*a.x,e=a.y*a.y,f=a.z*a.z,h=a.w*a.w;void 0===b||"XYZ"===b?(this.x=Math.atan2(2* +(a.x*a.w-a.y*a.z),h-d-e+f),this.y=Math.asin(c(2*(a.x*a.z+a.y*a.w))),this.z=Math.atan2(2*(a.z*a.w-a.x*a.y),h+d-e-f)):"YXZ"===b?(this.x=Math.asin(c(2*(a.x*a.w-a.y*a.z))),this.y=Math.atan2(2*(a.x*a.z+a.y*a.w),h-d-e+f),this.z=Math.atan2(2*(a.x*a.y+a.z*a.w),h-d+e-f)):"ZXY"===b?(this.x=Math.asin(c(2*(a.x*a.w+a.y*a.z))),this.y=Math.atan2(2*(a.y*a.w-a.z*a.x),h-d-e+f),this.z=Math.atan2(2*(a.z*a.w-a.x*a.y),h-d+e-f)):"ZYX"===b?(this.x=Math.atan2(2*(a.x*a.w+a.z*a.y),h-d-e+f),this.y=Math.asin(c(2*(a.y*a.w-a.x* +a.z))),this.z=Math.atan2(2*(a.x*a.y+a.z*a.w),h+d-e-f)):"YZX"===b?(this.x=Math.atan2(2*(a.x*a.w-a.z*a.y),h-d+e-f),this.y=Math.atan2(2*(a.y*a.w-a.x*a.z),h+d-e-f),this.z=Math.asin(c(2*(a.x*a.y+a.z*a.w)))):"XZY"===b&&(this.x=Math.atan2(2*(a.x*a.w+a.y*a.z),h-d+e-f),this.y=Math.atan2(2*(a.x*a.z+a.y*a.w),h+d-e-f),this.z=Math.asin(c(2*(a.z*a.w-a.x*a.y))));return this},getPositionFromMatrix:function(a){this.x=a.elements[12];this.y=a.elements[13];this.z=a.elements[14];return this},getScaleFromMatrix:function(a){var b= +this.set(a.elements[0],a.elements[1],a.elements[2]).length(),c=this.set(a.elements[4],a.elements[5],a.elements[6]).length(),a=this.set(a.elements[8],a.elements[9],a.elements[10]).length();this.x=b;this.y=c;this.z=a;return this},getColumnFromMatrix:function(a,b){var c=4*a,d=b.elements;this.x=d[c];this.y=d[c+1];this.z=d[c+2];return this},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z},fromArray:function(a){this.x=a[0];this.y=a[1];this.z=a[2];return this},toArray:function(){return[this.x, +this.y,this.z]},clone:function(){return new THREE.Vector3(this.x,this.y,this.z)}}; +THREE.extend(THREE.Vector3.prototype,{applyEuler:function(){var a=new THREE.Quaternion;return function(b,c){var d=a.setFromEuler(b,c);this.applyQuaternion(d);return this}}(),applyAxisAngle:function(){var a=new THREE.Quaternion;return function(b,c){var d=a.setFromAxisAngle(b,c);this.applyQuaternion(d);return this}}(),projectOnVector:function(){var a=new THREE.Vector3;return function(b){a.copy(b).normalize();b=this.dot(a);return this.copy(a).multiplyScalar(b)}}(),projectOnPlane:function(){var a=new THREE.Vector3; +return function(b){a.copy(this).projectOnVector(b);return this.sub(a)}}(),reflect:function(){var a=new THREE.Vector3;return function(b){a.copy(this).projectOnVector(b).multiplyScalar(2);return this.subVectors(a,this)}}()});THREE.Vector4=function(a,b,c,d){this.x=a||0;this.y=b||0;this.z=c||0;this.w=void 0!==d?d:1}; +THREE.Vector4.prototype={constructor:THREE.Vector4,set:function(a,b,c,d){this.x=a;this.y=b;this.z=c;this.w=d;return this},setX:function(a){this.x=a;return this},setY:function(a){this.y=a;return this},setZ:function(a){this.z=a;return this},setW:function(a){this.w=a;return this},setComponent:function(a,b){switch(a){case 0:this.x=b;break;case 1:this.y=b;break;case 2:this.z=b;break;case 3:this.w=b;break;default:throw Error("index is out of range: "+a);}},getComponent:function(a){switch(a){case 0:return this.x; +case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+a);}},copy:function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.w=void 0!==a.w?a.w:1;return this},add:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector4's .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(a,b);this.x+=a.x;this.y+=a.y;this.z+=a.z;this.w+=a.w;return this},addScalar:function(a){this.x+=a;this.y+=a;this.z+=a;this.w+=a;return this}, +addVectors:function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z;this.w=a.w+b.w;return this},sub:function(a,b){if(void 0!==b)return console.warn("DEPRECATED: Vector4's .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(a,b);this.x-=a.x;this.y-=a.y;this.z-=a.z;this.w-=a.w;return this},subVectors:function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z;this.w=a.w-b.w;return this},multiplyScalar:function(a){this.x*=a;this.y*=a;this.z*=a;this.w*=a;return this}, +applyMatrix4:function(a){var b=this.x,c=this.y,d=this.z,e=this.w,a=a.elements;this.x=a[0]*b+a[4]*c+a[8]*d+a[12]*e;this.y=a[1]*b+a[5]*c+a[9]*d+a[13]*e;this.z=a[2]*b+a[6]*c+a[10]*d+a[14]*e;this.w=a[3]*b+a[7]*c+a[11]*d+a[15]*e;return this},divideScalar:function(a){0!==a?(this.x/=a,this.y/=a,this.z/=a,this.w/=a):(this.z=this.y=this.x=0,this.w=1);return this},setAxisAngleFromQuaternion:function(a){this.w=2*Math.acos(a.w);var b=Math.sqrt(1-a.w*a.w);1E-4>b?(this.x=1,this.z=this.y=0):(this.x=a.x/b,this.y= +a.y/b,this.z=a.z/b);return this},setAxisAngleFromRotationMatrix:function(a){var b,c,d,a=a.elements,e=a[0];d=a[4];var f=a[8],h=a[1],g=a[5],i=a[9];c=a[2];b=a[6];var j=a[10];if(0.01>Math.abs(d-h)&&0.01>Math.abs(f-c)&&0.01>Math.abs(i-b)){if(0.1>Math.abs(d+h)&&0.1>Math.abs(f+c)&&0.1>Math.abs(i+b)&&0.1>Math.abs(e+g+j-3))return this.set(1,0,0,0),this;a=Math.PI;e=(e+1)/2;g=(g+1)/2;j=(j+1)/2;d=(d+h)/4;f=(f+c)/4;i=(i+b)/4;e>g&&e>j?0.01>e?(b=0,d=c=0.707106781):(b=Math.sqrt(e),c=d/b,d=f/b):g>j?0.01>g?(b=0.707106781, +c=0,d=0.707106781):(c=Math.sqrt(g),b=d/c,d=i/c):0.01>j?(c=b=0.707106781,d=0):(d=Math.sqrt(j),b=f/d,c=i/d);this.set(b,c,d,a);return this}a=Math.sqrt((b-i)*(b-i)+(f-c)*(f-c)+(h-d)*(h-d));0.0010>Math.abs(a)&&(a=1);this.x=(b-i)/a;this.y=(f-c)/a;this.z=(h-d)/a;this.w=Math.acos((e+g+j-1)/2);return this},min:function(a){this.x>a.x&&(this.x=a.x);this.y>a.y&&(this.y=a.y);this.z>a.z&&(this.z=a.z);this.w>a.w&&(this.w=a.w);return this},max:function(a){this.xb.x&&(this.x=b.x);this.yb.y&&(this.y=b.y);this.zb.z&&(this.z=b.z);this.wb.w&&(this.w=b.w);return this},negate:function(){return this.multiplyScalar(-1)},dot:function(a){return this.x*a.x+this.y*a.y+this.z*a.z+this.w*a.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x* +this.x+this.y*this.y+this.z*this.z+this.w*this.w)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length())},setLength:function(a){var b=this.length();0!==b&&a!==b&&this.multiplyScalar(a/b);return this},lerp:function(a,b){this.x+=(a.x-this.x)*b;this.y+=(a.y-this.y)*b;this.z+=(a.z-this.z)*b;this.w+=(a.w-this.w)*b;return this},equals:function(a){return a.x===this.x&&a.y===this.y&&a.z===this.z&& +a.w===this.w},fromArray:function(a){this.x=a[0];this.y=a[1];this.z=a[2];this.w=a[3];return this},toArray:function(){return[this.x,this.y,this.z,this.w]},clone:function(){return new THREE.Vector4(this.x,this.y,this.z,this.w)}};THREE.Line3=function(a,b){this.start=void 0!==a?a:new THREE.Vector3;this.end=void 0!==b?b:new THREE.Vector3}; +THREE.Line3.prototype={constructor:THREE.Line3,set:function(a,b){this.start.copy(a);this.end.copy(b);return this},copy:function(a){this.start.copy(a.start);this.end.copy(a.end);return this},center:function(a){return(a||new THREE.Vector3).addVectors(this.start,this.end).multiplyScalar(0.5)},delta:function(a){return(a||new THREE.Vector3).subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(a, +b){var c=b||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},closestPointToPointParameter:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d){a.subVectors(c,this.start);b.subVectors(this.end,this.start);var e=b.dot(b),e=b.dot(a)/e;d&&(e=THREE.Math.clamp(e,0,1));return e}}(),closestPointToPoint:function(a,b,c){a=this.closestPointToPointParameter(a,b);c=c||new THREE.Vector3;return this.delta(c).multiplyScalar(a).add(this.start)},applyMatrix4:function(a){this.start.applyMatrix4(a); +this.end.applyMatrix4(a);return this},equals:function(a){return a.start.equals(this.start)&&a.end.equals(this.end)},clone:function(){return(new THREE.Line3).copy(this)}};THREE.Box2=function(a,b){this.min=void 0!==a?a:new THREE.Vector2(Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector2(-Infinity,-Infinity)}; +THREE.Box2.prototype={constructor:THREE.Box2,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){if(0this.max.x&&(this.max.x=b.x),b.ythis.max.y&&(this.max.y=b.y)}else this.makeEmpty();return this},setFromCenterAndSize:function(){var a=new THREE.Vector2;return function(b,c){var d=a.copy(c).multiplyScalar(0.5); +this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=Infinity;this.max.x=this.max.y=-Infinity;return this},empty:function(){return this.max.xthis.max.x||a.ythis.max.y?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<=this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y?!0:!1},getParameter:function(a){return new THREE.Vector2((a.x-this.min.x)/(this.max.x-this.min.x), +(a.y-this.min.y)/(this.max.y-this.min.y))},isIntersectionBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y?!1:!0},clampPoint:function(a,b){return(b||new THREE.Vector2).copy(a).clamp(this.min,this.max)},distanceToPoint:function(){var a=new THREE.Vector2;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max); +return this},translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)},clone:function(){return(new THREE.Box2).copy(this)}};THREE.Box3=function(a,b){this.min=void 0!==a?a:new THREE.Vector3(Infinity,Infinity,Infinity);this.max=void 0!==b?b:new THREE.Vector3(-Infinity,-Infinity,-Infinity)}; +THREE.Box3.prototype={constructor:THREE.Box3,set:function(a,b){this.min.copy(a);this.max.copy(b);return this},setFromPoints:function(a){if(0this.max.x&&(this.max.x=b.x),b.ythis.max.y&&(this.max.y=b.y),b.zthis.max.z&&(this.max.z=b.z)}else this.makeEmpty();return this},setFromCenterAndSize:function(){var a=new THREE.Vector3; +return function(b,c){var d=a.copy(c).multiplyScalar(0.5);this.min.copy(b).sub(d);this.max.copy(b).add(d);return this}}(),copy:function(a){this.min.copy(a.min);this.max.copy(a.max);return this},makeEmpty:function(){this.min.x=this.min.y=this.min.z=Infinity;this.max.x=this.max.y=this.max.z=-Infinity;return this},empty:function(){return this.max.xthis.max.x||a.ythis.max.y||a.zthis.max.z?!1:!0},containsBox:function(a){return this.min.x<=a.min.x&&a.max.x<= +this.max.x&&this.min.y<=a.min.y&&a.max.y<=this.max.y&&this.min.z<=a.min.z&&a.max.z<=this.max.z?!0:!1},getParameter:function(a){return new THREE.Vector3((a.x-this.min.x)/(this.max.x-this.min.x),(a.y-this.min.y)/(this.max.y-this.min.y),(a.z-this.min.z)/(this.max.z-this.min.z))},isIntersectionBox:function(a){return a.max.xthis.max.x||a.max.ythis.max.y||a.max.zthis.max.z?!1:!0},clampPoint:function(a,b){return(b||new THREE.Vector3).copy(a).clamp(this.min, +this.max)},distanceToPoint:function(){var a=new THREE.Vector3;return function(b){return a.copy(b).clamp(this.min,this.max).sub(b).length()}}(),getBoundingSphere:function(){var a=new THREE.Vector3;return function(b){b=b||new THREE.Sphere;b.center=this.center();b.radius=0.5*this.size(a).length();return b}}(),intersect:function(a){this.min.max(a.min);this.max.min(a.max);return this},union:function(a){this.min.min(a.min);this.max.max(a.max);return this},applyMatrix4:function(){var a=[new THREE.Vector3, +new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];return function(b){a[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(b);a[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(b);a[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(b);a[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(b);a[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(b);a[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(b);a[6].set(this.max.x, +this.max.y,this.min.z).applyMatrix4(b);a[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(b);this.makeEmpty();this.setFromPoints(a);return this}}(),translate:function(a){this.min.add(a);this.max.add(a);return this},equals:function(a){return a.min.equals(this.min)&&a.max.equals(this.max)},clone:function(){return(new THREE.Box3).copy(this)}};THREE.Matrix3=function(a,b,c,d,e,f,h,g,i){this.elements=new Float32Array(9);this.set(void 0!==a?a:1,b||0,c||0,d||0,void 0!==e?e:1,f||0,h||0,g||0,void 0!==i?i:1)}; +THREE.Matrix3.prototype={constructor:THREE.Matrix3,set:function(a,b,c,d,e,f,h,g,i){var j=this.elements;j[0]=a;j[3]=b;j[6]=c;j[1]=d;j[4]=e;j[7]=f;j[2]=h;j[5]=g;j[8]=i;return this},identity:function(){this.set(1,0,0,0,1,0,0,0,1);return this},copy:function(a){a=a.elements;this.set(a[0],a[3],a[6],a[1],a[4],a[7],a[2],a[5],a[8]);return this},multiplyVector3:function(a){console.warn("DEPRECATED: Matrix3's .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.");return a.applyMatrix3(this)}, +multiplyVector3Array:function(){var a=new THREE.Vector3;return function(b){for(var c=0,d=b.length;c=this.radius},containsPoint:function(a){return a.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(a){return a.distanceTo(this.center)- +this.radius},intersectsSphere:function(a){var b=this.radius+a.radius;return a.center.distanceToSquared(this.center)<=b*b},clampPoint:function(a,b){var c=this.center.distanceToSquared(a),d=b||new THREE.Vector3;d.copy(a);c>this.radius*this.radius&&(d.sub(this.center).normalize(),d.multiplyScalar(this.radius).add(this.center));return d},getBoundingBox:function(a){a=a||new THREE.Box3;a.set(this.center,this.center);a.expandByScalar(this.radius);return a},applyMatrix4:function(a){this.center.applyMatrix4(a); +this.radius*=a.getMaxScaleOnAxis();return this},translate:function(a){this.center.add(a);return this},equals:function(a){return a.center.equals(this.center)&&a.radius===this.radius},clone:function(){return(new THREE.Sphere).copy(this)}};THREE.Frustum=function(a,b,c,d,e,f){this.planes=[void 0!==a?a:new THREE.Plane,void 0!==b?b:new THREE.Plane,void 0!==c?c:new THREE.Plane,void 0!==d?d:new THREE.Plane,void 0!==e?e:new THREE.Plane,void 0!==f?f:new THREE.Plane]}; +THREE.Frustum.prototype={constructor:THREE.Frustum,set:function(a,b,c,d,e,f){var h=this.planes;h[0].copy(a);h[1].copy(b);h[2].copy(c);h[3].copy(d);h[4].copy(e);h[5].copy(f);return this},copy:function(a){for(var b=this.planes,c=0;6>c;c++)b[c].copy(a.planes[c]);return this},setFromMatrix:function(a){var b=this.planes,c=a.elements,a=c[0],d=c[1],e=c[2],f=c[3],h=c[4],g=c[5],i=c[6],j=c[7],l=c[8],n=c[9],m=c[10],p=c[11],t=c[12],r=c[13],q=c[14],c=c[15];b[0].setComponents(f-a,j-h,p-l,c-t).normalize();b[1].setComponents(f+ +a,j+h,p+l,c+t).normalize();b[2].setComponents(f+d,j+g,p+n,c+r).normalize();b[3].setComponents(f-d,j-g,p-n,c-r).normalize();b[4].setComponents(f-e,j-i,p-m,c-q).normalize();b[5].setComponents(f+e,j+i,p+m,c+q).normalize();return this},intersectsObject:function(){var a=new THREE.Vector3;return function(b){var c=b.matrixWorld,d=this.planes,b=-b.geometry.boundingSphere.radius*c.getMaxScaleOnAxis();a.getPositionFromMatrix(c);for(c=0;6>c;c++)if(d[c].distanceToPoint(a)d;d++)if(b[d].distanceToPoint(c)c;c++)if(0>b[c].distanceToPoint(a))return!1;return!0},clone:function(){return(new THREE.Frustum).copy(this)}};THREE.Plane=function(a,b){this.normal=void 0!==a?a:new THREE.Vector3(1,0,0);this.constant=void 0!==b?b:0}; +THREE.Plane.prototype={constructor:THREE.Plane,set:function(a,b){this.normal.copy(a);this.constant=b;return this},setComponents:function(a,b,c,d){this.normal.set(a,b,c);this.constant=d;return this},setFromNormalAndCoplanarPoint:function(a,b){this.normal.copy(a);this.constant=-b.dot(this.normal);return this},setFromCoplanarPoints:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(c,d,e){d=a.subVectors(e,d).cross(b.subVectors(c,d)).normalize();this.setFromNormalAndCoplanarPoint(d, +c);return this}}(),copy:function(a){this.normal.copy(a.normal);this.constant=a.constant;return this},normalize:function(){var a=1/this.normal.length();this.normal.multiplyScalar(a);this.constant*=a;return this},negate:function(){this.constant*=-1;this.normal.negate();return this},distanceToPoint:function(a){return this.normal.dot(a)+this.constant},distanceToSphere:function(a){return this.distanceToPoint(a.center)-a.radius},projectPoint:function(a,b){return this.orthoPoint(a,b).sub(a).negate()},orthoPoint:function(a, +b){var c=this.distanceToPoint(a);return(b||new THREE.Vector3).copy(this.normal).multiplyScalar(c)},isIntersectionLine:function(a){var b=this.distanceToPoint(a.start),a=this.distanceToPoint(a.end);return 0>b&&0a&&0f||1c?c:a},clampBottom:function(a,b){return a=c)return 1;a=(a-b)/(c-b);return a*a*(3-2*a)},smootherstep:function(a,b,c){if(a<=b)return 0;if(a>=c)return 1;a=(a-b)/(c-b);return a*a*a*(a*(6*a-15)+10)},random16:function(){return(65280*Math.random()+255*Math.random())/65535},randInt:function(a,b){return a+Math.floor(Math.random()*(b-a+1))},randFloat:function(a, +b){return a+Math.random()*(b-a)},randFloatSpread:function(a){return a*(0.5-Math.random())},sign:function(a){return 0>a?-1:0this.points.length-2?this.points.length-1:f+1;c[3]=f>this.points.length-3?this.points.length-1: +f+2;j=this.points[c[0]];l=this.points[c[1]];n=this.points[c[2]];m=this.points[c[3]];g=h*h;i=h*g;d.x=b(j.x,l.x,n.x,m.x,h,g,i);d.y=b(j.y,l.y,n.y,m.y,h,g,i);d.z=b(j.z,l.z,n.z,m.z,h,g,i);return d};this.getControlPointsArray=function(){var a,b,c=this.points.length,d=[];for(a=0;a=b.x+b.y}}(); +THREE.Triangle.prototype={constructor:THREE.Triangle,set:function(a,b,c){this.a.copy(a);this.b.copy(b);this.c.copy(c);return this},setFromPointsAndIndices:function(a,b,c,d){this.a.copy(a[b]);this.b.copy(a[c]);this.c.copy(a[d]);return this},copy:function(a){this.a.copy(a.a);this.b.copy(a.b);this.c.copy(a.c);return this},area:function(){var a=new THREE.Vector3,b=new THREE.Vector3;return function(){a.subVectors(this.c,this.b);b.subVectors(this.a,this.b);return 0.5*a.cross(b).length()}}(),midpoint:function(a){return(a|| +new THREE.Vector3).addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(a){return THREE.Triangle.normal(this.a,this.b,this.c,a)},plane:function(a){return(a||new THREE.Plane).setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(a,b){return THREE.Triangle.barycoordFromPoint(a,this.a,this.b,this.c,b)},containsPoint:function(a){return THREE.Triangle.containsPoint(a,this.a,this.b,this.c)},equals:function(a){return a.a.equals(this.a)&&a.b.equals(this.b)&&a.c.equals(this.c)}, +clone:function(){return(new THREE.Triangle).copy(this)}};THREE.Vertex=function(a){console.warn("THREE.Vertex has been DEPRECATED. Use THREE.Vector3 instead.");return a};THREE.UV=function(a,b){console.warn("THREE.UV has been DEPRECATED. Use THREE.Vector2 instead.");return new THREE.Vector2(a,b)};THREE.Clock=function(a){this.autoStart=void 0!==a?a:!0;this.elapsedTime=this.oldTime=this.startTime=0;this.running=!1}; +THREE.Clock.prototype={constructor:THREE.Clock,start:function(){this.oldTime=this.startTime=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now();this.running=!0},stop:function(){this.getElapsedTime();this.running=!1},getElapsedTime:function(){this.getDelta();return this.elapsedTime},getDelta:function(){var a=0;this.autoStart&&!this.running&&this.start();if(this.running){var b=void 0!==self.performance&&void 0!==self.performance.now?self.performance.now():Date.now(), +a=0.0010*(b-this.oldTime);this.oldTime=b;this.elapsedTime+=a}return a}};THREE.EventDispatcher=function(){}; +THREE.EventDispatcher.prototype={constructor:THREE.EventDispatcher,addEventListener:function(a,b){void 0===this._listeners&&(this._listeners={});var c=this._listeners;void 0===c[a]&&(c[a]=[]);-1===c[a].indexOf(b)&&c[a].push(b)},hasEventListener:function(a,b){if(void 0===this._listeners)return!1;var c=this._listeners;return void 0!==c[a]&&-1!==c[a].indexOf(b)?!0:!1},removeEventListener:function(a,b){if(void 0!==this._listeners){var c=this._listeners,d=c[a].indexOf(b);-1!==d&&c[a].splice(d,1)}},dispatchEvent:function(a){if(void 0!== +this._listeners){var b=this._listeners[a.type];if(void 0!==b){a.target=this;for(var c=0,d=b.length;cg.scale.x)return m;m.push({distance:p,point:g.position,face:null,object:g})}else if(g instanceof +a.LOD)f.getPositionFromMatrix(g.matrixWorld),p=j.ray.origin.distanceTo(f),i(g.getObjectForDistance(p),j,m);else if(g instanceof a.Mesh){f.getPositionFromMatrix(g.matrixWorld);b.set(f,g.geometry.boundingSphere.radius*g.matrixWorld.getMaxScaleOnAxis());if(!1===j.ray.isIntersectionSphere(b))return m;var p=g.geometry,t=p.vertices;if(p instanceof a.BufferGeometry){var r=g.material instanceof a.MeshFaceMaterial,q=!0===r?g.material.materials:null,s=g.material.side,w,z,H,G=j.precision;h.getInverse(g.matrixWorld); +c.copy(j.ray).applyMatrix4(h);if(!p.dynamic)return m;var J,t=!1;p.attributes.index?(t=!0,J=p.attributes.index.numItems/3):J=p.attributes.position.numItems/9;for(var I=0;IB)){s=s.side;if(s!==a.DoubleSide&&(F=c.direction.dot(d.normal),!(s===a.FrontSide?0> +F:0j.far||(e=c.at(B,e),a.Triangle.containsPoint(e,A,r,q)&&(A=new a.Face3(w,z,H),s=p.attributes.color.array,A.vertexColors[0]=new a.Color(s[3*w],s[3*w+1],s[3*w+2]),A.vertexColors[1]=new a.Color(s[3*z],s[3*z+1],s[3*z+2]),A.vertexColors[2]=new a.Color(s[3*H],s[3*H+1],s[3*H+2]),m.push({distance:B,point:j.ray.at(B),face:A,faceIndex:I,object:g})))}}}}else if(p instanceof a.Geometry){r=g.material instanceof a.MeshFaceMaterial;q=!0===r?g.material.materials:null;G=j.precision;h.getInverse(g.matrixWorld); +c.copy(j.ray).applyMatrix4(h);I=0;for(J=p.faces.length;IB))){s=s.side;if(s!==a.DoubleSide&&(F=c.direction.dot(d.normal),!(s===a.FrontSide?0>F:0j.far)){e=c.at(B,e);if(A instanceof a.Face3){if(w=t[A.a],z=t[A.b],H=t[A.c],!a.Triangle.containsPoint(e,w,z,H))continue}else if(A instanceof a.Face4){if(w=t[A.a], +z=t[A.b],H=t[A.c],s=t[A.d],!a.Triangle.containsPoint(e,w,z,s)&&!a.Triangle.containsPoint(e,z,H,s))continue}else throw Error("face type not supported");m.push({distance:B,point:j.ray.at(B),face:A,faceIndex:I,object:g})}}}}},j=function(a,b,c){for(var a=a.getDescendants(),d=0,e=a.length;de&&0>f||0>h&&0>g)return!1;0>e?c=Math.max(c,e/(e-f)):0>f&&(d=Math.min(d,e/(e-f)));0>h?c=Math.max(c,h/(h-g)):0>g&&(d=Math.min(d,h/(h-g)));if(dg.positionScreen.x||1g.positionScreen.y||1g.positionScreen.z||1(Y.positionScreen.x-T.positionScreen.x)*($.positionScreen.y-T.positionScreen.y)-(Y.positionScreen.y-T.positionScreen.y)* +($.positionScreen.x-T.positionScreen.x),la===THREE.DoubleSide||U===(la===THREE.FrontSide))m===t?(ia=new THREE.RenderableFace3,p.push(ia),t++,m++,n=ia):n=p[m++],n.v1.copy(T),n.v2.copy($),n.v3.copy(Y);else continue;else continue;else if(fa instanceof THREE.Face4)if(T=j[fa.a],$=j[fa.b],Y=j[fa.c],ia=j[fa.d],v[0]=T.positionScreen,v[1]=$.positionScreen,v[2]=Y.positionScreen,v[3]=ia.positionScreen,!0===T.visible||!0===$.visible||!0===Y.visible||!0===ia.visible||N.isIntersectionBox(y.setFromPoints(v)))if(U= +0>(ia.positionScreen.x-T.positionScreen.x)*($.positionScreen.y-T.positionScreen.y)-(ia.positionScreen.y-T.positionScreen.y)*($.positionScreen.x-T.positionScreen.x)||0>($.positionScreen.x-Y.positionScreen.x)*(ia.positionScreen.y-Y.positionScreen.y)-($.positionScreen.y-Y.positionScreen.y)*(ia.positionScreen.x-Y.positionScreen.x),la===THREE.DoubleSide||U===(la===THREE.FrontSide)){if(r===s){var va=new THREE.RenderableFace4;q.push(va);s++;r++;n=va}else n=q[r++];n.v1.copy(T);n.v2.copy($);n.v3.copy(Y);n.v4.copy(ia)}else continue; +else continue;n.normalModel.copy(fa.normal);!1===U&&(la===THREE.BackSide||la===THREE.DoubleSide)&&n.normalModel.negate();n.normalModel.applyMatrix3(Va).normalize();n.normalModelView.copy(n.normalModel).applyMatrix3(O);n.centroidModel.copy(fa.centroid).applyMatrix4(oa);Y=fa.vertexNormals;T=0;for($=Y.length;T<$;T++)ia=n.vertexNormalsModel[T],ia.copy(Y[T]),!1===U&&(la===THREE.BackSide||la===THREE.DoubleSide)&&ia.negate(),ia.applyMatrix3(Va).normalize(),n.vertexNormalsModelView[T].copy(ia).applyMatrix3(O); +n.vertexNormalsLength=Y.length;T=0;for($=xa.length;T<$;T++)if(ia=xa[T][da],void 0!==ia){la=0;for(Y=ia.length;laK.z&&(I===B?(U=new THREE.RenderableParticle,A.push(U),B++,I++,J=U):J=A[I++],J.object=ma,J.x=K.x/K.w,J.y=K.y/K.w,J.z=K.z,J.rotation=ma.rotation.z,J.scale.x=ma.scale.x*Math.abs(J.x-(K.x+f.projectionMatrix.elements[0])/(K.w+f.projectionMatrix.elements[12])),J.scale.y=ma.scale.y*Math.abs(J.y-(K.y+f.projectionMatrix.elements[5])/(K.w+f.projectionMatrix.elements[13])), +J.material=ma.material,F.elements.push(J)));!0===l&&F.elements.sort(b);return F}};THREE.Face3=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.normal=d instanceof THREE.Vector3?d:new THREE.Vector3;this.vertexNormals=d instanceof Array?d:[];this.color=e instanceof THREE.Color?e:new THREE.Color;this.vertexColors=e instanceof Array?e:[];this.vertexTangents=[];this.materialIndex=void 0!==f?f:0;this.centroid=new THREE.Vector3}; +THREE.Face3.prototype={constructor:THREE.Face3,clone:function(){var a=new THREE.Face3(this.a,this.b,this.c);a.normal.copy(this.normal);a.color.copy(this.color);a.centroid.copy(this.centroid);a.materialIndex=this.materialIndex;var b,c;b=0;for(c=this.vertexNormals.length;be?-1:1,f.vertexTangents[d]=new THREE.Vector4(N.x,N.y,N.z,e)}this.hasTangents=!0},computeLineDistances:function(){for(var a=0,b=this.vertices,c=0,d=b.length;ci;i++)if(g[i]==g[(i+1)%3]){e.push(f);break}}else if(a instanceof THREE.Face4){a.a=c[a.a];a.b=c[a.b];a.c=c[a.c];a.d=c[a.d];g=[a.a,a.b,a.c,a.d];d=-1;for(i=0;4>i;i++)g[i]==g[(i+1)%4]&&(0<=d&&e.push(f),d=i);if(0<=d){g.splice(d, +1);var l=new THREE.Face3(g[0],g[1],g[2],a.normal,a.color,a.materialIndex);g=0;for(i=this.faceVertexUvs.length;gb.max.x&&(b.max.x=c),db.max.y&&(b.max.y=d),eb.max.z&&(b.max.z=e)}if(void 0===a||0===a.length)this.boundingBox.min.set(0,0,0),this.boundingBox.max.set(0,0,0)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var a=this.attributes.position.array;if(a){for(var b,c=0,d,e,f=0,h=a.length;fc&&(c=b);this.boundingSphere.radius=Math.sqrt(c)}},computeVertexNormals:function(){if(this.attributes.position){var a, +b,c,d;a=this.attributes.position.array.length;if(void 0===this.attributes.normal)this.attributes.normal={itemSize:3,array:new Float32Array(a),numItems:a};else{a=0;for(b=this.attributes.normal.array.length;aFa?-1:1;g[4*a]=L.x;g[4*a+1]=L.y;g[4*a+2]=L.z;g[4*a+3]=O}if(void 0===this.attributes.index||void 0===this.attributes.position||void 0===this.attributes.normal||void 0===this.attributes.uv)console.warn("Missing required attributes (index, position, normal or uv) in BufferGeometry.computeTangents()");else{var b=this.attributes.index.array,c=this.attributes.position.array, +d=this.attributes.normal.array,e=this.attributes.uv.array,f=c.length/3;if(void 0===this.attributes.tangent){var h=4*f;this.attributes.tangent={itemSize:4,array:new Float32Array(h),numItems:h}}for(var g=this.attributes.tangent.array,i=[],j=[],h=0;ha.length?".":a.join("/"))+"/"},initMaterials:function(a,b){for(var c=[],d=0;da.opacity)i.transparent=a.transparent;void 0!==a.depthTest&&(i.depthTest=a.depthTest);void 0!==a.depthWrite&&(i.depthWrite=a.depthWrite);void 0!==a.visible&&(i.visible=a.visible);void 0!==a.flipSided&&(i.side=THREE.BackSide); +void 0!==a.doubleSided&&(i.side=THREE.DoubleSide);void 0!==a.wireframe&&(i.wireframe=a.wireframe);void 0!==a.vertexColors&&("face"===a.vertexColors?i.vertexColors=THREE.FaceColors:a.vertexColors&&(i.vertexColors=THREE.VertexColors));a.colorDiffuse?i.color=f(a.colorDiffuse):a.DbgColor&&(i.color=a.DbgColor);a.colorSpecular&&(i.specular=f(a.colorSpecular));a.colorAmbient&&(i.ambient=f(a.colorAmbient));a.transparency&&(i.opacity=a.transparency);a.specularCoef&&(i.shininess=a.specularCoef);a.mapDiffuse&& +b&&e(i,"map",a.mapDiffuse,a.mapDiffuseRepeat,a.mapDiffuseOffset,a.mapDiffuseWrap,a.mapDiffuseAnisotropy);a.mapLight&&b&&e(i,"lightMap",a.mapLight,a.mapLightRepeat,a.mapLightOffset,a.mapLightWrap,a.mapLightAnisotropy);a.mapBump&&b&&e(i,"bumpMap",a.mapBump,a.mapBumpRepeat,a.mapBumpOffset,a.mapBumpWrap,a.mapBumpAnisotropy);a.mapNormal&&b&&e(i,"normalMap",a.mapNormal,a.mapNormalRepeat,a.mapNormalOffset,a.mapNormalWrap,a.mapNormalAnisotropy);a.mapSpecular&&b&&e(i,"specularMap",a.mapSpecular,a.mapSpecularRepeat, +a.mapSpecularOffset,a.mapSpecularWrap,a.mapSpecularAnisotropy);a.mapBumpScale&&(i.bumpScale=a.mapBumpScale);a.mapNormal?(g=THREE.ShaderLib.normalmap,j=THREE.UniformsUtils.clone(g.uniforms),j.tNormal.value=i.normalMap,a.mapNormalFactor&&j.uNormalScale.value.set(a.mapNormalFactor,a.mapNormalFactor),i.map&&(j.tDiffuse.value=i.map,j.enableDiffuse.value=!0),i.specularMap&&(j.tSpecular.value=i.specularMap,j.enableSpecular.value=!0),i.lightMap&&(j.tAO.value=i.lightMap,j.enableAO.value=!0),j.uDiffuseColor.value.setHex(i.color), +j.uSpecularColor.value.setHex(i.specular),j.uAmbientColor.value.setHex(i.ambient),j.uShininess.value=i.shininess,void 0!==i.opacity&&(j.uOpacity.value=i.opacity),g=new THREE.ShaderMaterial({fragmentShader:g.fragmentShader,vertexShader:g.vertexShader,uniforms:j,lights:!0,fog:!0}),i.transparent&&(g.transparent=!0)):g=new THREE[g](i);void 0!==a.DbgName&&(g.name=a.DbgName);return g}};THREE.ImageLoader=function(){this.crossOrigin=null}; +THREE.ImageLoader.prototype={constructor:THREE.ImageLoader,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,load:function(a,b){var c=this;void 0===b&&(b=new Image);b.addEventListener("load",function(){c.dispatchEvent({type:"load",content:b})},!1);b.addEventListener("error",function(){c.dispatchEvent({type:"error", +message:"Couldn't load URL ["+a+"]"})},!1);c.crossOrigin&&(b.crossOrigin=c.crossOrigin);b.src=a}};THREE.JSONLoader=function(a){THREE.Loader.call(this,a);this.withCredentials=!1};THREE.JSONLoader.prototype=Object.create(THREE.Loader.prototype);THREE.JSONLoader.prototype.load=function(a,b,c){c=c&&"string"===typeof c?c:this.extractUrlBase(a);this.onLoadStart();this.loadAjaxJSON(this,a,b,c)}; +THREE.JSONLoader.prototype.loadAjaxJSON=function(a,b,c,d,e){var f=new XMLHttpRequest,h=0;f.onreadystatechange=function(){if(f.readyState===f.DONE)if(200===f.status||0===f.status){if(f.responseText){var g=JSON.parse(f.responseText),g=a.parse(g,d);c(g.geometry,g.materials)}else console.warn("THREE.JSONLoader: ["+b+"] seems to be unreachable or file there is empty");a.onLoadComplete()}else console.error("THREE.JSONLoader: Couldn't load ["+b+"] ["+f.status+"]");else f.readyState===f.LOADING?e&&(0===h&& +(h=f.getResponseHeader("Content-Length")),e({total:h,loaded:f.responseText.length})):f.readyState===f.HEADERS_RECEIVED&&void 0!==e&&(h=f.getResponseHeader("Content-Length"))};f.open("GET",b,!0);f.withCredentials=this.withCredentials;f.send(null)}; +THREE.JSONLoader.prototype.parse=function(a,b){var c=new THREE.Geometry,d=void 0!==a.scale?1/a.scale:1,e,f,h,g,i,j,l,n,m,p,t,r,q,s,w,z=a.faces;p=a.vertices;var H=a.normals,G=a.colors,J=0;for(e=0;ev.parameters.opacity&&(v.parameters.transparent=!0);v.parameters.normalMap?(K=THREE.ShaderLib.normalmap,y=THREE.UniformsUtils.clone(K.uniforms),s=v.parameters.color,M=v.parameters.specular,q=v.parameters.ambient,N=v.parameters.shininess,y.tNormal.value=B.textures[v.parameters.normalMap],v.parameters.normalScale&&y.uNormalScale.value.set(v.parameters.normalScale[0],v.parameters.normalScale[1]),v.parameters.map&&(y.tDiffuse.value= +v.parameters.map,y.enableDiffuse.value=!0),v.parameters.envMap&&(y.tCube.value=v.parameters.envMap,y.enableReflection.value=!0,y.uReflectivity.value=v.parameters.reflectivity),v.parameters.lightMap&&(y.tAO.value=v.parameters.lightMap,y.enableAO.value=!0),v.parameters.specularMap&&(y.tSpecular.value=B.textures[v.parameters.specularMap],y.enableSpecular.value=!0),v.parameters.displacementMap&&(y.tDisplacement.value=B.textures[v.parameters.displacementMap],y.enableDisplacement.value=!0,y.uDisplacementBias.value= +v.parameters.displacementBias,y.uDisplacementScale.value=v.parameters.displacementScale),y.uDiffuseColor.value.setHex(s),y.uSpecularColor.value.setHex(M),y.uAmbientColor.value.setHex(q),y.uShininess.value=N,v.parameters.opacity&&(y.uOpacity.value=v.parameters.opacity),t=new THREE.ShaderMaterial({fragmentShader:K.fragmentShader,vertexShader:K.vertexShader,uniforms:y,lights:!0,fog:!0})):t=new THREE[v.type](v.parameters);t.name=X;B.materials[X]=t}for(X in C.materials)if(v=C.materials[X],v.parameters.materials){L= +[];for(s=0;sg.end&&(g.end=e);b||(b=h)}}a.firstAnimation=b}; +THREE.MorphAnimMesh.prototype.setAnimationLabel=function(a,b,c){this.geometry.animations||(this.geometry.animations={});this.geometry.animations[a]={start:b,end:c}};THREE.MorphAnimMesh.prototype.playAnimation=function(a,b){var c=this.geometry.animations[a];c?(this.setFrameRange(c.start,c.end),this.duration=1E3*((c.end-c.start)/b),this.time=0):console.warn("animation["+a+"] undefined")}; +THREE.MorphAnimMesh.prototype.updateAnimation=function(a){var b=this.duration/this.length;this.time+=this.direction*a;if(this.mirroredLoop){if(this.time>this.duration||0>this.time)this.direction*=-1,this.time>this.duration&&(this.time=this.duration,this.directionBackwards=!0),0>this.time&&(this.time=0,this.directionBackwards=!1)}else this.time%=this.duration,0>this.time&&(this.time+=this.duration);a=this.startKeyframe+THREE.Math.clamp(Math.floor(this.time/b),0,this.length-1);a!==this.currentKeyframe&& +(this.morphTargetInfluences[this.lastKeyframe]=0,this.morphTargetInfluences[this.currentKeyframe]=1,this.morphTargetInfluences[a]=0,this.lastKeyframe=this.currentKeyframe,this.currentKeyframe=a);b=this.time%b/b;this.directionBackwards&&(b=1-b);this.morphTargetInfluences[this.currentKeyframe]=b;this.morphTargetInfluences[this.lastKeyframe]=1-b}; +THREE.MorphAnimMesh.prototype.clone=function(a){void 0===a&&(a=new THREE.MorphAnimMesh(this.geometry,this.material));a.duration=this.duration;a.mirroredLoop=this.mirroredLoop;a.time=this.time;a.lastKeyframe=this.lastKeyframe;a.currentKeyframe=this.currentKeyframe;a.direction=this.direction;a.directionBackwards=this.directionBackwards;THREE.Mesh.prototype.clone.call(this,a);return a};THREE.Ribbon=function(a,b){THREE.Object3D.call(this);this.geometry=a;this.material=b};THREE.Ribbon.prototype=Object.create(THREE.Object3D.prototype);THREE.Ribbon.prototype.clone=function(a){void 0===a&&(a=new THREE.Ribbon(this.geometry,this.material));THREE.Object3D.prototype.clone.call(this,a);return a};THREE.LOD=function(){THREE.Object3D.call(this);this.objects=[]};THREE.LOD.prototype=Object.create(THREE.Object3D.prototype);THREE.LOD.prototype.addLevel=function(a,b){void 0===b&&(b=0);for(var b=Math.abs(b),c=0;c=this.objects[d].distance)this.objects[d-1].object.visible=!1,this.objects[d].object.visible=!0;else break;for(;d=g||(g*=f.intensity,c.add(Xb.multiplyScalar(g)))}else f instanceof THREE.PointLight&&(h=hb.getPositionFromMatrix(f.matrixWorld),g=b.dot(hb.subVectors(h,a).normalize()),0>=g||(g*=0==f.distance?1:1-Math.min(a.distanceTo(h)/f.distance,1),0!=g&&(g*=f.intensity,c.add(Xb.multiplyScalar(g)))))}} +function c(a,c,e,l,p,r,q,ca){H.info.render.vertices+=3;H.info.render.faces++;n(ca.opacity);m(ca.blending);ya=a.positionScreen.x;Ha=a.positionScreen.y;fa=c.positionScreen.x;da=c.positionScreen.y;T=e.positionScreen.x;$=e.positionScreen.y;d(ya,Ha,fa,da,T,$);(ca instanceof THREE.MeshLambertMaterial||ca instanceof THREE.MeshPhongMaterial)&&null===ca.map?(Qa.copy(ca.color),Xa.copy(ca.emissive),ca.vertexColors===THREE.FaceColors&&Qa.multiply(q.color),!1===ca.wireframe&&ca.shading==THREE.SmoothShading&&3== +q.vertexNormalsLength?(ra.copy(kb),ka.copy(kb),va.copy(kb),b(q.v1.positionWorld,q.vertexNormalsModel[0],ra),b(q.v2.positionWorld,q.vertexNormalsModel[1],ka),b(q.v3.positionWorld,q.vertexNormalsModel[2],va),ra.multiply(Qa).add(Xa),ka.multiply(Qa).add(Xa),va.multiply(Qa).add(Xa),Ra.addColors(ka,va).multiplyScalar(0.5),lb=j(ra,ka,va,Ra),i(ya,Ha,fa,da,T,$,0,0,1,0,0,1,lb)):(ha.copy(kb),b(q.centroidModel,q.normalModel,ha),ha.multiply(Qa).add(Xa),!0===ca.wireframe?f(ha,ca.wireframeLinewidth,ca.wireframeLinecap, +ca.wireframeLinejoin):h(ha))):ca instanceof THREE.MeshBasicMaterial||ca instanceof THREE.MeshLambertMaterial||ca instanceof THREE.MeshPhongMaterial?null!==ca.map?ca.map.mapping instanceof THREE.UVMapping&&(Ga=q.uvs[0],g(ya,Ha,fa,da,T,$,Ga[l].x,Ga[l].y,Ga[p].x,Ga[p].y,Ga[r].x,Ga[r].y,ca.map)):null!==ca.envMap?ca.envMap.mapping instanceof THREE.SphericalReflectionMapping&&(hb.copy(q.vertexNormalsModelView[l]),Ca=0.5*hb.x+0.5,xb=0.5*hb.y+0.5,hb.copy(q.vertexNormalsModelView[p]),Ib=0.5*hb.x+0.5,k=0.5* +hb.y+0.5,hb.copy(q.vertexNormalsModelView[r]),Rb=0.5*hb.x+0.5,Jb=0.5*hb.y+0.5,g(ya,Ha,fa,da,T,$,Ca,xb,Ib,k,Rb,Jb,ca.envMap)):(ha.copy(ca.color),ca.vertexColors===THREE.FaceColors&&ha.multiply(q.color),!0===ca.wireframe?f(ha,ca.wireframeLinewidth,ca.wireframeLinecap,ca.wireframeLinejoin):h(ha)):ca instanceof THREE.MeshDepthMaterial?(Sa=D.near,wb=D.far,ra.r=ra.g=ra.b=1-z(a.positionScreen.z*a.positionScreen.w,Sa,wb),ka.r=ka.g=ka.b=1-z(c.positionScreen.z*c.positionScreen.w,Sa,wb),va.r=va.g=va.b=1-z(e.positionScreen.z* +e.positionScreen.w,Sa,wb),Ra.addColors(ka,va).multiplyScalar(0.5),lb=j(ra,ka,va,Ra),i(ya,Ha,fa,da,T,$,0,0,1,0,0,1,lb)):ca instanceof THREE.MeshNormalMaterial&&(ca.shading==THREE.FlatShading?(a=q.normalModelView,ha.setRGB(a.x,a.y,a.z).multiplyScalar(0.5).addScalar(0.5),!0===ca.wireframe?f(ha,ca.wireframeLinewidth,ca.wireframeLinecap,ca.wireframeLinejoin):h(ha)):ca.shading==THREE.SmoothShading&&(a=q.vertexNormalsModelView[l],ra.setRGB(a.x,a.y,a.z).multiplyScalar(0.5).addScalar(0.5),a=q.vertexNormalsModelView[p], +ka.setRGB(a.x,a.y,a.z).multiplyScalar(0.5).addScalar(0.5),a=q.vertexNormalsModelView[r],va.setRGB(a.x,a.y,a.z).multiplyScalar(0.5).addScalar(0.5),Ra.addColors(ka,va).multiplyScalar(0.5),lb=j(ra,ka,va,Ra),i(ya,Ha,fa,da,T,$,0,0,1,0,0,1,lb)))}function d(a,b,c,d,e,f){y.beginPath();y.moveTo(a,b);y.lineTo(c,d);y.lineTo(e,f);y.closePath()}function e(a,b,c,d,e,f,h,g){y.beginPath();y.moveTo(a,b);y.lineTo(c,d);y.lineTo(e,f);y.lineTo(h,g);y.closePath()}function f(a,b,c,d){p(b);t(c);r(d);q(a.getStyle());y.stroke(); +sa.expandByScalar(2*b)}function h(a){s(a.getStyle());y.fill()}function g(a,b,c,d,e,f,g,k,i,j,n,l,m){if(!(m instanceof THREE.DataTexture||void 0===m.image||0==m.image.width)){if(!0===m.needsUpdate){var p=m.wrapS==THREE.RepeatWrapping,q=m.wrapT==THREE.RepeatWrapping;Kb[m.id]=y.createPattern(m.image,!0===p&&!0===q?"repeat":!0===p&&!1===q?"repeat-x":!1===p&&!0===q?"repeat-y":"no-repeat");m.needsUpdate=!1}void 0===Kb[m.id]?s("rgba(0,0,0,1)"):s(Kb[m.id]);var p=m.offset.x/m.repeat.x,q=m.offset.y/m.repeat.y, +r=m.image.width*m.repeat.x,t=m.image.height*m.repeat.y,g=(g+p)*r,k=(1-k+q)*t,c=c-a,d=d-b,e=e-a,f=f-b,i=(i+p)*r-g,j=(1-j+q)*t-k,n=(n+p)*r-g,l=(1-l+q)*t-k,p=i*l-n*j;0===p?(void 0===zb[m.id]&&(b=document.createElement("canvas"),b.width=m.image.width,b.height=m.image.height,b=b.getContext("2d"),b.drawImage(m.image,0,0),zb[m.id]=b.getImageData(0,0,m.image.width,m.image.height).data),b=zb[m.id],g=4*(Math.floor(g)+Math.floor(k)*m.image.width),ha.setRGB(b[g]/255,b[g+1]/255,b[g+2]/255),h(ha)):(p=1/p,m=(l* +c-j*e)*p,j=(l*d-j*f)*p,c=(i*e-n*c)*p,d=(i*f-n*d)*p,a=a-m*g-c*k,g=b-j*g-d*k,y.save(),y.transform(m,j,c,d,a,g),y.fill(),y.restore())}}function i(a,b,c,d,e,f,h,g,k,i,j,n,m){var l,p;l=m.width-1;p=m.height-1;h*=l;g*=p;c-=a;d-=b;e-=a;f-=b;k=k*l-h;i=i*p-g;j=j*l-h;n=n*p-g;p=1/(k*n-j*i);l=(n*c-i*e)*p;i=(n*d-i*f)*p;c=(k*e-j*c)*p;d=(k*f-j*d)*p;a=a-l*h-c*g;b=b-i*h-d*g;y.save();y.transform(l,i,c,d,a,b);y.clip();y.drawImage(m,0,0);y.restore()}function j(a,b,c,d){Ya[0]=255*a.r|0;Ya[1]=255*a.g|0;Ya[2]=255*a.b|0; +Ya[4]=255*b.r|0;Ya[5]=255*b.g|0;Ya[6]=255*b.b|0;Ya[8]=255*c.r|0;Ya[9]=255*c.g|0;Ya[10]=255*c.b|0;Ya[12]=255*d.r|0;Ya[13]=255*d.g|0;Ya[14]=255*d.b|0;Ab.putImageData(Sb,0,0);Fb.drawImage(Lb,0,0);return Tb}function l(a,b,c){var d=b.x-a.x,e=b.y-a.y,f=d*d+e*e;0!==f&&(c/=Math.sqrt(f),d*=c,e*=c,b.x+=d,b.y+=e,a.x-=d,a.y-=e)}function n(a){X!==a&&(X=y.globalAlpha=a)}function m(a){L!==a&&(a===THREE.NormalBlending?y.globalCompositeOperation="source-over":a===THREE.AdditiveBlending?y.globalCompositeOperation= +"lighter":a===THREE.SubtractiveBlending&&(y.globalCompositeOperation="darker"),L=a)}function p(a){Va!==a&&(Va=y.lineWidth=a)}function t(a){O!==a&&(O=y.lineCap=a)}function r(a){qa!==a&&(qa=y.lineJoin=a)}function q(a){oa!==a&&(oa=y.strokeStyle=a)}function s(a){Pa!==a&&(Pa=y.fillStyle=a)}function w(a,b){if(Fa!==a||wa!==b)y.setLineDash([a,b]),Fa=a,wa=b}console.log("THREE.CanvasRenderer",THREE.REVISION);var z=THREE.Math.smoothstep,a=a||{},H=this,G,J,I,A=new THREE.Projector,B=void 0!==a.canvas?a.canvas: +document.createElement("canvas"),F,C,K,N,y=B.getContext("2d"),M=new THREE.Color(0),v=0,X=1,L=0,oa=null,Pa=null,Va=null,O=null,qa=null,Fa=null,wa=0,D,U,ea,pa,Ua,ob=new THREE.RenderableVertex,tb=new THREE.RenderableVertex,ya,Ha,fa,da,T,$,la,Y,ma,xa,bb,ia,ha=new THREE.Color,ra=new THREE.Color,ka=new THREE.Color,va=new THREE.Color,Ra=new THREE.Color,Qa=new THREE.Color,Xa=new THREE.Color,Xb=new THREE.Color,Kb={},zb={},Sa,wb,lb,Ga,Ca,xb,Ib,k,Rb,Jb,Ka=new THREE.Box2,na=new THREE.Box2,sa=new THREE.Box2,kb= +new THREE.Color,Gb=new THREE.Color,Ub=new THREE.Color,hb=new THREE.Vector3,Lb,Ab,Sb,Ya,Tb,Fb,Hb=16;Lb=document.createElement("canvas");Lb.width=Lb.height=2;Ab=Lb.getContext("2d");Ab.fillStyle="rgba(0,0,0,1)";Ab.fillRect(0,0,2,2);Sb=Ab.getImageData(0,0,2,2);Ya=Sb.data;Tb=document.createElement("canvas");Tb.width=Tb.height=Hb;Fb=Tb.getContext("2d");Fb.translate(-Hb/2,-Hb/2);Fb.scale(Hb,Hb);Hb--;void 0===y.setLineDash&&(y.setLineDash=void 0!==y.mozDash?function(a){y.mozDash=null!==a[0]?a:null}:function(){}); +this.domElement=B;this.devicePixelRatio=void 0!==a.devicePixelRatio?a.devicePixelRatio:void 0!==window.devicePixelRatio?window.devicePixelRatio:1;this.sortElements=this.sortObjects=this.autoClear=!0;this.info={render:{vertices:0,faces:0}};this.supportsVertexTextures=function(){};this.setFaceCulling=function(){};this.setSize=function(a,b,c){F=a*this.devicePixelRatio;C=b*this.devicePixelRatio;K=Math.floor(F/2);N=Math.floor(C/2);B.width=F;B.height=C;1!==this.devicePixelRatio&&!1!==c&&(B.style.width= +a+"px",B.style.height=b+"px");Ka.set(new THREE.Vector2(-K,-N),new THREE.Vector2(K,N));na.set(new THREE.Vector2(-K,-N),new THREE.Vector2(K,N));X=1;L=0;qa=O=Va=Pa=oa=null};this.setClearColor=function(a,b){M.set(a);v=void 0!==b?b:1;na.set(new THREE.Vector2(-K,-N),new THREE.Vector2(K,N))};this.setClearColorHex=function(a,b){console.warn("DEPRECATED: .setClearColorHex() is being removed. Use .setClearColor() instead.");this.setClearColor(a,b)};this.getMaxAnisotropy=function(){return 0};this.clear=function(){y.setTransform(1, +0,0,-1,K,N);!1===na.empty()&&(na.intersect(Ka),na.expandByScalar(2),1>v&&y.clearRect(na.min.x|0,na.min.y|0,na.max.x-na.min.x|0,na.max.y-na.min.y|0),0>1,Kc=Yb.height>>1,ub=F.scale.x*K,yb=F.scale.y*N,ca=ub*Jc,mb=yb*Kc,sa.min.set(C.x-ca,C.y-mb),sa.max.set(C.x+ca,C.y+mb),!1===Ka.isIntersectionBox(sa)?sa.makeEmpty():(y.save(),y.translate(C.x,C.y),y.rotate(-F.rotation),y.scale(ub,-yb),y.translate(-Jc,-Kc),y.drawImage(Yb,0,0),y.restore())):v instanceof THREE.ParticleCanvasMaterial&&(ca=F.scale.x*K,mb=F.scale.y*N,sa.min.set(C.x-ca,C.y-mb),sa.max.set(C.x+ca,C.y+mb),!1===Ka.isIntersectionBox(sa)? +sa.makeEmpty():(q(v.color.getStyle()),s(v.color.getStyle()),y.save(),y.translate(C.x,C.y),y.rotate(-F.rotation),y.scale(ca,mb),v.program(y),y.restore()))}else if(F instanceof THREE.RenderableLine){if(U=F.v1,ea=F.v2,U.positionScreen.x*=K,U.positionScreen.y*=N,ea.positionScreen.x*=K,ea.positionScreen.y*=N,sa.setFromPoints([U.positionScreen,ea.positionScreen]),!0===Ka.isIntersectionBox(sa))if(C=U,ca=ea,n(v.opacity),m(v.blending),y.beginPath(),y.moveTo(C.positionScreen.x,C.positionScreen.y),y.lineTo(ca.positionScreen.x, +ca.positionScreen.y),v instanceof THREE.LineBasicMaterial){p(v.linewidth);t(v.linecap);r(v.linejoin);if(v.vertexColors!==THREE.VertexColors)q(v.color.getStyle());else if(mb=F.vertexColors[0].getStyle(),F=F.vertexColors[1].getStyle(),mb===F)q(mb);else{try{var uc=y.createLinearGradient(C.positionScreen.x,C.positionScreen.y,ca.positionScreen.x,ca.positionScreen.y);uc.addColorStop(0,mb);uc.addColorStop(1,F)}catch(ed){uc=mb}q(uc)}y.stroke();sa.expandByScalar(2*v.linewidth)}else v instanceof THREE.LineDashedMaterial&& +(p(v.linewidth),t(v.linecap),r(v.linejoin),q(v.color.getStyle()),w(v.dashSize,v.gapSize),y.stroke(),sa.expandByScalar(2*v.linewidth),w(null,null))}else if(F instanceof THREE.RenderableFace3){U=F.v1;ea=F.v2;pa=F.v3;if(-1>U.positionScreen.z||1ea.positionScreen.z||1pa.positionScreen.z||1U.positionScreen.z||1ea.positionScreen.z||1pa.positionScreen.z|| +1Ua.positionScreen.z||1 0\nuniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_HEMI_LIGHTS > 0\nuniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];\nuniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];\nuniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\nuniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n#endif\n#if MAX_SPOT_LIGHTS > 0\nuniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\nuniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\nuniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\nuniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\n#endif\n#ifdef WRAP_AROUND\nuniform vec3 wrapRGB;\n#endif", +lights_lambert_vertex:"vLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\nvLightBack = vec3( 0.0 );\n#endif\ntransformedNormal = normalize( transformedNormal );\n#if MAX_DIR_LIGHTS > 0\nfor( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {\nvec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\nvec3 dirVector = normalize( lDirection.xyz );\nfloat dotProduct = dot( transformedNormal, dirVector );\nvec3 directionalLightWeighting = vec3( max( dotProduct, 0.0 ) );\n#ifdef DOUBLE_SIDED\nvec3 directionalLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n#ifdef WRAP_AROUND\nvec3 directionalLightWeightingHalfBack = vec3( max( -0.5 * dotProduct + 0.5, 0.0 ) );\n#endif\n#endif\n#ifdef WRAP_AROUND\nvec3 directionalLightWeightingHalf = vec3( max( 0.5 * dotProduct + 0.5, 0.0 ) );\ndirectionalLightWeighting = mix( directionalLightWeighting, directionalLightWeightingHalf, wrapRGB );\n#ifdef DOUBLE_SIDED\ndirectionalLightWeightingBack = mix( directionalLightWeightingBack, directionalLightWeightingHalfBack, wrapRGB );\n#endif\n#endif\nvLightFront += directionalLightColor[ i ] * directionalLightWeighting;\n#ifdef DOUBLE_SIDED\nvLightBack += directionalLightColor[ i ] * directionalLightWeightingBack;\n#endif\n}\n#endif\n#if MAX_POINT_LIGHTS > 0\nfor( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\nvec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\nvec3 lVector = lPosition.xyz - mvPosition.xyz;\nfloat lDistance = 1.0;\nif ( pointLightDistance[ i ] > 0.0 )\nlDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\nlVector = normalize( lVector );\nfloat dotProduct = dot( transformedNormal, lVector );\nvec3 pointLightWeighting = vec3( max( dotProduct, 0.0 ) );\n#ifdef DOUBLE_SIDED\nvec3 pointLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n#ifdef WRAP_AROUND\nvec3 pointLightWeightingHalfBack = vec3( max( -0.5 * dotProduct + 0.5, 0.0 ) );\n#endif\n#endif\n#ifdef WRAP_AROUND\nvec3 pointLightWeightingHalf = vec3( max( 0.5 * dotProduct + 0.5, 0.0 ) );\npointLightWeighting = mix( pointLightWeighting, pointLightWeightingHalf, wrapRGB );\n#ifdef DOUBLE_SIDED\npointLightWeightingBack = mix( pointLightWeightingBack, pointLightWeightingHalfBack, wrapRGB );\n#endif\n#endif\nvLightFront += pointLightColor[ i ] * pointLightWeighting * lDistance;\n#ifdef DOUBLE_SIDED\nvLightBack += pointLightColor[ i ] * pointLightWeightingBack * lDistance;\n#endif\n}\n#endif\n#if MAX_SPOT_LIGHTS > 0\nfor( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\nvec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\nvec3 lVector = lPosition.xyz - mvPosition.xyz;\nfloat spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - worldPosition.xyz ) );\nif ( spotEffect > spotLightAngleCos[ i ] ) {\nspotEffect = max( pow( spotEffect, spotLightExponent[ i ] ), 0.0 );\nfloat lDistance = 1.0;\nif ( spotLightDistance[ i ] > 0.0 )\nlDistance = 1.0 - min( ( length( lVector ) / spotLightDistance[ i ] ), 1.0 );\nlVector = normalize( lVector );\nfloat dotProduct = dot( transformedNormal, lVector );\nvec3 spotLightWeighting = vec3( max( dotProduct, 0.0 ) );\n#ifdef DOUBLE_SIDED\nvec3 spotLightWeightingBack = vec3( max( -dotProduct, 0.0 ) );\n#ifdef WRAP_AROUND\nvec3 spotLightWeightingHalfBack = vec3( max( -0.5 * dotProduct + 0.5, 0.0 ) );\n#endif\n#endif\n#ifdef WRAP_AROUND\nvec3 spotLightWeightingHalf = vec3( max( 0.5 * dotProduct + 0.5, 0.0 ) );\nspotLightWeighting = mix( spotLightWeighting, spotLightWeightingHalf, wrapRGB );\n#ifdef DOUBLE_SIDED\nspotLightWeightingBack = mix( spotLightWeightingBack, spotLightWeightingHalfBack, wrapRGB );\n#endif\n#endif\nvLightFront += spotLightColor[ i ] * spotLightWeighting * lDistance * spotEffect;\n#ifdef DOUBLE_SIDED\nvLightBack += spotLightColor[ i ] * spotLightWeightingBack * lDistance * spotEffect;\n#endif\n}\n}\n#endif\n#if MAX_HEMI_LIGHTS > 0\nfor( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {\nvec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );\nvec3 lVector = normalize( lDirection.xyz );\nfloat dotProduct = dot( transformedNormal, lVector );\nfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\nfloat hemiDiffuseWeightBack = -0.5 * dotProduct + 0.5;\nvLightFront += mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeight );\n#ifdef DOUBLE_SIDED\nvLightBack += mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeightBack );\n#endif\n}\n#endif\nvLightFront = vLightFront * diffuse + ambient * ambientLightColor + emissive;\n#ifdef DOUBLE_SIDED\nvLightBack = vLightBack * diffuse + ambient * ambientLightColor + emissive;\n#endif", +lights_phong_pars_vertex:"#ifndef PHONG_PER_PIXEL\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\nuniform float pointLightDistance[ MAX_POINT_LIGHTS ];\nvarying vec4 vPointLight[ MAX_POINT_LIGHTS ];\n#endif\n#if MAX_SPOT_LIGHTS > 0\nuniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\nuniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\nvarying vec4 vSpotLight[ MAX_SPOT_LIGHTS ];\n#endif\n#endif\n#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP )\nvarying vec3 vWorldPosition;\n#endif", +lights_phong_vertex:"#ifndef PHONG_PER_PIXEL\n#if MAX_POINT_LIGHTS > 0\nfor( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\nvec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\nvec3 lVector = lPosition.xyz - mvPosition.xyz;\nfloat lDistance = 1.0;\nif ( pointLightDistance[ i ] > 0.0 )\nlDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\nvPointLight[ i ] = vec4( lVector, lDistance );\n}\n#endif\n#if MAX_SPOT_LIGHTS > 0\nfor( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\nvec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\nvec3 lVector = lPosition.xyz - mvPosition.xyz;\nfloat lDistance = 1.0;\nif ( spotLightDistance[ i ] > 0.0 )\nlDistance = 1.0 - min( ( length( lVector ) / spotLightDistance[ i ] ), 1.0 );\nvSpotLight[ i ] = vec4( lVector, lDistance );\n}\n#endif\n#endif\n#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP )\nvWorldPosition = worldPosition.xyz;\n#endif", +lights_phong_pars_fragment:"uniform vec3 ambientLightColor;\n#if MAX_DIR_LIGHTS > 0\nuniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_HEMI_LIGHTS > 0\nuniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];\nuniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];\nuniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\n#ifdef PHONG_PER_PIXEL\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\nuniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n#else\nvarying vec4 vPointLight[ MAX_POINT_LIGHTS ];\n#endif\n#endif\n#if MAX_SPOT_LIGHTS > 0\nuniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\nuniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\nuniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\n#ifdef PHONG_PER_PIXEL\nuniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\n#else\nvarying vec4 vSpotLight[ MAX_SPOT_LIGHTS ];\n#endif\n#endif\n#if MAX_SPOT_LIGHTS > 0 || defined( USE_BUMPMAP )\nvarying vec3 vWorldPosition;\n#endif\n#ifdef WRAP_AROUND\nuniform vec3 wrapRGB;\n#endif\nvarying vec3 vViewPosition;\nvarying vec3 vNormal;", +lights_phong_fragment:"vec3 normal = normalize( vNormal );\nvec3 viewPosition = normalize( vViewPosition );\n#ifdef DOUBLE_SIDED\nnormal = normal * ( -1.0 + 2.0 * float( gl_FrontFacing ) );\n#endif\n#ifdef USE_NORMALMAP\nnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\nnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n#if MAX_POINT_LIGHTS > 0\nvec3 pointDiffuse = vec3( 0.0 );\nvec3 pointSpecular = vec3( 0.0 );\nfor ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\n#ifdef PHONG_PER_PIXEL\nvec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\nvec3 lVector = lPosition.xyz + vViewPosition.xyz;\nfloat lDistance = 1.0;\nif ( pointLightDistance[ i ] > 0.0 )\nlDistance = 1.0 - min( ( length( lVector ) / pointLightDistance[ i ] ), 1.0 );\nlVector = normalize( lVector );\n#else\nvec3 lVector = normalize( vPointLight[ i ].xyz );\nfloat lDistance = vPointLight[ i ].w;\n#endif\nfloat dotProduct = dot( normal, lVector );\n#ifdef WRAP_AROUND\nfloat pointDiffuseWeightFull = max( dotProduct, 0.0 );\nfloat pointDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\nvec3 pointDiffuseWeight = mix( vec3 ( pointDiffuseWeightFull ), vec3( pointDiffuseWeightHalf ), wrapRGB );\n#else\nfloat pointDiffuseWeight = max( dotProduct, 0.0 );\n#endif\npointDiffuse += diffuse * pointLightColor[ i ] * pointDiffuseWeight * lDistance;\nvec3 pointHalfVector = normalize( lVector + viewPosition );\nfloat pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );\nfloat pointSpecularWeight = specularStrength * max( pow( pointDotNormalHalf, shininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat specularNormalization = ( shininess + 2.0001 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( 1.0 - dot( lVector, pointHalfVector ), 5.0 );\npointSpecular += schlick * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * lDistance * specularNormalization;\n#else\npointSpecular += specular * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * lDistance;\n#endif\n}\n#endif\n#if MAX_SPOT_LIGHTS > 0\nvec3 spotDiffuse = vec3( 0.0 );\nvec3 spotSpecular = vec3( 0.0 );\nfor ( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\n#ifdef PHONG_PER_PIXEL\nvec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\nvec3 lVector = lPosition.xyz + vViewPosition.xyz;\nfloat lDistance = 1.0;\nif ( spotLightDistance[ i ] > 0.0 )\nlDistance = 1.0 - min( ( length( lVector ) / spotLightDistance[ i ] ), 1.0 );\nlVector = normalize( lVector );\n#else\nvec3 lVector = normalize( vSpotLight[ i ].xyz );\nfloat lDistance = vSpotLight[ i ].w;\n#endif\nfloat spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - vWorldPosition ) );\nif ( spotEffect > spotLightAngleCos[ i ] ) {\nspotEffect = max( pow( spotEffect, spotLightExponent[ i ] ), 0.0 );\nfloat dotProduct = dot( normal, lVector );\n#ifdef WRAP_AROUND\nfloat spotDiffuseWeightFull = max( dotProduct, 0.0 );\nfloat spotDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\nvec3 spotDiffuseWeight = mix( vec3 ( spotDiffuseWeightFull ), vec3( spotDiffuseWeightHalf ), wrapRGB );\n#else\nfloat spotDiffuseWeight = max( dotProduct, 0.0 );\n#endif\nspotDiffuse += diffuse * spotLightColor[ i ] * spotDiffuseWeight * lDistance * spotEffect;\nvec3 spotHalfVector = normalize( lVector + viewPosition );\nfloat spotDotNormalHalf = max( dot( normal, spotHalfVector ), 0.0 );\nfloat spotSpecularWeight = specularStrength * max( pow( spotDotNormalHalf, shininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat specularNormalization = ( shininess + 2.0001 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( 1.0 - dot( lVector, spotHalfVector ), 5.0 );\nspotSpecular += schlick * spotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * lDistance * specularNormalization * spotEffect;\n#else\nspotSpecular += specular * spotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * lDistance * spotEffect;\n#endif\n}\n}\n#endif\n#if MAX_DIR_LIGHTS > 0\nvec3 dirDiffuse = vec3( 0.0 );\nvec3 dirSpecular = vec3( 0.0 );\nfor( int i = 0; i < MAX_DIR_LIGHTS; i ++ ) {\nvec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\nvec3 dirVector = normalize( lDirection.xyz );\nfloat dotProduct = dot( normal, dirVector );\n#ifdef WRAP_AROUND\nfloat dirDiffuseWeightFull = max( dotProduct, 0.0 );\nfloat dirDiffuseWeightHalf = max( 0.5 * dotProduct + 0.5, 0.0 );\nvec3 dirDiffuseWeight = mix( vec3( dirDiffuseWeightFull ), vec3( dirDiffuseWeightHalf ), wrapRGB );\n#else\nfloat dirDiffuseWeight = max( dotProduct, 0.0 );\n#endif\ndirDiffuse += diffuse * directionalLightColor[ i ] * dirDiffuseWeight;\nvec3 dirHalfVector = normalize( dirVector + viewPosition );\nfloat dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );\nfloat dirSpecularWeight = specularStrength * max( pow( dirDotNormalHalf, shininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat specularNormalization = ( shininess + 2.0001 ) / 8.0;\nvec3 schlick = specular + vec3( 1.0 - specular ) * pow( 1.0 - dot( dirVector, dirHalfVector ), 5.0 );\ndirSpecular += schlick * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight * specularNormalization;\n#else\ndirSpecular += specular * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight;\n#endif\n}\n#endif\n#if MAX_HEMI_LIGHTS > 0\nvec3 hemiDiffuse = vec3( 0.0 );\nvec3 hemiSpecular = vec3( 0.0 );\nfor( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {\nvec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );\nvec3 lVector = normalize( lDirection.xyz );\nfloat dotProduct = dot( normal, lVector );\nfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\nvec3 hemiColor = mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeight );\nhemiDiffuse += diffuse * hemiColor;\nvec3 hemiHalfVectorSky = normalize( lVector + viewPosition );\nfloat hemiDotNormalHalfSky = 0.5 * dot( normal, hemiHalfVectorSky ) + 0.5;\nfloat hemiSpecularWeightSky = specularStrength * max( pow( hemiDotNormalHalfSky, shininess ), 0.0 );\nvec3 lVectorGround = -lVector;\nvec3 hemiHalfVectorGround = normalize( lVectorGround + viewPosition );\nfloat hemiDotNormalHalfGround = 0.5 * dot( normal, hemiHalfVectorGround ) + 0.5;\nfloat hemiSpecularWeightGround = specularStrength * max( pow( hemiDotNormalHalfGround, shininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat dotProductGround = dot( normal, lVectorGround );\nfloat specularNormalization = ( shininess + 2.0001 ) / 8.0;\nvec3 schlickSky = specular + vec3( 1.0 - specular ) * pow( 1.0 - dot( lVector, hemiHalfVectorSky ), 5.0 );\nvec3 schlickGround = specular + vec3( 1.0 - specular ) * pow( 1.0 - dot( lVectorGround, hemiHalfVectorGround ), 5.0 );\nhemiSpecular += hemiColor * specularNormalization * ( schlickSky * hemiSpecularWeightSky * max( dotProduct, 0.0 ) + schlickGround * hemiSpecularWeightGround * max( dotProductGround, 0.0 ) );\n#else\nhemiSpecular += specular * hemiColor * ( hemiSpecularWeightSky + hemiSpecularWeightGround ) * hemiDiffuseWeight;\n#endif\n}\n#endif\nvec3 totalDiffuse = vec3( 0.0 );\nvec3 totalSpecular = vec3( 0.0 );\n#if MAX_DIR_LIGHTS > 0\ntotalDiffuse += dirDiffuse;\ntotalSpecular += dirSpecular;\n#endif\n#if MAX_HEMI_LIGHTS > 0\ntotalDiffuse += hemiDiffuse;\ntotalSpecular += hemiSpecular;\n#endif\n#if MAX_POINT_LIGHTS > 0\ntotalDiffuse += pointDiffuse;\ntotalSpecular += pointSpecular;\n#endif\n#if MAX_SPOT_LIGHTS > 0\ntotalDiffuse += spotDiffuse;\ntotalSpecular += spotSpecular;\n#endif\n#ifdef METAL\ngl_FragColor.xyz = gl_FragColor.xyz * ( emissive + totalDiffuse + ambientLightColor * ambient + totalSpecular );\n#else\ngl_FragColor.xyz = gl_FragColor.xyz * ( emissive + totalDiffuse + ambientLightColor * ambient ) + totalSpecular;\n#endif", +color_pars_fragment:"#ifdef USE_COLOR\nvarying vec3 vColor;\n#endif",color_fragment:"#ifdef USE_COLOR\ngl_FragColor = gl_FragColor * vec4( vColor, opacity );\n#endif",color_pars_vertex:"#ifdef USE_COLOR\nvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n#ifdef GAMMA_INPUT\nvColor = color * color;\n#else\nvColor = color;\n#endif\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n#ifdef BONE_TEXTURE\nuniform sampler2D boneTexture;\nmat4 getBoneMatrix( const in float i ) {\nfloat j = i * 4.0;\nfloat x = mod( j, N_BONE_PIXEL_X );\nfloat y = floor( j / N_BONE_PIXEL_X );\nconst float dx = 1.0 / N_BONE_PIXEL_X;\nconst float dy = 1.0 / N_BONE_PIXEL_Y;\ny = dy * ( y + 0.5 );\nvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\nvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\nvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\nvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\nmat4 bone = mat4( v1, v2, v3, v4 );\nreturn bone;\n}\n#else\nuniform mat4 boneGlobalMatrices[ MAX_BONES ];\nmat4 getBoneMatrix( const in float i ) {\nmat4 bone = boneGlobalMatrices[ int(i) ];\nreturn bone;\n}\n#endif\n#endif", +skinbase_vertex:"#ifdef USE_SKINNING\nmat4 boneMatX = getBoneMatrix( skinIndex.x );\nmat4 boneMatY = getBoneMatrix( skinIndex.y );\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n#ifdef USE_MORPHTARGETS\nvec4 skinVertex = vec4( morphed, 1.0 );\n#else\nvec4 skinVertex = vec4( position, 1.0 );\n#endif\nvec4 skinned = boneMatX * skinVertex * skinWeight.x;\nskinned \t += boneMatY * skinVertex * skinWeight.y;\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n#ifndef USE_MORPHNORMALS\nuniform float morphTargetInfluences[ 8 ];\n#else\nuniform float morphTargetInfluences[ 4 ];\n#endif\n#endif", +morphtarget_vertex:"#ifdef USE_MORPHTARGETS\nvec3 morphed = vec3( 0.0 );\nmorphed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\nmorphed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\nmorphed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\nmorphed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n#ifndef USE_MORPHNORMALS\nmorphed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\nmorphed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\nmorphed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\nmorphed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n#endif\nmorphed += position;\n#endif", +default_vertex:"vec4 mvPosition;\n#ifdef USE_SKINNING\nmvPosition = modelViewMatrix * skinned;\n#endif\n#if !defined( USE_SKINNING ) && defined( USE_MORPHTARGETS )\nmvPosition = modelViewMatrix * vec4( morphed, 1.0 );\n#endif\n#if !defined( USE_SKINNING ) && ! defined( USE_MORPHTARGETS )\nmvPosition = modelViewMatrix * vec4( position, 1.0 );\n#endif\ngl_Position = projectionMatrix * mvPosition;",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\nvec3 morphedNormal = vec3( 0.0 );\nmorphedNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\nmorphedNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\nmorphedNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\nmorphedNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\nmorphedNormal += normal;\n#endif", +skinnormal_vertex:"#ifdef USE_SKINNING\nmat4 skinMatrix = skinWeight.x * boneMatX;\nskinMatrix \t+= skinWeight.y * boneMatY;\n#ifdef USE_MORPHNORMALS\nvec4 skinnedNormal = skinMatrix * vec4( morphedNormal, 0.0 );\n#else\nvec4 skinnedNormal = skinMatrix * vec4( normal, 0.0 );\n#endif\n#endif",defaultnormal_vertex:"vec3 objectNormal;\n#ifdef USE_SKINNING\nobjectNormal = skinnedNormal.xyz;\n#endif\n#if !defined( USE_SKINNING ) && defined( USE_MORPHNORMALS )\nobjectNormal = morphedNormal;\n#endif\n#if !defined( USE_SKINNING ) && ! defined( USE_MORPHNORMALS )\nobjectNormal = normal;\n#endif\n#ifdef FLIP_SIDED\nobjectNormal = -objectNormal;\n#endif\nvec3 transformedNormal = normalMatrix * objectNormal;", +shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\nuniform sampler2D shadowMap[ MAX_SHADOWS ];\nuniform vec2 shadowMapSize[ MAX_SHADOWS ];\nuniform float shadowDarkness[ MAX_SHADOWS ];\nuniform float shadowBias[ MAX_SHADOWS ];\nvarying vec4 vShadowCoord[ MAX_SHADOWS ];\nfloat unpackDepth( const in vec4 rgba_depth ) {\nconst vec4 bit_shift = vec4( 1.0 / ( 256.0 * 256.0 * 256.0 ), 1.0 / ( 256.0 * 256.0 ), 1.0 / 256.0, 1.0 );\nfloat depth = dot( rgba_depth, bit_shift );\nreturn depth;\n}\n#endif",shadowmap_fragment:"#ifdef USE_SHADOWMAP\n#ifdef SHADOWMAP_DEBUG\nvec3 frustumColors[3];\nfrustumColors[0] = vec3( 1.0, 0.5, 0.0 );\nfrustumColors[1] = vec3( 0.0, 1.0, 0.8 );\nfrustumColors[2] = vec3( 0.0, 0.5, 1.0 );\n#endif\n#ifdef SHADOWMAP_CASCADE\nint inFrustumCount = 0;\n#endif\nfloat fDepth;\nvec3 shadowColor = vec3( 1.0 );\nfor( int i = 0; i < MAX_SHADOWS; i ++ ) {\nvec3 shadowCoord = vShadowCoord[ i ].xyz / vShadowCoord[ i ].w;\nbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\nbool inFrustum = all( inFrustumVec );\n#ifdef SHADOWMAP_CASCADE\ninFrustumCount += int( inFrustum );\nbvec3 frustumTestVec = bvec3( inFrustum, inFrustumCount == 1, shadowCoord.z <= 1.0 );\n#else\nbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n#endif\nbool frustumTest = all( frustumTestVec );\nif ( frustumTest ) {\nshadowCoord.z += shadowBias[ i ];\n#if defined( SHADOWMAP_TYPE_PCF )\nfloat shadow = 0.0;\nconst float shadowDelta = 1.0 / 9.0;\nfloat xPixelOffset = 1.0 / shadowMapSize[ i ].x;\nfloat yPixelOffset = 1.0 / shadowMapSize[ i ].y;\nfloat dx0 = -1.25 * xPixelOffset;\nfloat dy0 = -1.25 * yPixelOffset;\nfloat dx1 = 1.25 * xPixelOffset;\nfloat dy1 = 1.25 * yPixelOffset;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy0 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy0 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy0 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, 0.0 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, 0.0 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy1 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy1 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nfDepth = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy1 ) ) );\nif ( fDepth < shadowCoord.z ) shadow += shadowDelta;\nshadowColor = shadowColor * vec3( ( 1.0 - shadowDarkness[ i ] * shadow ) );\n#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\nfloat shadow = 0.0;\nfloat xPixelOffset = 1.0 / shadowMapSize[ i ].x;\nfloat yPixelOffset = 1.0 / shadowMapSize[ i ].y;\nfloat dx0 = -1.0 * xPixelOffset;\nfloat dy0 = -1.0 * yPixelOffset;\nfloat dx1 = 1.0 * xPixelOffset;\nfloat dy1 = 1.0 * yPixelOffset;\nmat3 shadowKernel;\nmat3 depthKernel;\ndepthKernel[0][0] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy0 ) ) );\ndepthKernel[0][1] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, 0.0 ) ) );\ndepthKernel[0][2] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx0, dy1 ) ) );\ndepthKernel[1][0] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy0 ) ) );\ndepthKernel[1][1] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy ) );\ndepthKernel[1][2] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( 0.0, dy1 ) ) );\ndepthKernel[2][0] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy0 ) ) );\ndepthKernel[2][1] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, 0.0 ) ) );\ndepthKernel[2][2] = unpackDepth( texture2D( shadowMap[ i ], shadowCoord.xy + vec2( dx1, dy1 ) ) );\nvec3 shadowZ = vec3( shadowCoord.z );\nshadowKernel[0] = vec3(lessThan(depthKernel[0], shadowZ ));\nshadowKernel[0] *= vec3(0.25);\nshadowKernel[1] = vec3(lessThan(depthKernel[1], shadowZ ));\nshadowKernel[1] *= vec3(0.25);\nshadowKernel[2] = vec3(lessThan(depthKernel[2], shadowZ ));\nshadowKernel[2] *= vec3(0.25);\nvec2 fractionalCoord = 1.0 - fract( shadowCoord.xy * shadowMapSize[i].xy );\nshadowKernel[0] = mix( shadowKernel[1], shadowKernel[0], fractionalCoord.x );\nshadowKernel[1] = mix( shadowKernel[2], shadowKernel[1], fractionalCoord.x );\nvec4 shadowValues;\nshadowValues.x = mix( shadowKernel[0][1], shadowKernel[0][0], fractionalCoord.y );\nshadowValues.y = mix( shadowKernel[0][2], shadowKernel[0][1], fractionalCoord.y );\nshadowValues.z = mix( shadowKernel[1][1], shadowKernel[1][0], fractionalCoord.y );\nshadowValues.w = mix( shadowKernel[1][2], shadowKernel[1][1], fractionalCoord.y );\nshadow = dot( shadowValues, vec4( 1.0 ) );\nshadowColor = shadowColor * vec3( ( 1.0 - shadowDarkness[ i ] * shadow ) );\n#else\nvec4 rgbaDepth = texture2D( shadowMap[ i ], shadowCoord.xy );\nfloat fDepth = unpackDepth( rgbaDepth );\nif ( fDepth < shadowCoord.z )\nshadowColor = shadowColor * vec3( 1.0 - shadowDarkness[ i ] );\n#endif\n}\n#ifdef SHADOWMAP_DEBUG\n#ifdef SHADOWMAP_CASCADE\nif ( inFrustum && inFrustumCount == 1 ) gl_FragColor.xyz *= frustumColors[ i ];\n#else\nif ( inFrustum ) gl_FragColor.xyz *= frustumColors[ i ];\n#endif\n#endif\n}\n#ifdef GAMMA_OUTPUT\nshadowColor *= shadowColor;\n#endif\ngl_FragColor.xyz = gl_FragColor.xyz * shadowColor;\n#endif", +shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\nvarying vec4 vShadowCoord[ MAX_SHADOWS ];\nuniform mat4 shadowMatrix[ MAX_SHADOWS ];\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\nfor( int i = 0; i < MAX_SHADOWS; i ++ ) {\nvShadowCoord[ i ] = shadowMatrix[ i ] * worldPosition;\n}\n#endif",alphatest_fragment:"#ifdef ALPHATEST\nif ( gl_FragColor.a < ALPHATEST ) discard;\n#endif",linear_to_gamma_fragment:"#ifdef GAMMA_OUTPUT\ngl_FragColor.xyz = sqrt( gl_FragColor.xyz );\n#endif"}; +THREE.UniformsUtils={merge:function(a){var b,c,d,e={};for(b=0;b dashSize ) {\ndiscard;\n}\ngl_FragColor = vec4( diffuse, opacity );",THREE.ShaderChunk.color_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n")},depth:{uniforms:{mNear:{type:"f",value:1},mFar:{type:"f",value:2E3},opacity:{type:"f", +value:1}},vertexShader:"void main() {\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform float mNear;\nuniform float mFar;\nuniform float opacity;\nvoid main() {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat color = 1.0 - smoothstep( mNear, mFar, depth );\ngl_FragColor = vec4( vec3( color ), opacity );\n}"},normal:{uniforms:{opacity:{type:"f",value:1}},vertexShader:["varying vec3 vNormal;",THREE.ShaderChunk.morphtarget_pars_vertex,"void main() {\nvNormal = normalize( normalMatrix * normal );", +THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.default_vertex,"}"].join("\n"),fragmentShader:"uniform float opacity;\nvarying vec3 vNormal;\nvoid main() {\ngl_FragColor = vec4( 0.5 * normalize( vNormal ) + 0.5, opacity );\n}"},normalmap:{uniforms:THREE.UniformsUtils.merge([THREE.UniformsLib.fog,THREE.UniformsLib.lights,THREE.UniformsLib.shadowmap,{enableAO:{type:"i",value:0},enableDiffuse:{type:"i",value:0},enableSpecular:{type:"i",value:0},enableReflection:{type:"i",value:0},enableDisplacement:{type:"i", +value:0},tDisplacement:{type:"t",value:null},tDiffuse:{type:"t",value:null},tCube:{type:"t",value:null},tNormal:{type:"t",value:null},tSpecular:{type:"t",value:null},tAO:{type:"t",value:null},uNormalScale:{type:"v2",value:new THREE.Vector2(1,1)},uDisplacementBias:{type:"f",value:0},uDisplacementScale:{type:"f",value:1},uDiffuseColor:{type:"c",value:new THREE.Color(16777215)},uSpecularColor:{type:"c",value:new THREE.Color(1118481)},uAmbientColor:{type:"c",value:new THREE.Color(16777215)},uShininess:{type:"f", +value:30},uOpacity:{type:"f",value:1},useRefract:{type:"i",value:0},uRefractionRatio:{type:"f",value:0.98},uReflectivity:{type:"f",value:0.5},uOffset:{type:"v2",value:new THREE.Vector2(0,0)},uRepeat:{type:"v2",value:new THREE.Vector2(1,1)},wrapRGB:{type:"v3",value:new THREE.Vector3(1,1,1)}}]),fragmentShader:["uniform vec3 uAmbientColor;\nuniform vec3 uDiffuseColor;\nuniform vec3 uSpecularColor;\nuniform float uShininess;\nuniform float uOpacity;\nuniform bool enableDiffuse;\nuniform bool enableSpecular;\nuniform bool enableAO;\nuniform bool enableReflection;\nuniform sampler2D tDiffuse;\nuniform sampler2D tNormal;\nuniform sampler2D tSpecular;\nuniform sampler2D tAO;\nuniform samplerCube tCube;\nuniform vec2 uNormalScale;\nuniform bool useRefract;\nuniform float uRefractionRatio;\nuniform float uReflectivity;\nvarying vec3 vTangent;\nvarying vec3 vBinormal;\nvarying vec3 vNormal;\nvarying vec2 vUv;\nuniform vec3 ambientLightColor;\n#if MAX_DIR_LIGHTS > 0\nuniform vec3 directionalLightColor[ MAX_DIR_LIGHTS ];\nuniform vec3 directionalLightDirection[ MAX_DIR_LIGHTS ];\n#endif\n#if MAX_HEMI_LIGHTS > 0\nuniform vec3 hemisphereLightSkyColor[ MAX_HEMI_LIGHTS ];\nuniform vec3 hemisphereLightGroundColor[ MAX_HEMI_LIGHTS ];\nuniform vec3 hemisphereLightDirection[ MAX_HEMI_LIGHTS ];\n#endif\n#if MAX_POINT_LIGHTS > 0\nuniform vec3 pointLightColor[ MAX_POINT_LIGHTS ];\nuniform vec3 pointLightPosition[ MAX_POINT_LIGHTS ];\nuniform float pointLightDistance[ MAX_POINT_LIGHTS ];\n#endif\n#if MAX_SPOT_LIGHTS > 0\nuniform vec3 spotLightColor[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightPosition[ MAX_SPOT_LIGHTS ];\nuniform vec3 spotLightDirection[ MAX_SPOT_LIGHTS ];\nuniform float spotLightAngleCos[ MAX_SPOT_LIGHTS ];\nuniform float spotLightExponent[ MAX_SPOT_LIGHTS ];\nuniform float spotLightDistance[ MAX_SPOT_LIGHTS ];\n#endif\n#ifdef WRAP_AROUND\nuniform vec3 wrapRGB;\n#endif\nvarying vec3 vWorldPosition;\nvarying vec3 vViewPosition;", +THREE.ShaderChunk.shadowmap_pars_fragment,THREE.ShaderChunk.fog_pars_fragment,"void main() {\ngl_FragColor = vec4( vec3( 1.0 ), uOpacity );\nvec3 specularTex = vec3( 1.0 );\nvec3 normalTex = texture2D( tNormal, vUv ).xyz * 2.0 - 1.0;\nnormalTex.xy *= uNormalScale;\nnormalTex = normalize( normalTex );\nif( enableDiffuse ) {\n#ifdef GAMMA_INPUT\nvec4 texelColor = texture2D( tDiffuse, vUv );\ntexelColor.xyz *= texelColor.xyz;\ngl_FragColor = gl_FragColor * texelColor;\n#else\ngl_FragColor = gl_FragColor * texture2D( tDiffuse, vUv );\n#endif\n}\nif( enableAO ) {\n#ifdef GAMMA_INPUT\nvec4 aoColor = texture2D( tAO, vUv );\naoColor.xyz *= aoColor.xyz;\ngl_FragColor.xyz = gl_FragColor.xyz * aoColor.xyz;\n#else\ngl_FragColor.xyz = gl_FragColor.xyz * texture2D( tAO, vUv ).xyz;\n#endif\n}\nif( enableSpecular )\nspecularTex = texture2D( tSpecular, vUv ).xyz;\nmat3 tsb = mat3( normalize( vTangent ), normalize( vBinormal ), normalize( vNormal ) );\nvec3 finalNormal = tsb * normalTex;\n#ifdef FLIP_SIDED\nfinalNormal = -finalNormal;\n#endif\nvec3 normal = normalize( finalNormal );\nvec3 viewPosition = normalize( vViewPosition );\n#if MAX_POINT_LIGHTS > 0\nvec3 pointDiffuse = vec3( 0.0 );\nvec3 pointSpecular = vec3( 0.0 );\nfor ( int i = 0; i < MAX_POINT_LIGHTS; i ++ ) {\nvec4 lPosition = viewMatrix * vec4( pointLightPosition[ i ], 1.0 );\nvec3 pointVector = lPosition.xyz + vViewPosition.xyz;\nfloat pointDistance = 1.0;\nif ( pointLightDistance[ i ] > 0.0 )\npointDistance = 1.0 - min( ( length( pointVector ) / pointLightDistance[ i ] ), 1.0 );\npointVector = normalize( pointVector );\n#ifdef WRAP_AROUND\nfloat pointDiffuseWeightFull = max( dot( normal, pointVector ), 0.0 );\nfloat pointDiffuseWeightHalf = max( 0.5 * dot( normal, pointVector ) + 0.5, 0.0 );\nvec3 pointDiffuseWeight = mix( vec3 ( pointDiffuseWeightFull ), vec3( pointDiffuseWeightHalf ), wrapRGB );\n#else\nfloat pointDiffuseWeight = max( dot( normal, pointVector ), 0.0 );\n#endif\npointDiffuse += pointDistance * pointLightColor[ i ] * uDiffuseColor * pointDiffuseWeight;\nvec3 pointHalfVector = normalize( pointVector + viewPosition );\nfloat pointDotNormalHalf = max( dot( normal, pointHalfVector ), 0.0 );\nfloat pointSpecularWeight = specularTex.r * max( pow( pointDotNormalHalf, uShininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat specularNormalization = ( uShininess + 2.0001 ) / 8.0;\nvec3 schlick = uSpecularColor + vec3( 1.0 - uSpecularColor ) * pow( 1.0 - dot( pointVector, pointHalfVector ), 5.0 );\npointSpecular += schlick * pointLightColor[ i ] * pointSpecularWeight * pointDiffuseWeight * pointDistance * specularNormalization;\n#else\npointSpecular += pointDistance * pointLightColor[ i ] * uSpecularColor * pointSpecularWeight * pointDiffuseWeight;\n#endif\n}\n#endif\n#if MAX_SPOT_LIGHTS > 0\nvec3 spotDiffuse = vec3( 0.0 );\nvec3 spotSpecular = vec3( 0.0 );\nfor ( int i = 0; i < MAX_SPOT_LIGHTS; i ++ ) {\nvec4 lPosition = viewMatrix * vec4( spotLightPosition[ i ], 1.0 );\nvec3 spotVector = lPosition.xyz + vViewPosition.xyz;\nfloat spotDistance = 1.0;\nif ( spotLightDistance[ i ] > 0.0 )\nspotDistance = 1.0 - min( ( length( spotVector ) / spotLightDistance[ i ] ), 1.0 );\nspotVector = normalize( spotVector );\nfloat spotEffect = dot( spotLightDirection[ i ], normalize( spotLightPosition[ i ] - vWorldPosition ) );\nif ( spotEffect > spotLightAngleCos[ i ] ) {\nspotEffect = max( pow( spotEffect, spotLightExponent[ i ] ), 0.0 );\n#ifdef WRAP_AROUND\nfloat spotDiffuseWeightFull = max( dot( normal, spotVector ), 0.0 );\nfloat spotDiffuseWeightHalf = max( 0.5 * dot( normal, spotVector ) + 0.5, 0.0 );\nvec3 spotDiffuseWeight = mix( vec3 ( spotDiffuseWeightFull ), vec3( spotDiffuseWeightHalf ), wrapRGB );\n#else\nfloat spotDiffuseWeight = max( dot( normal, spotVector ), 0.0 );\n#endif\nspotDiffuse += spotDistance * spotLightColor[ i ] * uDiffuseColor * spotDiffuseWeight * spotEffect;\nvec3 spotHalfVector = normalize( spotVector + viewPosition );\nfloat spotDotNormalHalf = max( dot( normal, spotHalfVector ), 0.0 );\nfloat spotSpecularWeight = specularTex.r * max( pow( spotDotNormalHalf, uShininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat specularNormalization = ( uShininess + 2.0001 ) / 8.0;\nvec3 schlick = uSpecularColor + vec3( 1.0 - uSpecularColor ) * pow( 1.0 - dot( spotVector, spotHalfVector ), 5.0 );\nspotSpecular += schlick * spotLightColor[ i ] * spotSpecularWeight * spotDiffuseWeight * spotDistance * specularNormalization * spotEffect;\n#else\nspotSpecular += spotDistance * spotLightColor[ i ] * uSpecularColor * spotSpecularWeight * spotDiffuseWeight * spotEffect;\n#endif\n}\n}\n#endif\n#if MAX_DIR_LIGHTS > 0\nvec3 dirDiffuse = vec3( 0.0 );\nvec3 dirSpecular = vec3( 0.0 );\nfor( int i = 0; i < MAX_DIR_LIGHTS; i++ ) {\nvec4 lDirection = viewMatrix * vec4( directionalLightDirection[ i ], 0.0 );\nvec3 dirVector = normalize( lDirection.xyz );\n#ifdef WRAP_AROUND\nfloat directionalLightWeightingFull = max( dot( normal, dirVector ), 0.0 );\nfloat directionalLightWeightingHalf = max( 0.5 * dot( normal, dirVector ) + 0.5, 0.0 );\nvec3 dirDiffuseWeight = mix( vec3( directionalLightWeightingFull ), vec3( directionalLightWeightingHalf ), wrapRGB );\n#else\nfloat dirDiffuseWeight = max( dot( normal, dirVector ), 0.0 );\n#endif\ndirDiffuse += directionalLightColor[ i ] * uDiffuseColor * dirDiffuseWeight;\nvec3 dirHalfVector = normalize( dirVector + viewPosition );\nfloat dirDotNormalHalf = max( dot( normal, dirHalfVector ), 0.0 );\nfloat dirSpecularWeight = specularTex.r * max( pow( dirDotNormalHalf, uShininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat specularNormalization = ( uShininess + 2.0001 ) / 8.0;\nvec3 schlick = uSpecularColor + vec3( 1.0 - uSpecularColor ) * pow( 1.0 - dot( dirVector, dirHalfVector ), 5.0 );\ndirSpecular += schlick * directionalLightColor[ i ] * dirSpecularWeight * dirDiffuseWeight * specularNormalization;\n#else\ndirSpecular += directionalLightColor[ i ] * uSpecularColor * dirSpecularWeight * dirDiffuseWeight;\n#endif\n}\n#endif\n#if MAX_HEMI_LIGHTS > 0\nvec3 hemiDiffuse = vec3( 0.0 );\nvec3 hemiSpecular = vec3( 0.0 );\nfor( int i = 0; i < MAX_HEMI_LIGHTS; i ++ ) {\nvec4 lDirection = viewMatrix * vec4( hemisphereLightDirection[ i ], 0.0 );\nvec3 lVector = normalize( lDirection.xyz );\nfloat dotProduct = dot( normal, lVector );\nfloat hemiDiffuseWeight = 0.5 * dotProduct + 0.5;\nvec3 hemiColor = mix( hemisphereLightGroundColor[ i ], hemisphereLightSkyColor[ i ], hemiDiffuseWeight );\nhemiDiffuse += uDiffuseColor * hemiColor;\nvec3 hemiHalfVectorSky = normalize( lVector + viewPosition );\nfloat hemiDotNormalHalfSky = 0.5 * dot( normal, hemiHalfVectorSky ) + 0.5;\nfloat hemiSpecularWeightSky = specularTex.r * max( pow( hemiDotNormalHalfSky, uShininess ), 0.0 );\nvec3 lVectorGround = -lVector;\nvec3 hemiHalfVectorGround = normalize( lVectorGround + viewPosition );\nfloat hemiDotNormalHalfGround = 0.5 * dot( normal, hemiHalfVectorGround ) + 0.5;\nfloat hemiSpecularWeightGround = specularTex.r * max( pow( hemiDotNormalHalfGround, uShininess ), 0.0 );\n#ifdef PHYSICALLY_BASED_SHADING\nfloat dotProductGround = dot( normal, lVectorGround );\nfloat specularNormalization = ( uShininess + 2.0001 ) / 8.0;\nvec3 schlickSky = uSpecularColor + vec3( 1.0 - uSpecularColor ) * pow( 1.0 - dot( lVector, hemiHalfVectorSky ), 5.0 );\nvec3 schlickGround = uSpecularColor + vec3( 1.0 - uSpecularColor ) * pow( 1.0 - dot( lVectorGround, hemiHalfVectorGround ), 5.0 );\nhemiSpecular += hemiColor * specularNormalization * ( schlickSky * hemiSpecularWeightSky * max( dotProduct, 0.0 ) + schlickGround * hemiSpecularWeightGround * max( dotProductGround, 0.0 ) );\n#else\nhemiSpecular += uSpecularColor * hemiColor * ( hemiSpecularWeightSky + hemiSpecularWeightGround ) * hemiDiffuseWeight;\n#endif\n}\n#endif\nvec3 totalDiffuse = vec3( 0.0 );\nvec3 totalSpecular = vec3( 0.0 );\n#if MAX_DIR_LIGHTS > 0\ntotalDiffuse += dirDiffuse;\ntotalSpecular += dirSpecular;\n#endif\n#if MAX_HEMI_LIGHTS > 0\ntotalDiffuse += hemiDiffuse;\ntotalSpecular += hemiSpecular;\n#endif\n#if MAX_POINT_LIGHTS > 0\ntotalDiffuse += pointDiffuse;\ntotalSpecular += pointSpecular;\n#endif\n#if MAX_SPOT_LIGHTS > 0\ntotalDiffuse += spotDiffuse;\ntotalSpecular += spotSpecular;\n#endif\n#ifdef METAL\ngl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * uAmbientColor + totalSpecular );\n#else\ngl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * uAmbientColor ) + totalSpecular;\n#endif\nif ( enableReflection ) {\nvec3 vReflect;\nvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\nif ( useRefract ) {\nvReflect = refract( cameraToVertex, normal, uRefractionRatio );\n} else {\nvReflect = reflect( cameraToVertex, normal );\n}\nvec4 cubeColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );\n#ifdef GAMMA_INPUT\ncubeColor.xyz *= cubeColor.xyz;\n#endif\ngl_FragColor.xyz = mix( gl_FragColor.xyz, cubeColor.xyz, specularTex.r * uReflectivity );\n}", +THREE.ShaderChunk.shadowmap_fragment,THREE.ShaderChunk.linear_to_gamma_fragment,THREE.ShaderChunk.fog_fragment,"}"].join("\n"),vertexShader:["attribute vec4 tangent;\nuniform vec2 uOffset;\nuniform vec2 uRepeat;\nuniform bool enableDisplacement;\n#ifdef VERTEX_TEXTURES\nuniform sampler2D tDisplacement;\nuniform float uDisplacementScale;\nuniform float uDisplacementBias;\n#endif\nvarying vec3 vTangent;\nvarying vec3 vBinormal;\nvarying vec3 vNormal;\nvarying vec2 vUv;\nvarying vec3 vWorldPosition;\nvarying vec3 vViewPosition;", +THREE.ShaderChunk.skinning_pars_vertex,THREE.ShaderChunk.shadowmap_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.skinnormal_vertex,"#ifdef USE_SKINNING\nvNormal = normalize( normalMatrix * skinnedNormal.xyz );\nvec4 skinnedTangent = skinMatrix * vec4( tangent.xyz, 0.0 );\nvTangent = normalize( normalMatrix * skinnedTangent.xyz );\n#else\nvNormal = normalize( normalMatrix * normal );\nvTangent = normalize( normalMatrix * tangent.xyz );\n#endif\nvBinormal = normalize( cross( vNormal, vTangent ) * tangent.w );\nvUv = uv * uRepeat + uOffset;\nvec3 displacedPosition;\n#ifdef VERTEX_TEXTURES\nif ( enableDisplacement ) {\nvec3 dv = texture2D( tDisplacement, uv ).xyz;\nfloat df = uDisplacementScale * dv.x + uDisplacementBias;\ndisplacedPosition = position + normalize( normal ) * df;\n} else {\n#ifdef USE_SKINNING\nvec4 skinVertex = vec4( position, 1.0 );\nvec4 skinned = boneMatX * skinVertex * skinWeight.x;\nskinned \t += boneMatY * skinVertex * skinWeight.y;\ndisplacedPosition = skinned.xyz;\n#else\ndisplacedPosition = position;\n#endif\n}\n#else\n#ifdef USE_SKINNING\nvec4 skinVertex = vec4( position, 1.0 );\nvec4 skinned = boneMatX * skinVertex * skinWeight.x;\nskinned \t += boneMatY * skinVertex * skinWeight.y;\ndisplacedPosition = skinned.xyz;\n#else\ndisplacedPosition = position;\n#endif\n#endif\nvec4 mvPosition = modelViewMatrix * vec4( displacedPosition, 1.0 );\nvec4 worldPosition = modelMatrix * vec4( displacedPosition, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\nvWorldPosition = worldPosition.xyz;\nvViewPosition = -mvPosition.xyz;\n#ifdef USE_SHADOWMAP\nfor( int i = 0; i < MAX_SHADOWS; i ++ ) {\nvShadowCoord[ i ] = shadowMatrix[ i ] * worldPosition;\n}\n#endif\n}"].join("\n")}, +cube:{uniforms:{tCube:{type:"t",value:null},tFlip:{type:"f",value:-1}},vertexShader:"varying vec3 vWorldPosition;\nvoid main() {\nvec4 worldPosition = modelMatrix * vec4( position, 1.0 );\nvWorldPosition = worldPosition.xyz;\ngl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",fragmentShader:"uniform samplerCube tCube;\nuniform float tFlip;\nvarying vec3 vWorldPosition;\nvoid main() {\ngl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n}"}, +depthRGBA:{uniforms:{},vertexShader:[THREE.ShaderChunk.morphtarget_pars_vertex,THREE.ShaderChunk.skinning_pars_vertex,"void main() {",THREE.ShaderChunk.skinbase_vertex,THREE.ShaderChunk.morphtarget_vertex,THREE.ShaderChunk.skinning_vertex,THREE.ShaderChunk.default_vertex,"}"].join("\n"),fragmentShader:"vec4 pack_depth( const in float depth ) {\nconst vec4 bit_shift = vec4( 256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0 );\nconst vec4 bit_mask = vec4( 0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0 );\nvec4 res = fract( depth * bit_shift );\nres -= res.xxyz * bit_mask;\nreturn res;\n}\nvoid main() {\ngl_FragData[ 0 ] = pack_depth( gl_FragCoord.z );\n}"}};THREE.WebGLRenderer=function(a){function b(a){if(a.__webglCustomAttributesList)for(var b in a.__webglCustomAttributesList)k.deleteBuffer(a.__webglCustomAttributesList[b].buffer)}function c(a,b){var c=a.vertices.length,d=b.material;if(d.attributes){void 0===a.__webglCustomAttributesList&&(a.__webglCustomAttributesList=[]);for(var e in d.attributes){var f=d.attributes[e];if(!f.__webglInitialized||f.createUniqueBuffers){f.__webglInitialized=!0;var h=1;"v2"===f.type?h=2:"v3"===f.type?h=3:"v4"===f.type? +h=4:"c"===f.type&&(h=3);f.size=h;f.array=new Float32Array(c*h);f.buffer=k.createBuffer();f.buffer.belongsToAttribute=e;f.needsUpdate=!0}a.__webglCustomAttributesList.push(f)}}}function d(a,b){var c=b.geometry,d=a.faces3,g=a.faces4,i=3*d.length+4*g.length,j=1*d.length+2*g.length,g=3*d.length+4*g.length,d=e(b,a),n=h(d),m=f(d),l=d.vertexColors?d.vertexColors:!1;a.__vertexArray=new Float32Array(3*i);m&&(a.__normalArray=new Float32Array(3*i));c.hasTangents&&(a.__tangentArray=new Float32Array(4*i));l&& +(a.__colorArray=new Float32Array(3*i));if(n){if(0l;l++)D.autoScaleCubemaps&&!f?(m=j,s=l,t=c.image[l],z=hb,t.width<=z&&t.height<=z||(y=Math.max(t.width,t.height),w=Math.floor(t.width*z/y),z=Math.floor(t.height*z/y),y=document.createElement("canvas"),y.width=w,y.height=z,y.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,w,z),t=y),m[s]=t):j[l]=c.image[l];l=j[0];m=0===(l.width&l.width- +1)&&0===(l.height&l.height-1);s=v(c.format);t=v(c.type);N(k.TEXTURE_CUBE_MAP,c,m);for(l=0;6>l;l++)if(f){z=j[l].mipmaps;y=0;for(B=z.length;y=Gb&&console.warn("WebGLRenderer: trying to use "+ +a+" texture units while this GPU supports only "+Gb);fa+=1;return a}function I(a,b,c,d){a[b]=c.r*c.r*d;a[b+1]=c.g*c.g*d;a[b+2]=c.b*c.b*d}function A(a,b,c,d){a[b]=c.r*d;a[b+1]=c.g*d;a[b+2]=c.b*d}function B(a){a!==ka&&(k.lineWidth(a),ka=a)}function F(a,b,c){ia!==a&&(a?k.enable(k.POLYGON_OFFSET_FILL):k.disable(k.POLYGON_OFFSET_FILL),ia=a);if(a&&(ha!==b||ra!==c))k.polygonOffset(b,c),ha=b,ra=c}function C(a){for(var a=a.split("\n"),b=0,c=a.length;bb;b++)k.deleteFramebuffer(a.__webglFramebuffer[b]),k.deleteRenderbuffer(a.__webglRenderbuffer[b]);else k.deleteFramebuffer(a.__webglFramebuffer),k.deleteRenderbuffer(a.__webglRenderbuffer);D.info.memory.textures--},sc=function(a){a=a.target;a.removeEventListener("dispose",sc);tc(a)},tc=function(a){var b=a.program;if(void 0!==b){a.program=void 0; +var c,d,e=!1,a=0;for(c=U.length;ad.numSupportedMorphTargets?(j.sort(l),j.length=d.numSupportedMorphTargets):j.length>d.numSupportedMorphNormals?j.sort(l):0===j.length&&j.push([0,0]);for(n=0;nza;za++)Fa=O[za],Sa[ib]=Fa.x,Sa[ib+1]=Fa.y,Sa[ib+2]=Fa.z,ib+=3;else for(za=0;3>za;za++)Sa[ib]=ea.x,Sa[ib+1]=ea.y,Sa[ib+2]=ea.z,ib+=3;E=0;for(D=ua.length;Eza;za++)Fa=O[za],Sa[ib]=Fa.x,Sa[ib+1]=Fa.y,Sa[ib+2]=Fa.z,ib+=3;else for(za=0;4>za;za++)Sa[ib]=ea.x,Sa[ib+1]=ea.y,Sa[ib+2]=ea.z,ib+=3;k.bindBuffer(k.ARRAY_BUFFER,A.__webglNormalBuffer);k.bufferData(k.ARRAY_BUFFER, +Sa,G)}if(Hb&&Jb&&U){E=0;for(D=ta.length;Eza;za++)Pa=fa[za],hb[Xa]=Pa.x,hb[Xa+1]=Pa.y,Xa+=2;E=0;for(D=ua.length;Eza;za++)Pa=fa[za],hb[Xa]=Pa.x,hb[Xa+1]=Pa.y,Xa+=2;0za;za++)Ra=$[za],kb[Ya]=Ra.x,kb[Ya+1]=Ra.y,Ya+=2;E=0;for(D=ua.length;E< +D;E++)if(N=ua[E],$=Kb[N],void 0!==$)for(za=0;4>za;za++)Ra=$[za],kb[Ya]=Ra.x,kb[Ya+1]=Ra.y,Ya+=2;0f;f++){a.__webglFramebuffer[f]=k.createFramebuffer();a.__webglRenderbuffer[f]=k.createRenderbuffer();k.texImage2D(k.TEXTURE_CUBE_MAP_POSITIVE_X+f,0,d,a.width,a.height,0,d,e,null);var h=a,g=k.TEXTURE_CUBE_MAP_POSITIVE_X+f;k.bindFramebuffer(k.FRAMEBUFFER, +a.__webglFramebuffer[f]);k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,g,h.__webglTexture,0);y(a.__webglRenderbuffer[f],a)}c&&k.generateMipmap(k.TEXTURE_CUBE_MAP)}else a.__webglFramebuffer=k.createFramebuffer(),a.__webglRenderbuffer=a.shareDepthFrom?a.shareDepthFrom.__webglRenderbuffer:k.createRenderbuffer(),k.bindTexture(k.TEXTURE_2D,a.__webglTexture),N(k.TEXTURE_2D,a,c),k.texImage2D(k.TEXTURE_2D,0,d,a.width,a.height,0,d,e,null),d=k.TEXTURE_2D,k.bindFramebuffer(k.FRAMEBUFFER,a.__webglFramebuffer), +k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,d,a.__webglTexture,0),a.shareDepthFrom?a.depthBuffer&&!a.stencilBuffer?k.framebufferRenderbuffer(k.FRAMEBUFFER,k.DEPTH_ATTACHMENT,k.RENDERBUFFER,a.__webglRenderbuffer):a.depthBuffer&&a.stencilBuffer&&k.framebufferRenderbuffer(k.FRAMEBUFFER,k.DEPTH_STENCIL_ATTACHMENT,k.RENDERBUFFER,a.__webglRenderbuffer):y(a.__webglRenderbuffer,a),c&&k.generateMipmap(k.TEXTURE_2D);b?k.bindTexture(k.TEXTURE_CUBE_MAP,null):k.bindTexture(k.TEXTURE_2D,null);k.bindRenderbuffer(k.RENDERBUFFER, +null);k.bindFramebuffer(k.FRAMEBUFFER,null)}a?(b=b?a.__webglFramebuffer[a.activeCubeFace]:a.__webglFramebuffer,c=a.width,a=a.height,e=d=0):(b=null,c=Qa,a=Xa,d=va,e=Ra);b!==Ua&&(k.bindFramebuffer(k.FRAMEBUFFER,b),k.viewport(d,e,c,a),Ua=b);Xb=c;Kb=a};this.shadowMapPlugin=new THREE.ShadowMapPlugin;this.addPrePlugin(this.shadowMapPlugin);this.addPostPlugin(new THREE.SpritePlugin);this.addPostPlugin(new THREE.LensFlarePlugin)};THREE.WebGLRenderTarget=function(a,b,c){this.width=a;this.height=b;c=c||{};this.wrapS=void 0!==c.wrapS?c.wrapS:THREE.ClampToEdgeWrapping;this.wrapT=void 0!==c.wrapT?c.wrapT:THREE.ClampToEdgeWrapping;this.magFilter=void 0!==c.magFilter?c.magFilter:THREE.LinearFilter;this.minFilter=void 0!==c.minFilter?c.minFilter:THREE.LinearMipMapLinearFilter;this.anisotropy=void 0!==c.anisotropy?c.anisotropy:1;this.offset=new THREE.Vector2(0,0);this.repeat=new THREE.Vector2(1,1);this.format=void 0!==c.format?c.format: +THREE.RGBAFormat;this.type=void 0!==c.type?c.type:THREE.UnsignedByteType;this.depthBuffer=void 0!==c.depthBuffer?c.depthBuffer:!0;this.stencilBuffer=void 0!==c.stencilBuffer?c.stencilBuffer:!0;this.generateMipmaps=!0;this.shareDepthFrom=null}; +THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,addEventListener:THREE.EventDispatcher.prototype.addEventListener,hasEventListener:THREE.EventDispatcher.prototype.hasEventListener,removeEventListener:THREE.EventDispatcher.prototype.removeEventListener,dispatchEvent:THREE.EventDispatcher.prototype.dispatchEvent,clone:function(){var a=new THREE.WebGLRenderTarget(this.width,this.height);a.wrapS=this.wrapS;a.wrapT=this.wrapT;a.magFilter=this.magFilter;a.minFilter=this.minFilter; +a.anisotropy=this.anisotropy;a.offset.copy(this.offset);a.repeat.copy(this.repeat);a.format=this.format;a.type=this.type;a.depthBuffer=this.depthBuffer;a.stencilBuffer=this.stencilBuffer;a.generateMipmaps=this.generateMipmaps;a.shareDepthFrom=this.shareDepthFrom;return a},dispose:function(){this.dispatchEvent({type:"dispose"})}};THREE.WebGLRenderTargetCube=function(a,b,c){THREE.WebGLRenderTarget.call(this,a,b,c);this.activeCubeFace=0};THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype);THREE.RenderableVertex=function(){this.positionWorld=new THREE.Vector3;this.positionScreen=new THREE.Vector4;this.visible=!0};THREE.RenderableVertex.prototype.copy=function(a){this.positionWorld.copy(a.positionWorld);this.positionScreen.copy(a.positionScreen)};THREE.RenderableFace3=function(){this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.v3=new THREE.RenderableVertex;this.centroidModel=new THREE.Vector3;this.normalModel=new THREE.Vector3;this.normalModelView=new THREE.Vector3;this.vertexNormalsLength=0;this.vertexNormalsModel=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.vertexNormalsModelView=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.material=this.color=null;this.uvs=[[]];this.z=null};THREE.RenderableFace4=function(){this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.v3=new THREE.RenderableVertex;this.v4=new THREE.RenderableVertex;this.centroidModel=new THREE.Vector3;this.normalModel=new THREE.Vector3;this.normalModelView=new THREE.Vector3;this.vertexNormalsLength=0;this.vertexNormalsModel=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];this.vertexNormalsModelView=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3]; +this.material=this.color=null;this.uvs=[[]];this.z=null};THREE.RenderableObject=function(){this.z=this.object=null};THREE.RenderableParticle=function(){this.rotation=this.z=this.y=this.x=this.object=null;this.scale=new THREE.Vector2;this.material=null};THREE.RenderableLine=function(){this.z=null;this.v1=new THREE.RenderableVertex;this.v2=new THREE.RenderableVertex;this.vertexColors=[new THREE.Color,new THREE.Color];this.material=null};THREE.GeometryUtils={merge:function(a,b,c){var d,e,f=a.vertices.length,h=b instanceof THREE.Mesh?b.geometry:b,g=a.vertices,i=h.vertices,j=a.faces,l=h.faces,a=a.faceVertexUvs[0],h=h.faceVertexUvs[0];void 0===c&&(c=0);b instanceof THREE.Mesh&&(b.matrixAutoUpdate&&b.updateMatrix(),d=b.matrix,e=(new THREE.Matrix3).getNormalMatrix(d));for(var b=0,n=i.length;ba?b(c,e-1):j[e]>8&255,i>>16&255,i>>24&255)),d}d.mipmapCount=1;g[2]&131072&&!1!==b&&(d.mipmapCount=Math.max(1,g[7]));d.isCubemap=g[28]&512?!0:!1;d.width=g[4];d.height=g[3];for(var g=g[1]+4,f=d.width,h=d.height,i=d.isCubemap? +6:1,j=0;jn-1?0:n-1,p=n+1>e-1?e-1:n+1,t=0>l-1?0:l-1,r=l+1>d-1?d-1:l+1,q=[],s=[0,0,g[4*(n*d+l)]/255*b];q.push([-1,0,g[4*(n*d+t)]/255*b]);q.push([-1,-1,g[4*(m*d+t)]/255*b]);q.push([0,-1,g[4*(m*d+l)]/255*b]);q.push([1,-1,g[4*(m*d+r)]/255*b]);q.push([1,0,g[4*(n*d+r)]/255*b]);q.push([1,1,g[4*(p*d+r)]/255*b]);q.push([0,1,g[4*(p*d+l)]/255*b]);q.push([-1,1,g[4*(p*d+t)]/255*b]);m=[];t=q.length;for(p=0;pe)return null;var f=[],h=[],g=[],i,j,l;if(0=n--){console.log("Warning, unable to triangulate polygon!");break}i=j;e<=i&&(i=0);j=i+1;e<=j&&(j=0);l=j+1;e<=l&&(l=0);var m;a:{var p=m=void 0,t=void 0,r=void 0,q=void 0,s=void 0,w=void 0,z=void 0,H= +void 0,p=a[h[i]].x,t=a[h[i]].y,r=a[h[j]].x,q=a[h[j]].y,s=a[h[l]].x,w=a[h[l]].y;if(1E-10>(r-p)*(w-t)-(q-t)*(s-p))m=!1;else{var G=void 0,J=void 0,I=void 0,A=void 0,B=void 0,F=void 0,C=void 0,K=void 0,N=void 0,y=void 0,N=K=C=H=z=void 0,G=s-r,J=w-q,I=p-s,A=t-w,B=r-p,F=q-t;for(m=0;mi)h=d+1;else if(0b&&(b=0);1=b)return b=c[a]-b,a=this.curves[a],b=1-b/a.getLength(),a.getPointAt(b);a++}return null};THREE.CurvePath.prototype.getLength=function(){var a=this.getCurveLengths();return a[a.length-1]}; +THREE.CurvePath.prototype.getCurveLengths=function(){if(this.cacheLengths&&this.cacheLengths.length==this.curves.length)return this.cacheLengths;var a=[],b=0,c,d=this.curves.length;for(c=0;cb?b=g.x:g.xc?c=g.y:g.yd?d=g.z:g.zMath.abs(d.x-c[0].x)&&1E-10>Math.abs(d.y-c[0].y)&&c.splice(c.length-1,1);b&&c.push(c[0]);return c}; +THREE.Path.prototype.toShapes=function(){var a,b,c,d,e=[],f=new THREE.Path;a=0;for(b=this.actions.length;a +g&&(g+=c.length);g%=c.length;0>h&&(h+=j.length);h%=j.length;e=0<=g-1?g-1:c.length-1;f=0<=h-1?h-1:j.length-1;r=[j[h],c[g],c[e]];r=THREE.FontUtils.Triangulate.area(r);q=[j[h],j[f],c[g]];q=THREE.FontUtils.Triangulate.area(q);n+m>r+q&&(g=p,h=l,0>g&&(g+=c.length),g%=c.length,0>h&&(h+=j.length),h%=j.length,e=0<=g-1?g-1:c.length-1,f=0<=h-1?h-1:j.length-1);n=c.slice(0,g);m=c.slice(g);p=j.slice(h);l=j.slice(0,h);f=[j[h],j[f],c[g]];t.push([j[h],c[g],c[e]]);t.push(f);c=n.concat(p).concat(l).concat(m)}return{shape:c, +isolatedPts:t,allpoints:d}},triangulateShape:function(a,b){var c=THREE.Shape.Utils.removeHoles(a,b),d=c.allpoints,e=c.isolatedPts,c=THREE.FontUtils.Triangulate(c.shape,!1),f,h,g,i,j={};f=0;for(h=d.length;fd;d++)i=g[d].x+":"+g[d].y,i=j[i],void 0!==i&&(g[d]=i)}f=0;for(h=e.length;fd;d++)i=g[d].x+":"+g[d].y,i=j[i],void 0!==i&&(g[d]=i)}return c.concat(e)}, +isClockWise:function(a){return 0>THREE.FontUtils.Triangulate.area(a)},b2p0:function(a,b){var c=1-a;return c*c*b},b2p1:function(a,b){return 2*(1-a)*a*b},b2p2:function(a,b){return a*a*b},b2:function(a,b,c,d){return this.b2p0(a,b)+this.b2p1(a,c)+this.b2p2(a,d)},b3p0:function(a,b){var c=1-a;return c*c*c*b},b3p1:function(a,b){var c=1-a;return 3*c*c*a*b},b3p2:function(a,b){return 3*(1-a)*a*a*b},b3p3:function(a,b){return a*a*a*b},b3:function(a,b,c,d,e){return this.b3p0(a,b)+this.b3p1(a,c)+this.b3p2(a,d)+ +this.b3p3(a,e)}};THREE.LineCurve=function(a,b){this.v1=a;this.v2=b};THREE.LineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.LineCurve.prototype.getPoint=function(a){var b=this.v2.clone().sub(this.v1);b.multiplyScalar(a).add(this.v1);return b};THREE.LineCurve.prototype.getPointAt=function(a){return this.getPoint(a)};THREE.LineCurve.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()};THREE.QuadraticBezierCurve=function(a,b,c){this.v0=a;this.v1=b;this.v2=c};THREE.QuadraticBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.QuadraticBezierCurve.prototype.getPoint=function(a){var b;b=THREE.Shape.Utils.b2(a,this.v0.x,this.v1.x,this.v2.x);a=THREE.Shape.Utils.b2(a,this.v0.y,this.v1.y,this.v2.y);return new THREE.Vector2(b,a)}; +THREE.QuadraticBezierCurve.prototype.getTangent=function(a){var b;b=THREE.Curve.Utils.tangentQuadraticBezier(a,this.v0.x,this.v1.x,this.v2.x);a=THREE.Curve.Utils.tangentQuadraticBezier(a,this.v0.y,this.v1.y,this.v2.y);b=new THREE.Vector2(b,a);b.normalize();return b};THREE.CubicBezierCurve=function(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d};THREE.CubicBezierCurve.prototype=Object.create(THREE.Curve.prototype);THREE.CubicBezierCurve.prototype.getPoint=function(a){var b;b=THREE.Shape.Utils.b3(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x);a=THREE.Shape.Utils.b3(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y);return new THREE.Vector2(b,a)}; +THREE.CubicBezierCurve.prototype.getTangent=function(a){var b;b=THREE.Curve.Utils.tangentCubicBezier(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x);a=THREE.Curve.Utils.tangentCubicBezier(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y);b=new THREE.Vector2(b,a);b.normalize();return b};THREE.SplineCurve=function(a){this.points=void 0==a?[]:a};THREE.SplineCurve.prototype=Object.create(THREE.Curve.prototype);THREE.SplineCurve.prototype.getPoint=function(a){var b=new THREE.Vector2,c=[],d=this.points,e;e=(d.length-1)*a;a=Math.floor(e);e-=a;c[0]=0==a?a:a-1;c[1]=a;c[2]=a>d.length-2?d.length-1:a+1;c[3]=a>d.length-3?d.length-1:a+2;b.x=THREE.Curve.Utils.interpolate(d[c[0]].x,d[c[1]].x,d[c[2]].x,d[c[3]].x,e);b.y=THREE.Curve.Utils.interpolate(d[c[0]].y,d[c[1]].y,d[c[2]].y,d[c[3]].y,e);return b};THREE.EllipseCurve=function(a,b,c,d,e,f,h){this.aX=a;this.aY=b;this.xRadius=c;this.yRadius=d;this.aStartAngle=e;this.aEndAngle=f;this.aClockwise=h};THREE.EllipseCurve.prototype=Object.create(THREE.Curve.prototype);THREE.EllipseCurve.prototype.getPoint=function(a){var b=this.aEndAngle-this.aStartAngle;this.aClockwise||(a=1-a);b=this.aStartAngle+a*b;a=this.aX+this.xRadius*Math.cos(b);b=this.aY+this.yRadius*Math.sin(b);return new THREE.Vector2(a,b)};THREE.ArcCurve=function(a,b,c,d,e,f){THREE.EllipseCurve.call(this,a,b,c,c,d,e,f)};THREE.ArcCurve.prototype=Object.create(THREE.EllipseCurve.prototype);THREE.LineCurve3=THREE.Curve.create(function(a,b){this.v1=a;this.v2=b},function(a){var b=new THREE.Vector3;b.subVectors(this.v2,this.v1);b.multiplyScalar(a);b.add(this.v1);return b});THREE.QuadraticBezierCurve3=THREE.Curve.create(function(a,b,c){this.v0=a;this.v1=b;this.v2=c},function(a){var b,c;b=THREE.Shape.Utils.b2(a,this.v0.x,this.v1.x,this.v2.x);c=THREE.Shape.Utils.b2(a,this.v0.y,this.v1.y,this.v2.y);a=THREE.Shape.Utils.b2(a,this.v0.z,this.v1.z,this.v2.z);return new THREE.Vector3(b,c,a)});THREE.CubicBezierCurve3=THREE.Curve.create(function(a,b,c,d){this.v0=a;this.v1=b;this.v2=c;this.v3=d},function(a){var b,c;b=THREE.Shape.Utils.b3(a,this.v0.x,this.v1.x,this.v2.x,this.v3.x);c=THREE.Shape.Utils.b3(a,this.v0.y,this.v1.y,this.v2.y,this.v3.y);a=THREE.Shape.Utils.b3(a,this.v0.z,this.v1.z,this.v2.z,this.v3.z);return new THREE.Vector3(b,c,a)});THREE.SplineCurve3=THREE.Curve.create(function(a){this.points=void 0==a?[]:a},function(a){var b=new THREE.Vector3,c=[],d=this.points,e,a=(d.length-1)*a;e=Math.floor(a);a-=e;c[0]=0==e?e:e-1;c[1]=e;c[2]=e>d.length-2?d.length-1:e+1;c[3]=e>d.length-3?d.length-1:e+2;e=d[c[0]];var f=d[c[1]],h=d[c[2]],c=d[c[3]];b.x=THREE.Curve.Utils.interpolate(e.x,f.x,h.x,c.x,a);b.y=THREE.Curve.Utils.interpolate(e.y,f.y,h.y,c.y,a);b.z=THREE.Curve.Utils.interpolate(e.z,f.z,h.z,c.z,a);return b});THREE.ClosedSplineCurve3=THREE.Curve.create(function(a){this.points=void 0==a?[]:a},function(a){var b=new THREE.Vector3,c=[],d=this.points,e;e=(d.length-0)*a;a=Math.floor(e);e-=a;a+=0a.hierarchy[c].keys[d].time&& +(a.hierarchy[c].keys[d].time=0),void 0!==a.hierarchy[c].keys[d].rot&&!(a.hierarchy[c].keys[d].rot instanceof THREE.Quaternion)){var g=a.hierarchy[c].keys[d].rot;a.hierarchy[c].keys[d].rot=new THREE.Quaternion(g[0],g[1],g[2],g[3])}if(a.hierarchy[c].keys.length&&void 0!==a.hierarchy[c].keys[0].morphTargets){g={};for(d=0;dp;p++){c=b[p];h=i.prevKey[c];g=i.nextKey[c];if(g.time<=l){if(jd||1d?0:1;if("pos"===c)if(c=a.position,this.interpolationType===THREE.AnimationHandler.LINEAR)c.x=e[0]+(f[0]-e[0])*d,c.y=e[1]+(f[1]-e[1])*d,c.z=e[2]+ +(f[2]-e[2])*d;else{if(this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD)this.points[0]=this.getPrevKeyWith("pos",n,h.index-1).pos,this.points[1]=e,this.points[2]=f,this.points[3]=this.getNextKeyWith("pos",n,g.index+1).pos,d=0.33*d+0.33,e=this.interpolateCatmullRom(this.points,d),c.x=e[0],c.y=e[1],c.z=e[2],this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD&&(d=this.interpolateCatmullRom(this.points,1.01*d), +this.target.set(d[0],d[1],d[2]),this.target.sub(c),this.target.y=0,this.target.normalize(),d=Math.atan2(this.target.x,this.target.z),a.rotation.set(0,d,0))}else"rot"===c?THREE.Quaternion.slerp(e,f,a.quaternion,d):"scl"===c&&(c=a.scale,c.x=e[0]+(f[0]-e[0])*d,c.y=e[1]+(f[1]-e[1])*d,c.z=e[2]+(f[2]-e[2])*d)}}}}; +THREE.Animation.prototype.interpolateCatmullRom=function(a,b){var c=[],d=[],e,f,h,g,i,j;e=(a.length-1)*b;f=Math.floor(e);e-=f;c[0]=0===f?f:f-1;c[1]=f;c[2]=f>a.length-2?f:f+1;c[3]=f>a.length-3?f:f+2;f=a[c[0]];g=a[c[1]];i=a[c[2]];j=a[c[3]];c=e*e;h=e*c;d[0]=this.interpolate(f[0],g[0],i[0],j[0],e,c,h);d[1]=this.interpolate(f[1],g[1],i[1],j[1],e,c,h);d[2]=this.interpolate(f[2],g[2],i[2],j[2],e,c,h);return d}; +THREE.Animation.prototype.interpolate=function(a,b,c,d,e,f,h){a=0.5*(c-a);d=0.5*(d-b);return(2*(b-c)+a+d)*h+(-3*(b-c)-2*a-d)*f+a*e+b};THREE.Animation.prototype.getNextKeyWith=function(a,b,c){for(var d=this.data.hierarchy[b].keys,c=this.interpolationType===THREE.AnimationHandler.CATMULLROM||this.interpolationType===THREE.AnimationHandler.CATMULLROM_FORWARD?c=h?b.interpolate(c,h):b.interpolate(c,c.time)}this.data.hierarchy[a].node.updateMatrix();d.matrixWorldNeedsUpdate=!0}}if(this.JITCompile&&void 0===f[0][e]){this.hierarchy[0].updateMatrixWorld(!0);for(a=0;ag?(b=Math.atan2(b.y-a.y,b.x-a.x),a=Math.atan2(c.y-a.y,c.x-a.x),b>a&&(a+=2*Math.PI),c=(b+a)/2,a=-Math.cos(c),c=-Math.sin(c),new THREE.Vector2(a,c)):d.multiplyScalar(g).add(h).sub(a).clone()}function e(c,d){var e,f;for(O=c.length;0<=--O;){e=O;f=O-1;0>f&&(f=c.length-1);for(var g=0,h=p+2*l, +g=0;gMath.abs(c-i)?[new THREE.Vector2(b,1-e),new THREE.Vector2(d,1-f),new THREE.Vector2(j,1-h),new THREE.Vector2(n,1-a)]:[new THREE.Vector2(c,1-e),new THREE.Vector2(i,1-f),new THREE.Vector2(l,1-h),new THREE.Vector2(m,1-a)]}};THREE.ExtrudeGeometry.__v1=new THREE.Vector2;THREE.ExtrudeGeometry.__v2=new THREE.Vector2;THREE.ExtrudeGeometry.__v3=new THREE.Vector2;THREE.ExtrudeGeometry.__v4=new THREE.Vector2; +THREE.ExtrudeGeometry.__v5=new THREE.Vector2;THREE.ExtrudeGeometry.__v6=new THREE.Vector2;THREE.ShapeGeometry=function(a,b){THREE.Geometry.call(this);!1===a instanceof Array&&(a=[a]);this.shapebb=a[a.length-1].getBoundingBox();this.addShapeList(a,b);this.computeCentroids();this.computeFaceNormals()};THREE.ShapeGeometry.prototype=Object.create(THREE.Geometry.prototype);THREE.ShapeGeometry.prototype.addShapeList=function(a,b){for(var c=0,d=a.length;cc&&1===a.x&&(a=new THREE.Vector2(a.x-1,a.y));0===b.x&&0===b.z&&(a=new THREE.Vector2(c/2/Math.PI+0.5,a.y));return a.clone()}THREE.Geometry.call(this);for(var c=c||1,d=d||0,g=this,i=0,j=a.length;im&&(0.2>a&&(d[0].x+=1),0.2>b&&(d[1].x+=1),0.2>l&&(d[2].x+=1));i=0;for(j=this.vertices.length;i=l){for(j=0;3>j;j++){l=[i[j],i[(j+1)%3]];n=!0;for(m=0;mg;g++)void 0===f[h[g]]&&(f[h[g]]=e++,this.vertices.push(a[h[g]])),h[g]=f[h[g]]}for(d=0;dc.y?this.quaternion.set(1,0,0,0):(a.set(c.z,0,-c.x).normalize(),b=Math.acos(c.y),this.quaternion.setFromAxisAngle(a,b))}}();THREE.ArrowHelper.prototype.setLength=function(a){this.scale.set(a,a,a)}; +THREE.ArrowHelper.prototype.setColor=function(a){this.line.material.color.setHex(a);this.cone.material.color.setHex(a)};THREE.BoxHelper=function(a){var b=[new THREE.Vector3(1,1,1),new THREE.Vector3(-1,1,1),new THREE.Vector3(-1,-1,1),new THREE.Vector3(1,-1,1),new THREE.Vector3(1,1,-1),new THREE.Vector3(-1,1,-1),new THREE.Vector3(-1,-1,-1),new THREE.Vector3(1,-1,-1)];this.vertices=b;var c=new THREE.Geometry;c.vertices.push(b[0],b[1],b[1],b[2],b[2],b[3],b[3],b[0],b[4],b[5],b[5],b[6],b[6],b[7],b[7],b[4],b[0],b[4],b[1],b[5],b[2],b[6],b[3],b[7]);THREE.Line.call(this,c,new THREE.LineBasicMaterial({color:16776960}),THREE.LinePieces); +void 0!==a&&this.update(a)};THREE.BoxHelper.prototype=Object.create(THREE.Line.prototype); +THREE.BoxHelper.prototype.update=function(a){var b=a.geometry;null===b.boundingBox&&b.computeBoundingBox();var c=b.boundingBox.min,b=b.boundingBox.max,d=this.vertices;d[0].set(b.x,b.y,b.z);d[1].set(c.x,b.y,b.z);d[2].set(c.x,c.y,b.z);d[3].set(b.x,c.y,b.z);d[4].set(b.x,b.y,c.z);d[5].set(c.x,b.y,c.z);d[6].set(c.x,c.y,c.z);d[7].set(b.x,c.y,c.z);this.geometry.computeBoundingSphere();this.geometry.verticesNeedUpdate=!0;this.matrixAutoUpdate=!1;this.matrixWorld=a.matrixWorld};THREE.CameraHelper=function(a){function b(a,b,d){c(a,d);c(b,d)}function c(a,b){d.vertices.push(new THREE.Vector3);d.colors.push(new THREE.Color(b));void 0===f[a]&&(f[a]=[]);f[a].push(d.vertices.length-1)}THREE.Line.call(this);var d=new THREE.Geometry,e=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),f={};b("n1","n2",16755200);b("n2","n4",16755200);b("n4","n3",16755200);b("n3","n1",16755200);b("f1","f2",16755200);b("f2","f4",16755200);b("f4","f3",16755200);b("f3","f1",16755200); +b("n1","f1",16755200);b("n2","f2",16755200);b("n3","f3",16755200);b("n4","f4",16755200);b("p","n1",16711680);b("p","n2",16711680);b("p","n3",16711680);b("p","n4",16711680);b("u1","u2",43775);b("u2","u3",43775);b("u3","u1",43775);b("c","t",16777215);b("p","c",3355443);b("cn1","cn2",3355443);b("cn3","cn4",3355443);b("cf1","cf2",3355443);b("cf3","cf4",3355443);THREE.Line.call(this,d,e,THREE.LinePieces);this.camera=a;this.matrixWorld=a.matrixWorld;this.matrixAutoUpdate=!1;this.pointMap=f;this.update()}; +THREE.CameraHelper.prototype=Object.create(THREE.Line.prototype); +THREE.CameraHelper.prototype.update=function(){var a=new THREE.Vector3,b=new THREE.Camera,c=new THREE.Projector;return function(){function d(d,h,g,i){a.set(h,g,i);c.unprojectVector(a,b);d=e.pointMap[d];if(void 0!==d){h=0;for(g=d.length;hd;d++)c.faces[d].materialIndex=4>d?0:1;d=new THREE.MeshBasicMaterial({fog:!1,wireframe:!0});d.color.copy(a.color).multiplyScalar(a.intensity);var e=new THREE.MeshBasicMaterial({fog:!1,wireframe:!0});e.color.copy(a.groundColor).multiplyScalar(a.intensity);this.lightSphere=new THREE.Mesh(c,new THREE.MeshFaceMaterial([d, +e]));this.lightSphere.position=a.position;this.lightSphere.lookAt(new THREE.Vector3);this.add(this.lightSphere)};THREE.HemisphereLightHelper.prototype=Object.create(THREE.Object3D.prototype);THREE.HemisphereLightHelper.prototype.update=function(){this.lightSphere.lookAt(new THREE.Vector3);this.lightSphere.material.materials[0].color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightSphere.material.materials[1].color.copy(this.light.groundColor).multiplyScalar(this.light.intensity)};THREE.PointLightHelper=function(a,b){THREE.Object3D.call(this);this.matrixAutoUpdate=!1;this.light=a;var c=new THREE.SphereGeometry(b,4,2),d=new THREE.MeshBasicMaterial({fog:!1,wireframe:!0});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightSphere=new THREE.Mesh(c,d);this.lightSphere.matrixWorld=this.light.matrixWorld;this.lightSphere.matrixAutoUpdate=!1;this.add(this.lightSphere)};THREE.PointLightHelper.prototype=Object.create(THREE.Object3D.prototype); +THREE.PointLightHelper.prototype.update=function(){this.lightSphere.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};THREE.SpotLightHelper=function(a,b){THREE.Object3D.call(this);this.matrixAutoUpdate=!1;this.light=a;var c=new THREE.SphereGeometry(b,4,2),d=new THREE.MeshBasicMaterial({fog:!1,wireframe:!0});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightSphere=new THREE.Mesh(c,d);this.lightSphere.matrixWorld=this.light.matrixWorld;this.lightSphere.matrixAutoUpdate=!1;this.add(this.lightSphere);c=new THREE.CylinderGeometry(1E-4,1,1,8,1,!0);c.applyMatrix((new THREE.Matrix4).makeTranslation(0, +-0.5,0));c.applyMatrix((new THREE.Matrix4).makeRotationX(-Math.PI/2));d=new THREE.MeshBasicMaterial({fog:!1,wireframe:!0,opacity:0.3,transparent:!0});d.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightCone=new THREE.Mesh(c,d);this.lightCone.position=this.light.position;c=a.distance?a.distance:1E4;d=c*Math.tan(a.angle);this.lightCone.scale.set(d,d,c);this.lightCone.lookAt(this.light.target.position);this.add(this.lightCone)};THREE.SpotLightHelper.prototype=Object.create(THREE.Object3D.prototype); +THREE.SpotLightHelper.prototype.update=function(){var a=this.light.distance?this.light.distance:1E4,b=a*Math.tan(this.light.angle);this.lightCone.scale.set(b,b,a);this.lightCone.lookAt(this.light.target.position);this.lightSphere.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);this.lightCone.material.color.copy(this.light.color).multiplyScalar(this.light.intensity)};THREE.VertexNormalsHelper=function(a,b,c){this.object=a;this.size=b||1;for(var b=c||16711680,c=new THREE.Geometry,a=a.geometry.faces,d=0,e=a.length;dg.end&&(g.end=f);c||(c=i)}}for(i in d)g=d[i],this.createAnimation(i,g.start,g.end,a);this.firstAnimation=c}; +THREE.MorphBlendMesh.prototype.setAnimationDirectionForward=function(a){if(a=this.animationsMap[a])a.direction=1,a.directionBackwards=!1};THREE.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(a){if(a=this.animationsMap[a])a.direction=-1,a.directionBackwards=!0};THREE.MorphBlendMesh.prototype.setAnimationFPS=function(a,b){var c=this.animationsMap[a];c&&(c.fps=b,c.duration=(c.end-c.start)/c.fps)}; +THREE.MorphBlendMesh.prototype.setAnimationDuration=function(a,b){var c=this.animationsMap[a];c&&(c.duration=b,c.fps=(c.end-c.start)/c.duration)};THREE.MorphBlendMesh.prototype.setAnimationWeight=function(a,b){var c=this.animationsMap[a];c&&(c.weight=b)};THREE.MorphBlendMesh.prototype.setAnimationTime=function(a,b){var c=this.animationsMap[a];c&&(c.time=b)};THREE.MorphBlendMesh.prototype.getAnimationTime=function(a){var b=0;if(a=this.animationsMap[a])b=a.time;return b}; +THREE.MorphBlendMesh.prototype.getAnimationDuration=function(a){var b=-1;if(a=this.animationsMap[a])b=a.duration;return b};THREE.MorphBlendMesh.prototype.playAnimation=function(a){var b=this.animationsMap[a];b?(b.time=0,b.active=!0):console.warn("animation["+a+"] undefined")};THREE.MorphBlendMesh.prototype.stopAnimation=function(a){if(a=this.animationsMap[a])a.active=!1}; +THREE.MorphBlendMesh.prototype.update=function(a){for(var b=0,c=this.animationsList.length;bd.duration||0>d.time)d.direction*=-1,d.time>d.duration&&(d.time=d.duration,d.directionBackwards=!0),0>d.time&&(d.time=0,d.directionBackwards=!1)}else d.time%=d.duration,0>d.time&&(d.time+=d.duration);var f=d.startFrame+THREE.Math.clamp(Math.floor(d.time/e),0,d.length-1),h=d.weight; +f!==d.currentFrame&&(this.morphTargetInfluences[d.lastFrame]=0,this.morphTargetInfluences[d.currentFrame]=1*h,this.morphTargetInfluences[f]=0,d.lastFrame=d.currentFrame,d.currentFrame=f);e=d.time%e/e;d.directionBackwards&&(e=1-e);this.morphTargetInfluences[d.currentFrame]=e*h;this.morphTargetInfluences[d.lastFrame]=(1-e)*h}}};THREE.LensFlarePlugin=function(){function a(a,c){var d=b.createProgram(),e=b.createShader(b.FRAGMENT_SHADER),f=b.createShader(b.VERTEX_SHADER),g="precision "+c+" float;\n";b.shaderSource(e,g+a.fragmentShader);b.shaderSource(f,g+a.vertexShader);b.compileShader(e);b.compileShader(f);b.attachShader(d,e);b.attachShader(d,f);b.linkProgram(d);return d}var b,c,d,e,f,h,g,i,j,l,n,m,p;this.init=function(t){b=t.context;c=t;d=t.getPrecision();e=new Float32Array(16);f=new Uint16Array(6);t=0;e[t++]=-1;e[t++]=-1; +e[t++]=0;e[t++]=0;e[t++]=1;e[t++]=-1;e[t++]=1;e[t++]=0;e[t++]=1;e[t++]=1;e[t++]=1;e[t++]=1;e[t++]=-1;e[t++]=1;e[t++]=0;e[t++]=1;t=0;f[t++]=0;f[t++]=1;f[t++]=2;f[t++]=0;f[t++]=2;f[t++]=3;h=b.createBuffer();g=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,h);b.bufferData(b.ARRAY_BUFFER,e,b.STATIC_DRAW);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,g);b.bufferData(b.ELEMENT_ARRAY_BUFFER,f,b.STATIC_DRAW);i=b.createTexture();j=b.createTexture();b.bindTexture(b.TEXTURE_2D,i);b.texImage2D(b.TEXTURE_2D,0,b.RGB,16,16, +0,b.RGB,b.UNSIGNED_BYTE,null);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.NEAREST);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.NEAREST);b.bindTexture(b.TEXTURE_2D,j);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,16,16,0,b.RGBA,b.UNSIGNED_BYTE,null);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE); +b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.NEAREST);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.NEAREST);0>=b.getParameter(b.MAX_VERTEX_TEXTURE_IMAGE_UNITS)?(l=!1,n=a(THREE.ShaderFlares.lensFlare,d)):(l=!0,n=a(THREE.ShaderFlares.lensFlareVertexTexture,d));m={};p={};m.vertex=b.getAttribLocation(n,"position");m.uv=b.getAttribLocation(n,"uv");p.renderType=b.getUniformLocation(n,"renderType");p.map=b.getUniformLocation(n,"map");p.occlusionMap=b.getUniformLocation(n,"occlusionMap");p.opacity= +b.getUniformLocation(n,"opacity");p.color=b.getUniformLocation(n,"color");p.scale=b.getUniformLocation(n,"scale");p.rotation=b.getUniformLocation(n,"rotation");p.screenPosition=b.getUniformLocation(n,"screenPosition")};this.render=function(a,d,e,f){var a=a.__webglFlares,w=a.length;if(w){var z=new THREE.Vector3,H=f/e,G=0.5*e,J=0.5*f,I=16/f,A=new THREE.Vector2(I*H,I),B=new THREE.Vector3(1,1,0),F=new THREE.Vector2(1,1),C=p,I=m;b.useProgram(n);b.enableVertexAttribArray(m.vertex);b.enableVertexAttribArray(m.uv); +b.uniform1i(C.occlusionMap,0);b.uniform1i(C.map,1);b.bindBuffer(b.ARRAY_BUFFER,h);b.vertexAttribPointer(I.vertex,2,b.FLOAT,!1,16,0);b.vertexAttribPointer(I.uv,2,b.FLOAT,!1,16,8);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,g);b.disable(b.CULL_FACE);b.depthMask(!1);var K,N,y,M,v;for(K=0;KA;A++)H[A]=new THREE.Vector3,w[A]=new THREE.Vector3;H=G.shadowCascadeNearZ[z];G=G.shadowCascadeFarZ[z];w[0].set(-1,-1,H);w[1].set(1,-1,H);w[2].set(-1, +1,H);w[3].set(1,1,H);w[4].set(-1,-1,G);w[5].set(1,-1,G);w[6].set(-1,1,G);w[7].set(1,1,G);I.originalCamera=m;w=new THREE.Gyroscope;w.position=r.shadowCascadeOffset;w.add(I);w.add(I.target);m.add(w);r.shadowCascadeArray[s]=I;console.log("Created virtualLight",I)}z=r;H=s;G=z.shadowCascadeArray[H];G.position.copy(z.position);G.target.position.copy(z.target.position);G.lookAt(G.target);G.shadowCameraVisible=z.shadowCameraVisible;G.shadowDarkness=z.shadowDarkness;G.shadowBias=z.shadowCascadeBias[H];w=z.shadowCascadeNearZ[H]; +z=z.shadowCascadeFarZ[H];G=G.pointsFrustum;G[0].z=w;G[1].z=w;G[2].z=w;G[3].z=w;G[4].z=z;G[5].z=z;G[6].z=z;G[7].z=z;J[q]=I;q++}else J[q]=r,q++;p=0;for(t=J.length;pz;z++)H=G[z],H.copy(w[z]),THREE.ShadowMapPlugin.__projector.unprojectVector(H,s),H.applyMatrix4(q.matrixWorldInverse),H.xj.x&&(j.x=H.x),H.yj.y&&(j.y=H.y),H.zj.z&& +(j.z=H.z);q.left=i.x;q.right=j.x;q.top=j.y;q.bottom=i.y;q.updateProjectionMatrix()}q=r.shadowMap;w=r.shadowMatrix;s=r.shadowCamera;s.position.getPositionFromMatrix(r.matrixWorld);l.getPositionFromMatrix(r.target.matrixWorld);s.lookAt(l);s.updateMatrixWorld();s.matrixWorldInverse.getInverse(s.matrixWorld);r.cameraHelper&&(r.cameraHelper.visible=r.shadowCameraVisible);r.shadowCameraVisible&&r.cameraHelper.update();w.set(0.5,0,0,0.5,0,0.5,0,0.5,0,0,0.5,0.5,0,0,0,1);w.multiply(s.projectionMatrix);w.multiply(s.matrixWorldInverse); +g.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse);h.setFromMatrix(g);b.setRenderTarget(q);b.clear();G=n.__webglObjects;r=0;for(q=G.length;r 0 ) {\nfloat depth = gl_FragCoord.z / gl_FragCoord.w;\nfloat fogFactor = 0.0;\nif ( fogType == 1 ) {\nfogFactor = smoothstep( fogNear, fogFar, depth );\n} else {\nconst float LOG2 = 1.442695;\nfloat fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );\nfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );\n}\ngl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );\n}\n}"}}; + +// Export the THREE object for **Node.js**, with +// backwards-compatibility for the old `require()` API. If we're in +// the browser, add `_` as a global object via a string identifier, +// for Closure Compiler "advanced" mode. +if (typeof exports !== 'undefined') { + if (typeof module !== 'undefined' && module.exports) { + exports = module.exports = THREE; + } + exports.THREE = THREE; +} else { + this['THREE'] = THREE; +} diff --git a/page/1/index.html b/page/1/index.html new file mode 100644 index 00000000..59abe47b --- /dev/null +++ b/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/ \ No newline at end of file diff --git a/page/2/index.html b/page/2/index.html new file mode 100644 index 00000000..cef29bde --- /dev/null +++ b/page/2/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/page/3/index.html b/page/3/index.html new file mode 100644 index 00000000..2c690eb2 --- /dev/null +++ b/page/3/index.html @@ -0,0 +1,137 @@ + + + + + + + + + + SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2016-10-04-dependent-type/index.html b/post/2016-10-04-dependent-type/index.html new file mode 100644 index 00000000..ed334942 --- /dev/null +++ b/post/2016-10-04-dependent-type/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + SJTUG例行分享:Dependent Type · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG例行分享:Dependent Type

+

+ October 4, 2016 + +
+ hawnzug + + +
+ Main Library E316 + 2016-10-04T18:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

10月4日晚18:00 - 21:00,@邵成 @钱泽森 两位同学在新图E316向大家介绍 Dependent Type。

+

邵成:Fun with Dependent Types in Haskell
+钱泽森:How to Write a Safe Printf in Agda

+

视频在 LiveEdu 可以看到

+

分享资料 : sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2016-10-16-c11-memory-model/index.html b/post/2016-10-16-c11-memory-model/index.html new file mode 100644 index 00000000..32a92b52 --- /dev/null +++ b/post/2016-10-16-c11-memory-model/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + SJTUG例行分享:C11 Memory Model · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG例行分享:C11 Memory Model

+

+ October 16, 2016 + +
+ hawnzug + + +
+ Main Library B416 + 2016-10-16T18:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

10月16日晚18:00,@贾枭 学长在新图B416向大家介绍 C11 Memory Model 的有关知识。

+

视频在 LiveEdu 可以看到。

+

分享资料 : sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2016-10-29-physical-engine/index.html b/post/2016-10-29-physical-engine/index.html new file mode 100644 index 00000000..29c982a5 --- /dev/null +++ b/post/2016-10-29-physical-engine/index.html @@ -0,0 +1,216 @@ + + + + + + + + + + SJTUG例行分享:简单的物理引擎 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG例行分享:简单的物理引擎

+

+ October 29, 2016 + +
+ hawnzug + + +
+ Main Library E316 + 2016-10-29T18:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

10月29日晚18:00将在新图E316进行例行分享,由大一巨巨 @时光机 给大家带来「简单的物理引擎」分享,欢迎大家来参与活动

+

分享资料 : sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2016-11-12-life-of-a-packet/index.html b/post/2016-11-12-life-of-a-packet/index.html new file mode 100644 index 00000000..21f449a5 --- /dev/null +++ b/post/2016-11-12-life-of-a-packet/index.html @@ -0,0 +1,216 @@ + + + + + + + + + + SJTUG例行分享:Life of a packet · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG例行分享:Life of a packet

+

+ November 12, 2016 + +
+ hawnzug + + +
+ Guangbiao building + 2016-11-12T18:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

11月12日晚18:00将在光彪楼二楼进行例行分享,由@贾枭 学长给大家带来分享 Life of a packet,欢迎大家来参与活动

+

分享资料 : sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-01-08-halvm/index.html b/post/2017-01-08-halvm/index.html new file mode 100644 index 00000000..cef6ff6b --- /dev/null +++ b/post/2017-01-08-halvm/index.html @@ -0,0 +1,221 @@ + + + + + + + + + + SJTUG例行分享:HaLVM · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG例行分享:HaLVM

+

+ January 8, 2017 + +
+ htfy96 + + +
+ Main Library E210 + 2017-01-08T15:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

本周日(1月8日)下午15:00 - 17:30,@张震巨巨在新图E210给大家介绍HaLVM项目,欢迎大家来参加分享

+

项目地址:Github/HaLVM

+

巨巨主页:Github/izgzhen

+
+

HaLVM(Haskell Lightweight Virtual Machine)是一个让Glasgow Haskell Compiler套件直接在Xen虚拟环境下运行的项目。

+
+

分享资料 : sjtug/sharing/HaLVM

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-01-14-announcing-new-portal/index.html b/post/2017-01-14-announcing-new-portal/index.html new file mode 100644 index 00000000..aae5f169 --- /dev/null +++ b/post/2017-01-14-announcing-new-portal/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + SJTUG新版首页上线 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG新版首页上线

+

+ January 14, 2017 + +
+ htfy96 + + +
+ + + + news + + announcement + + + +

+
+ +
+

我们的首页已经更新到基于Hugo的版本,希望能给大家带来更好的阅读体验。

+

接下来这里将会加入例行分享的报道及一些技术文章,欢迎大家订阅。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-01-15-writing-guide/index.html b/post/2017-01-15-writing-guide/index.html new file mode 100644 index 00000000..ad89d5d8 --- /dev/null +++ b/post/2017-01-15-writing-guide/index.html @@ -0,0 +1,224 @@ + + + + + + + + + + sjtug.org写作指南 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

sjtug.org写作指南

+

+ January 15, 2017 + +
+ htfy96 + + +
+ + + + guide + + + +

+
+ +
+

这里介绍了一下发布新文章的步骤

+

安装Hugo, 或直接新建文章

+

安装hugo然后hugo new post/YYYY-MM-DD-article-title.md;或直接新建content/post/YYYY-MM-DD-article-title.md,手动指定date

+

软件源新闻放在content/post/mirror-news下面,带上mirror-news的tag。

+

软件源帮助放在content/post/mirror-help下面,带上mirror-help的tag,title设定成和name相同(注意大小写)。

+

Front matters

+

头部+++的front matters部分,可以指定的部分有:

+
    +
  • title = "article title" 必填
  • +
  • author = "htfy96" 必填
  • +
  • tags = ["tag1", "tag2"] 建议填写,只有包含news tag的文章才会在首页显示,其它常用tag包括announcement, guide, sharing
  • +
  • activity_time = "2017-01-08T15:00:00+08:00",格式同date,当有sharing标签时建议填写,代表活动开始时间
  • +
  • activity_place = "Main Library",同上,代表活动地点
  • +
  • draft = true,当不想立即发布时才填写,默认情况false不用填写
  • +
+

测试并提交

+ + +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-02-21-hotpot/index.html b/post/2017-02-21-hotpot/index.html new file mode 100644 index 00000000..f39c7aef --- /dev/null +++ b/post/2017-02-21-hotpot/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + SJTUG开学聚餐 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG开学聚餐

+

+ February 21, 2017 + +
+ htfy96 + + +
+ 拖鞋门 + 2017-02-25T17:30:00+08:00 + +
+ + + + news + + dining + + + +

+
+ +
+

又到了开学聚餐的时间啦!这次聚餐还是定在欧尚部落情,在本周六(25日)晚5:30GMT+8于拖鞋门前旗杆下集合。欢迎各位过来吃锅!

+

如果时间安排不合适,可以填写这个表单。如果时间冲突的同学多的话可能会进行调整

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-03-09-gpg-sign-party/index.html b/post/2017-03-09-gpg-sign-party/index.html new file mode 100644 index 00000000..626c53f0 --- /dev/null +++ b/post/2017-03-09-gpg-sign-party/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + GPG Sign Party & Yubikey安利 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

GPG Sign Party & Yubikey安利

+

+ March 9, 2017 + +
+ htfy96 + + +
+ Main Library E216 + 2017-03-12T15:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

本周日(12日)下午3点到5点,在新图E216将举行GPG Sign Party&Yubikey安利活动。将手把手教大家签发/交换密钥与加密、签名信息,欢迎参加!

+

校内同学点击这里加入学习室。 +申请单号94388,密码165165

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-06-12-summer-class/index.html b/post/2017-06-12-summer-class/index.html new file mode 100644 index 00000000..11dcd02c --- /dev/null +++ b/post/2017-06-12-summer-class/index.html @@ -0,0 +1,255 @@ + + + + + + + + + + SJTUG暑期课堂报名中! · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG暑期课堂报名中!

+

+ June 12, 2017 + +
+ htfy96 + + +
+ 东上院309 + 2017-06-29T18:00:00+08:00 + +
+ + + + news + + summer_school + + + +

+
+ +
+

UPDATE: 课程主页已经开通!

+

SJTUG本次暑假开设了夏季第二课堂,将面向初学者与感兴趣同学的进行3~4次分享,主要内容见下:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
日期地点主讲人内容
6月29日(19周周四)东上309@htfy96开源与自由软件历史。以几个人物作为主线科普自由软件及其相关运动的起伏与发展,不需要代码水平的科普性质讲座。
7月6日(20周周四)待定@茄子(ant_sz)待定
7月13日(21周周四)东上309@PhijackGame Theory and Mechanism
7月20日(22周周四)东上309@codeworm96Haskell School of Music,探索用程序语言的方式对音乐进行抽象,不要求编程或音乐理论基础。详细介绍点此
+

课堂将保证小规模,确保来的同学都有当面指导的机会。欢迎对技术感兴趣的同学来参加!我们尤其欢迎在Linux、自由软件、函数式编程等领域有兴趣的同学。

+

强烈建议加最后的微信群以获取资料与课前信息。

+

不管你是否已经毕业,还是只能来几节课,都欢迎填写这张表格报名:

+

立即报名

+

之后,所有的Slides都会在我们的Github仓库公开,欢迎Star~

+

欢迎想来的同学长按识别二维码加群或加微信69oulciV@: +SJTUG Summer Class2017

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-06-24-summer-class-portal/index.html b/post/2017-06-24-summer-class-portal/index.html new file mode 100644 index 00000000..82706a2c --- /dev/null +++ b/post/2017-06-24-summer-class-portal/index.html @@ -0,0 +1,237 @@ + + + + + + + + + + 2017-SJTUG暑期课堂课程主页 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

2017-SJTUG暑期课堂课程主页

+

+ June 24, 2017 + +
+ htfy96 + + +
+ 东上院309 + 2017-06-29T18:00:00+08:00 + +
+ + + + summer_school + + + +

+
+ +
+

这里是SJTUG 2017暑期课堂的课程主页,之后所有的课程时间、地点以本页为准,相关的资料也会在本页发放。

+
+

UPDATE(06-25): 人员分流名单已经公布,请尽快查看自己的时间 +UPDATE(06-29):更新第一周课件及第二周时间地点 +UPDATE(07-01):更新第二周主题

+
+

6月29日/开源与自由软件历史

+

时间:6月29日(19周周四)18:00

+

地点:东上309

+

主讲人:@htfy96

+

课件:在线查看 下载

+

7月7日/Git使用

+

时间:7月7日(20周周五)20:30(有更改)

+

地点:东中4-302

+

主讲人:@茄子(ant_sz)

+

课件:N/A

+

7月13日/Game Theory and Mechanism

+

时间:7月13日(21周周四)18:00

+

地点:东上309

+

主讲人:@Phijack

+

课件:N/A

+

7月20日/Haskell School of Music

+

时间:7月20日(22周周四)18:00

+

地点:东上309

+

主讲人:@codeworm96

+

课件:N/A

+

获取最新资讯

+

可以通过RSS订阅或关注我们的微信号@sjtunix获取最新资讯:

+

wechat_qrcode

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-06-25-summer-class-schedule/index.html b/post/2017-06-25-summer-class-schedule/index.html new file mode 100644 index 00000000..9746572b --- /dev/null +++ b/post/2017-06-25-summer-class-schedule/index.html @@ -0,0 +1,299 @@ + + + + + + + + + + 暑期课堂学生分流 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

暑期课堂学生分流

+

+ June 25, 2017 + +
+ htfy96 + + +
+ 东上院309 + 2017-06-29T18:00:00+08:00 + +
+ + + + summer_school + + + +

+
+ +
+

由于暑期课堂报名人数接近90人,教室无法容纳这么多的人数,因此我们不得不采取分流措施。选择这门课的老师与同学建议按照以下表格前来上课。

+

当然,如果您有特别感兴趣的话题可以随时来听,但可能会发生没有座位的情况。

+

建议在第1、4周(6月29日/7月20日)前来的老师与同学的手机后4位

+
0076
+0158
+0203
+1025
+1991
+2073
+2180
+2529
+2537
+2701
+3081
+3136
+3253
+3739
+4746
+5042
+5301
+5397
+5425
+5532
+6265
+6527
+6708
+6723
+6985
+7035
+7051
+7076
+7586
+7683
+8038
+8189
+8851
+9108
+9481
+

以及学号是B045090027,没有填写手机号的同学

+

建议在第2、3周(7月7日/7月13日)前来的老师与同学的手机后4位

+
0039
+0069
+0153
+0159
+0200
+0320
+0709
+0874
+1160
+1172
+1362
+1691
+1716
+2127
+2530
+2596
+2913
+3215
+3580
+3680
+4486
+4648
+4782
+5028
+5163
+5209
+5336
+5585
+5732
+5831
+5996
+6090
+6217
+6241
+6321
+7065
+7076
+7317
+7450
+7597
+7598
+7931
+7959
+8127
+8360
+8525
+8676
+8972
+9150
+9371
+9731
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-10-28-performance-measurement/index.html b/post/2017-10-28-performance-measurement/index.html new file mode 100644 index 00000000..3177893f --- /dev/null +++ b/post/2017-10-28-performance-measurement/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + SJTUG例行分享:系统性能的测量与分析 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG例行分享:系统性能的测量与分析

+

+ October 28, 2017 + +
+ htfy96 + + +
+ Main Library A316 + 2017-10-28T15:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

本周六将由贾枭学长给大家分享系统性能的测量与分析的常用思路与技巧,欢迎大家前来。

+

Slides下载

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2017-11-02-haskell-talk-01/index.html b/post/2017-11-02-haskell-talk-01/index.html new file mode 100644 index 00000000..60a1364a --- /dev/null +++ b/post/2017-11-02-haskell-talk-01/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + Haskell小课堂 01 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Haskell小课堂 01

+

+ November 2, 2017 + +
+ htfy96 + + +
+ Main Library B118 + 2017-11-04T15:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

Haskell 是一门默认惰性求值的纯函数式语言,在 stackoverflow 的统计中它是程序员在夜晚和双休日使用最多的语言。本周六的 Haskell 小课堂将带大家简单了解一下 Haskell 的语法和特性,以及代数数据类型、模式匹配、typeclass 等基础知识,为后续课程作铺垫。本次小课堂旨在从入门到入门,不需要前置知识。

+

本周六下午3:00将由王竹阳同学在新图B118给大家带来Haskell小课堂的第一节课程,欢迎同学们前来探讨。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2018-03-10-intro/index.html b/post/2018-03-10-intro/index.html new file mode 100644 index 00000000..7d397004 --- /dev/null +++ b/post/2018-03-10-intro/index.html @@ -0,0 +1,220 @@ + + + + + + + + + + SJTUG 2018第一次分享:FOSS历史与Web开发入门 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 2018第一次分享:FOSS历史与Web开发入门

+

+ March 10, 2018 + +
+ htfy96 + + +
+ Main Library E210 + 2018-03-10T19:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

本周六(10日)晚7点将在 图书馆主馆 E210 进行本学期第一次分享,欢迎大家带电脑前来参加。内容有:

+
    +
  1. Linux 入门与开源社区 @ 骆铮
  2. +
  3. Python Web Application 开发入门 @ 范舟
  4. +
+

届时会通过teamviewer等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2018-03-31-concatenative-programming/index.html b/post/2018-03-31-concatenative-programming/index.html new file mode 100644 index 00000000..f39aadf2 --- /dev/null +++ b/post/2018-03-31-concatenative-programming/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + SJTUG 2018第二次分享:Concatenative Programming 初探 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 2018第二次分享:Concatenative Programming 初探

+

+ March 26, 2018 + +
+ Evensgn + + +
+ Main Library E216 + 2018-03-31T19:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

本周六(31日)晚 19:00 将在 图书馆主馆 E216 进行本学期第二次分享,欢迎大家带电脑前来参加。本次分享内容为:

+

Concatenative Programming 初探 @ 王竹阳

+

届时会通过teamviewer等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2018-04-22-memory-safety-in-rust/index.html b/post/2018-04-22-memory-safety-in-rust/index.html new file mode 100644 index 00000000..58da2083 --- /dev/null +++ b/post/2018-04-22-memory-safety-in-rust/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + SJTUG 2018 第 3 次分享:Rust 中的内存安全 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 2018 第 3 次分享:Rust 中的内存安全

+

+ April 14, 2018 + +
+ Evensgn + + +
+ Main Library E309 + 2018-04-22T19:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

本周日(22日)晚 19:00 将在 图书馆主馆 E309 进行本学期第 3 次分享,欢迎大家带电脑前来参加。本次分享内容为:

+

Rust 中的内存安全 @ 张宇宁

+

届时会通过teamviewer等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2018-05-12-cooperative-training/index.html b/post/2018-05-12-cooperative-training/index.html new file mode 100644 index 00000000..1a80fc2f --- /dev/null +++ b/post/2018-05-12-cooperative-training/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + SJTUG 2018 第 4 次分享:合作训练(Cooperative Training) · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 2018 第 4 次分享:合作训练(Cooperative Training)

+

+ May 8, 2018 + +
+ Evensgn + + +
+ Main Library E216 + 2018-05-12T19:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

本周六(12日)晚 19:00 将在 图书馆主馆 E216 进行本学期第 4 次分享,欢迎大家带电脑前来参加。本次分享内容为:

+

合作训练:CoT Cooperative Training @ 卢思迪

+

届时会通过 teamviewer、bilibili 直播间 等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2018-06-06-summer-class/index.html b/post/2018-06-06-summer-class/index.html new file mode 100644 index 00000000..78f73852 --- /dev/null +++ b/post/2018-06-06-summer-class/index.html @@ -0,0 +1,274 @@ + + + + + + + + + + SJTUG 2018 暑期课堂预告 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 2018 暑期课堂预告

+

+ June 6, 2018 + +
+ Evensgn + + +
+ + 2018-07-02T18:00:00+08:00 + +
+ + + + news + + summer_school + + + +

+
+ +
+

6-30 Update: 请大家注意,由于社总安排变更,上课地点改为东中院 1-103

+

Update: 课程具体时间地点安排已更新

+
+

报名链接点这里

+

课程安排情况(社总信息):https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA

+
+

SJTUG 本次暑假小学期再次开设了夏季课堂,面向对编程及相关技术感兴趣的同学进行 5~6 次分享,主讲人除 SJTUG 成员外,预计还将邀请在业界的学长做 Guest Talk/Sharing,以下是主要内容预告(暂定,持续更新中):

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
活动时间地点主讲人内容
Tutorial07.03 19:00东中院 1-103@EvensgnGit 使用教学
Sharing07.06 19:00东中院 1-103@littleRound计算机工作原理漫谈
Guest Talk07.10 19:00东中院 1-103周健,依图科技研发总监,上海交大计算机系学士、硕士;亚洲首个世界大学生程序设计竞赛世界冠军从摩尔定律到行星级的智能系统————漫谈 AI 时代的过去、现在和将来
Sharing07.13 19:00东中院 1-103@footoredo浅谈密码学与密码
Sharing07.17 19:00东中院 1-103@茄子(ant_sz)基于 KV Store 的实时多维数据分析
Guest Sharing07.20 19:00东中院 1-103施闻轩,PingCAP 工程师A small bite of Rust
+

欢迎感兴趣的同学们参加!

+

暑期课堂结束之后,所有讲者的 slides 会在我们的Github仓库 公开,欢迎大家 Star~

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2018-12-15-polymorphism-in-cpp/index.html b/post/2018-12-15-polymorphism-in-cpp/index.html new file mode 100644 index 00000000..ab76b6c3 --- /dev/null +++ b/post/2018-12-15-polymorphism-in-cpp/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + SJTUG 技术分享:C++中的运行期与编译期多态 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 技术分享:C++中的运行期与编译期多态

+

+ December 8, 2018 + +
+ Evensgn + + +
+ Tsung-Dao Lee Library 209 + 2018-12-15T19:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

下周六(15日)晚 19:00 将在 李政道图书馆 209 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:

+

C++中的运行期与编译期多态 (Runtime and Compile-Time Polymorphism) in C++ @ 任云玮

+

届时会通过 teamviewer、bilibili 直播间 等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2019-04-01-task-oriented-dialogue/index.html b/post/2019-04-01-task-oriented-dialogue/index.html new file mode 100644 index 00000000..f75b25a1 --- /dev/null +++ b/post/2019-04-01-task-oriented-dialogue/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + SJTUG 技术分享:任务型对话概览 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 技术分享:任务型对话概览

+

+ April 1, 2019 + +
+ Evensgn + + +
+ Main Library E312 + 2019-04-01T19:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

周一(4月1日)晚 19:00 将在 图书馆主馆 E312 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:

+

任务型对话概览 @ 刘啸远

+

届时会通过 teamviewer、bilibili 直播间 等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2019-09-18-build-system/index.html b/post/2019-09-18-build-system/index.html new file mode 100644 index 00000000..333c3f0a --- /dev/null +++ b/post/2019-09-18-build-system/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + SJTUG 技术分享:Build system, lazy evaluation and incremental computation · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 技术分享:Build system, lazy evaluation and incremental computation

+

+ September 12, 2019 + +
+ Evensgn + + +
+ Main Library E216 + 2019-09-18T18:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+

在9月18日我们将会进行一次SJTUG技术分享以及开学吃锅活动!

+

本次带来技术分享的是张震学长,技术分享结束后是吃锅活动,欢迎大家参加技术分享/吃锅/both!

+

技术分享活动时间:9月18日 18:00-19:00 +地点:新图书馆 E216

+

标题:Build system, lazy evaluation and incremental computation

+

摘要:什么是 Build System(构建系统)的本质?工程实践中为什么有 make、bazel 等众多“轮子”?它们之间的区别是什么?Build system 和更为基础的 Lazy Evaluation(惰性求值)和 Incremental Computation(增量计算)这两种紧密联系的计算概念又有何联系?如何在你的开发实践中运用惰性求值和增量计算?这些概念在浏览器布局引擎、自动代码生成等应用里有什么样的应用?这次分享活动将从实际代码出发来探讨这些话题,并思考算法开发的未来趋势。

+

届时会通过 teamviewer、bilibili 直播间 等进行现场直播,slides 会上传到 https://github.com/sjtug/sharing

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2021-03-09-welcome/index.html b/post/2021-03-09-welcome/index.html new file mode 100644 index 00000000..7414730f --- /dev/null +++ b/post/2021-03-09-welcome/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + SJTUG 2021 年春季招新 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 2021 年春季招新

+

+ March 9, 2021 + +
+ skyzh + + +
+ + + + news + + + +

+
+ +
+

SJTUG (上海交通大学 Linux 用户组) 是一个非盈利的技术组织。只要你对 *nix 相关技术感兴趣、有热情,即可成为我们的一员。

+

成为 SJTUG 的一员,即可参与:

+
    +
  • 不定期的技术分享活动。
  • +
  • 不确定的学期吃锅活动。
  • +
  • 参与维护软件源镜像站。(仅限校内成员)
  • +
+

加入 SJTUG 成员所在的讨论组,即可成为 SJTUG 的一员。相关的活动通知也会同步发送到这些位置。目前 SJTUG 的成员主要出现在这些地方:

+
    +
  • SJTUG 微信群。由于群人数即将达到限制,目前仅能通过邀请入群。
  • +
  • 2021 年新建的 QQ 群。群号 715273806。
  • +
  • 电报群。首先,关注 SJTUG 镜像站的通知频道。而后,加入频道关联的群组。
  • +
+

期待您的加入!

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2021-11-20-rust-sharing/index.html b/post/2021-11-20-rust-sharing/index.html new file mode 100644 index 00000000..059f0be1 --- /dev/null +++ b/post/2021-11-20-rust-sharing/index.html @@ -0,0 +1,224 @@ + + + + + + + + + + SJTUG x Naive Systems 11 月吃吃喝喝与技术分享 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG x Naive Systems 11 月吃吃喝喝与技术分享

+

+ November 20, 2021 + +
+ skyzh + + +
+ 电院E咖二楼 + 2021-11-26T18:30:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

下周五 (26日) 18:30 将在电院E咖二楼进行 SJTUG 吃吃喝喝和技术分享活动,欢迎大家参加~

+

本次分享的嘉宾是冷亦君同学,题目是“Use Abella to prove equivalence of datalog rules in Polonius (the new Rust borrow checker)”。 +届时现场会提供小吃、SJTUG 贴纸、以及来自 Naive Systems 的纪念品。感谢 Naive Systems 对本次活动的赞助!活动安排如下:

+
    +
  • 18:30 - 19:30 技术分享时间
  • +
  • 19:30 - 20:30 小吃和闲聊时间
  • +
+

电院E咖的位置在电子信息与电气工程学院 2 号楼和 3 号楼之间。

+

本次分享没有直播,下次一定。slides 已经上传到 https://github.com/sjtug/sharing

+

in-event

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/2023-06-19-hpc-llm-train/index.html b/post/2023-06-19-hpc-llm-train/index.html new file mode 100644 index 00000000..aa467028 --- /dev/null +++ b/post/2023-06-19-hpc-llm-train/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + SJTUG x 交大超算 6 月吃吃喝喝与技术分享 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG x 交大超算 6 月吃吃喝喝与技术分享

+

+ June 19, 2023 + +
+ lightquantum + + +
+ 电院E咖三楼 + 2023-06-19T14:00:00+08:00 + +
+ + + + news + + sharing + + + +

+
+ +
+ +
+ +
+

本周一 (19日) 14:00 在电院E咖三楼进行的 SJTUG 吃吃喝喝和技术分享活动圆满结束~

+

本次分享的嘉宾是方禹舜同学,题目是“面向超算集群的大语言模型并行训练初探”,活动中探讨了如何突破计算和内存资源的限制,采用并行化方法训练以大语言模型为首的各类大规模模型,并简短介绍了上海交通大学学生超算队的活动及相关超算赛事。

+

现场提供了小吃以及 SJTUG 贴纸。日后的吃吃喝喝活动不出意外也会继续提供以上福利,欢迎蹭饭!感谢 交大网络信息中心(交大高性能计算中心) 对本次活动的赞助!

+

本次分享在 b 站上进行了直播,录播已经上传到 Dropbox。slides 已经上传到 https://github.com/sjtug/sharing

+

in-event

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/creating-a-new-theme/index.html b/post/creating-a-new-theme/index.html new file mode 100644 index 00000000..14d3205e --- /dev/null +++ b/post/creating-a-new-theme/index.html @@ -0,0 +1,989 @@ + + + + + + + + + + Creating a New Theme · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Creating a New Theme

+

+ September 28, 2014 + +
+ Michael Henderson + + +
+ +

+
+ +
+

Introduction

+

This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I’ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won’t cover using CSS to style your theme.

+

We’ll start with creating a new site with a very basic template. Then we’ll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.

+

In this tutorial, commands that you enter will start with the “$” prompt. The output will follow. Lines that start with “#” are comments that I’ve added to explain a point. When I show updates to a file, the “:wq” on the last line means to save the file.

+

Here’s an example:

+
package main
+
+import "fmt"
+
+func main() {
+    fmt.Print("Hello")
+}
+
+

There are a few concepts that you need to understand before creating a theme.

+
+

Skins

+

Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.

+

You have two ways to create a skin. The simplest way is to create it in the layouts/ directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the layouts/ directory so it will always find the skin.

+

Your second choice is to create it in a sub-directory of the themes/ directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?

+

The difference between creating a skin in layouts/ and creating it in themes/ is very subtle. A skin in layouts/ can’t be customized without updating the templates and static files that it is built from. A skin created in themes/, on the other hand, can be and that makes it easier for other people to use it.

+

The rest of this tutorial will call a skin created in the themes/ directory a theme.

+

Note that you can use this tutorial to create a skin in the layouts/ directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.

+

The Home Page

+

The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.

+

Site Configuration File

+

When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it.

+

Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your content/ directory and template files in your themes/ directory. It will create HTML files in your public/ directory. You can change this by specifying alternate locations in the configuration file.

+

Content

+

Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.

+

Front Matter

+

The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “+++”, YAML by “---”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON.

+

The information in the front matter is passed into the template before the content is rendered into HTML.

+

Markdown

+

Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.

+

Template Files

+

Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it’s published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.

+

There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.

+

Hugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site.

+

Please note that you can use the front matter to influence Hugo’s choice of templates.

+

Single Template

+

A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.

+

List Template

+

A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.

+

The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.

+

Partial Template

+

A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.

+

Create a New Site

+

Let’s use Hugo to create a new web site. I’m a Mac user, so I’ll create mine in my home directory, in the Sites folder. If you’re using Linux, you might have to create the folder first.

+

The “new site” command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.

+
$ hugo new site ~/Sites/zafta
+$ cd ~/Sites/zafta
+$ ls -l
+total 8
+drwxr-xr-x  7 quoha  staff  238 Sep 29 16:49 .
+drwxr-xr-x  3 quoha  staff  102 Sep 29 16:49 ..
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 archetypes
+-rw-r--r--  1 quoha  staff   82 Sep 29 16:49 config.toml
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 content
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 layouts
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 static
+$
+

Take a look in the content/ directory to confirm that it is empty.

+

The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That’s a topic for a different tutorial, so please ignore them for now.

+

Generate the HTML For the New Site

+

Running the hugo command with no options will read all the available content and generate the HTML files. It will also copy all static files (that’s everything that’s not content). Since we have an empty site, it won’t do much, but it will do it very quickly.

+
$ hugo --verbose
+INFO: 2014/09/29 Using config file: config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+0 draft content 
+0 future content 
+0 pages created 
+0 tags created
+0 categories created
+in 2 ms
+$ 
+

The “--verbose” flag gives extra information that will be helpful when we build the template. Every line of the output that starts with “INFO:” or “WARN:” is present because we used that flag. The lines that start with “WARN:” are warning messages. We’ll go over them later.

+

We can verify that the command worked by looking at the directory again.

+
$ ls -l
+total 8
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 archetypes
+-rw-r--r--  1 quoha  staff   82 Sep 29 16:49 config.toml
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 content
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 layouts
+drwxr-xr-x  4 quoha  staff  136 Sep 29 17:02 public
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 static
+$
+

See that new public/ directory? Hugo placed all generated content there. When you’re ready to publish your web site, that’s the place to start. For now, though, let’s just confirm that we have what we’d expect from a site with no content.

+
$ ls -l public
+total 16
+-rw-r--r--  1 quoha  staff  416 Sep 29 17:02 index.xml
+-rw-r--r--  1 quoha  staff  262 Sep 29 17:02 sitemap.xml
+$ 
+

Hugo created two XML files, which is standard, but there are no HTML files.

+

Test the New Site

+

Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the “server” command. If it is successful, you will see output similar to the following:

+
$ hugo server --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+0 draft content 
+0 future content 
+0 pages created 
+0 tags created
+0 categories created
+in 2 ms
+Serving pages from /Users/quoha/Sites/zafta/public
+Web Server is available at http://localhost:1313
+Press Ctrl+C to stop
+

Connect to the listed URL (it’s on the line that starts with “Web Server”). If everything is working correctly, you should get a page that shows the following:

+
index.xml
+sitemap.xml
+

That’s a listing of your public/ directory. Hugo didn’t create a home page because our site has no content. When there’s no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.

+

Let’s go back and look at those warnings again.

+
WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+WARN: 2014/09/29 Unable to locate layout: [404.html]
+

That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.

+

Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page.

+

I like that the verbose flag causes Hugo to list the files that it’s searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we’ll cover later that explain the names and paths. For now, just remember that Hugo couldn’t find a template for the home page and it told you so.

+

At this point, you’ve got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it.

+

Create a New Theme

+

Hugo doesn’t ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.

+

We’re going to create a new theme called “zafta.” Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.

+

All themes have opinions on content and layout. For example, Zafta uses “post” over “blog”. Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.

+

Create a Skeleton

+

Use the hugo “new” command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.

+
$ hugo new theme zafta
+
+$ ls -l
+total 8
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 archetypes
+-rw-r--r--  1 quoha  staff   82 Sep 29 16:49 config.toml
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 content
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 layouts
+drwxr-xr-x  4 quoha  staff  136 Sep 29 17:02 public
+drwxr-xr-x  2 quoha  staff   68 Sep 29 16:49 static
+drwxr-xr-x  3 quoha  staff  102 Sep 29 17:31 themes
+
+$ find themes -type f | xargs ls -l
+-rw-r--r--  1 quoha  staff  1081 Sep 29 17:31 themes/zafta/LICENSE.md
+-rw-r--r--  1 quoha  staff     0 Sep 29 17:31 themes/zafta/archetypes/default.md
+-rw-r--r--  1 quoha  staff     0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+-rw-r--r--  1 quoha  staff     0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+-rw-r--r--  1 quoha  staff     0 Sep 29 17:31 themes/zafta/layouts/index.html
+-rw-r--r--  1 quoha  staff     0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
+-rw-r--r--  1 quoha  staff     0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
+-rw-r--r--  1 quoha  staff    93 Sep 29 17:31 themes/zafta/theme.toml
+$ 
+

The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.

+

Please take a minute to fill out the theme.toml and LICENSE.md files. They’re optional, but if you’re going to be distributing your theme, it tells the world who to praise (or blame). It’s also nice to declare the license so that people will know how they can use the theme.

+
$ vi themes/zafta/theme.toml
+author = "michael d henderson"
+description = "a minimal working template"
+license = "MIT"
+name = "zafta"
+source_repo = ""
+tags = ["tags", "categories"]
+:wq
+
+## also edit themes/zafta/LICENSE.md and change
+## the bit that says "YOUR_NAME_HERE"
+

Note that the the skeleton’s template files are empty. Don’t worry, we’ll be changing that shortly.

+
$ find themes/zafta -name '*.html' | xargs ls -l
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 themes/zafta/layouts/index.html
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 themes/zafta/layouts/partials/header.html
+$
+

Update the Configuration File to Use the Theme

+

Now that we’ve got a theme to work with, it’s a good idea to add the theme name to the configuration file. This is optional, because you can always add “-t zafta” on all your commands. I like to put it the configuration file because I like shorter command lines. If you don’t put it in the configuration file or specify it on the command line, you won’t use the template that you’re expecting to.

+

Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.

+
$ vi config.toml
+theme = "zafta"
+baseurl = ""
+languageCode = "en-us"
+title = "zafta - totally refreshing"
+MetaDataFormat = "toml"
+:wq
+
+$
+

Generate the Site

+

Now that we have an empty theme, let’s generate the site again.

+
$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+0 pages created 
+0 tags created
+0 categories created
+in 2 ms
+$
+

Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme’s directory.

+

Let’s check the public/ directory to see what Hugo’s created.

+
$ ls -l public
+total 16
+drwxr-xr-x  2 quoha  staff   68 Sep 29 17:56 css
+-rw-r--r--  1 quoha  staff    0 Sep 29 17:56 index.html
+-rw-r--r--  1 quoha  staff  407 Sep 29 17:56 index.xml
+drwxr-xr-x  2 quoha  staff   68 Sep 29 17:56 js
+-rw-r--r--  1 quoha  staff  243 Sep 29 17:56 sitemap.xml
+$
+

Notice four things:

+
    +
  1. Hugo created a home page. This is the file public/index.html.
  2. +
  3. Hugo created a css/ directory.
  4. +
  5. Hugo created a js/ directory.
  6. +
  7. Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn’t create any pages. That’s because it considers a “page” to be a file created directly from a content file. It doesn’t count things like the index.html files that it creates automatically.
  8. +
+

The Home Page

+

Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo’s warning message shows that it looks for three different templates:

+
WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html]
+

If it can’t find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.

+

When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.

+
$ find . -name index.html | xargs ls -l
+-rw-r--r--  1 quoha  staff  0 Sep 29 20:21 ./public/index.html
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 ./themes/zafta/layouts/index.html
+$ 
+

The Magic of Static

+

Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.

+

Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo’s opinion is that you’ll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don’t like that, you can change the directory names in your theme directory or even delete them completely. Hugo’s nice enough to offer its opinion, then behave nicely if you disagree.

+
$ find themes/zafta -type d | xargs ls -ld
+drwxr-xr-x  7 quoha  staff  238 Sep 29 17:38 themes/zafta
+drwxr-xr-x  3 quoha  staff  102 Sep 29 17:31 themes/zafta/archetypes
+drwxr-xr-x  5 quoha  staff  170 Sep 29 17:31 themes/zafta/layouts
+drwxr-xr-x  4 quoha  staff  136 Sep 29 17:31 themes/zafta/layouts/_default
+drwxr-xr-x  4 quoha  staff  136 Sep 29 17:31 themes/zafta/layouts/partials
+drwxr-xr-x  4 quoha  staff  136 Sep 29 17:31 themes/zafta/static
+drwxr-xr-x  2 quoha  staff   68 Sep 29 17:31 themes/zafta/static/css
+drwxr-xr-x  2 quoha  staff   68 Sep 29 17:31 themes/zafta/static/js
+$ 
+

The Theme Development Cycle

+

When you’re working on a theme, you will make changes in the theme’s directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:

+
    +
  1. Purge the public/ directory.
  2. +
  3. Run the built in web server in watch mode.
  4. +
  5. Open your site in a browser.
  6. +
  7. Update the theme.
  8. +
  9. Glance at your browser window to see changes.
  10. +
  11. Return to step 4.
  12. +
+

I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.

+

Check the main Hugo site for information on using Git with Hugo.

+

Purge the public/ Directory

+

When generating the site, Hugo will create new files and update existing ones in the public/ directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.

+

Note: If you’re building on an SSD, you should ignore this. Churning on a SSD can be costly.

+

Hugo’s Watch Option

+

Hugo’s “--watch” option will monitor the content/ and your theme directories for changes and rebuild the site automatically.

+

Live Reload

+

Hugo’s built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, “Wow, that’s totally amazing.”

+

Development Commands

+

Use the following commands as the basis for your workflow.

+
## purge old files. hugo will recreate the public directory.
+##
+$ rm -rf public
+##
+## run hugo in watch mode
+##
+$ hugo server --watch --verbose
+

Here’s sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I’ve said this before, it’s amazing.

+
$ rm -rf public
+$ hugo server --watch --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+0 pages created 
+0 tags created
+0 categories created
+in 2 ms
+Watching for changes in /Users/quoha/Sites/zafta/content
+Serving pages from /Users/quoha/Sites/zafta/public
+Web Server is available at http://localhost:1313
+Press Ctrl+C to stop
+INFO: 2014/09/29 File System Event: ["/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html": MODIFY|ATTRIB]
+Change detected, rebuilding site
+
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+0 pages created 
+0 tags created
+0 categories created
+in 1 ms
+

Update the Home Page Template

+

The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme’s layout/ directory:

+
    +
  1. index.html
  2. +
  3. _default/list.html
  4. +
  5. _default/single.html
  6. +
+

We could update one of the default templates, but a good design decision is to update the most specific template available. That’s not a hard and fast rule (in fact, we’ll break it a few times in this tutorial), but it is a good generalization.

+

Make a Static Home Page

+

Right now, that page is empty because we don’t have any content and we don’t have any logic in the template. Let’s change that by adding some text to the template.

+
$ vi themes/zafta/layouts/index.html
+<!DOCTYPE html> 
+<html> 
+<body> 
+  <p>hugo says hello!</p> 
+</body> 
+</html> 
+:wq
+
+$
+

Build the web site and then verify the results.

+
$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+0 pages created 
+0 tags created
+0 categories created
+in 2 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r--  1 quoha  staff  78 Sep 29 21:26 public/index.html
+
+$ cat public/index.html 
+<!DOCTYPE html> 
+<html> 
+<body> 
+  <p>hugo says hello!</p> 
+</html>
+

Live Reload

+

Note: If you’re running the server with the --watch option, you’ll see different content in the file:

+
$ cat public/index.html 
+<!DOCTYPE html> 
+<html> 
+<body> 
+  <p>hugo says hello!</p> 
+<script>document.write('<script src="http://' 
+        + (location.host || 'localhost').split(':')[0] 
+    + ':1313/livereload.js?mindelay=10"></' 
+        + 'script>')</script></body> 
+</html>
+

When you use --watch, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.

+

Build a “Dynamic” Home Page

+

“Dynamic home page?” Hugo’s a static web site generator, so this seems an odd thing to say. I mean let’s have the home page automatically reflect the content in the site every time Hugo builds it. We’ll use iteration in the template to do that.

+

Create New Posts

+

Now that we have the home page generating static content, let’s add some content to the site. We’ll display these posts as a list on the home page and on their own page, too.

+

Hugo has a command to generate a skeleton post, just like it does for sites and themes.

+
$ hugo --verbose new post/first.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create  post/first.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md
+ERROR: 2014/09/29 Unable to Cast <nil> to map[string]interface{}
+
+$ 
+

That wasn’t very nice, was it?

+

The “new” command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there’s a theme. For me, the workaround was to create an archetypes file specifically for the post type.

+
$ vi themes/zafta/archetypes/post.md
++++
+Description = ""
+Tags = []
+Categories = []
++++
+:wq
+
+$ find themes/zafta/archetypes -type f | xargs ls -l
+-rw-r--r--  1 quoha  staff   0 Sep 29 21:53 themes/zafta/archetypes/default.md
+-rw-r--r--  1 quoha  staff  51 Sep 29 21:54 themes/zafta/archetypes/post.md
+
+$ hugo --verbose new post/first.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create  post/first.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
+INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md
+/Users/quoha/Sites/zafta/content/post/first.md created
+
+$ hugo --verbose new post/second.md
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 attempting to create  post/second.md of post
+INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md
+INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md
+/Users/quoha/Sites/zafta/content/post/second.md created
+
+$ ls -l content/post
+total 16
+-rw-r--r--  1 quoha  staff  104 Sep 29 21:54 first.md
+-rw-r--r--  1 quoha  staff  105 Sep 29 21:57 second.md
+
+$ cat content/post/first.md 
++++
+Categories = []
+Description = ""
+Tags = []
+date = "2014-09-29T21:54:53-05:00"
+title = "first"
+
++++
+my first post
+
+$ cat content/post/second.md 
++++
+Categories = []
+Description = ""
+Tags = []
+date = "2014-09-29T21:57:09-05:00"
+title = "second"
+
++++
+my second post
+
+$ 
+

Build the web site and then verify the results.

+
$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"category":"categories", "tag":"tags"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+2 pages created 
+0 tags created
+0 categories created
+in 4 ms
+$
+

The output says that it created 2 pages. Those are our new posts:

+
$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r--  1 quoha  staff  78 Sep 29 22:13 public/index.html
+-rw-r--r--  1 quoha  staff   0 Sep 29 22:13 public/post/first/index.html
+-rw-r--r--  1 quoha  staff   0 Sep 29 22:13 public/post/index.html
+-rw-r--r--  1 quoha  staff   0 Sep 29 22:13 public/post/second/index.html
+$
+

The new files are empty because because the templates used to generate the content are empty. The homepage doesn’t show the new content, either. We have to update the templates to add the posts.

+

List and Single Templates

+

In Hugo, we have three major kinds of templates. There’s the home page template that we updated previously. It is used only by the home page. We also have “single” templates which are used to generate output for a single content file. We also have “list” templates that are used to group multiple pieces of content before generating output.

+

Generally speaking, list templates are named “list.html” and single templates are named “single.html.”

+

There are three other types of templates: partials, content views, and terms. We will not go into much detail on these.

+

Add Content to the Homepage

+

The home page will contain a list of posts. Let’s update its template to add the posts that we just created. The logic in the template will run every time we build the site.

+
$ vi themes/zafta/layouts/index.html 
+<!DOCTYPE html>
+<html>
+<body>
+  {{ range first 10 .Data.Pages }}
+    <h1>{{ .Title }}</h1>
+  {{ end }}
+</body>
+</html>
+:wq
+
+$
+

Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between “{{” and “}}”. In our template, the commands are:

+
    +
  1. range
  2. +
  3. .Title
  4. +
  5. end
  6. +
+

The “range” command is an iterator. We’re going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.

+

The “.Title” command prints the value of the “title” variable. Hugo pulls it from the front matter in the Markdown file.

+

The “end” command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds “end.” Everything between the “range” and “end” is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.

+

It’s helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.

+

Build the web site and then verify the results.

+
$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+2 pages created 
+0 tags created
+0 categories created
+in 4 ms
+$ find public -type f -name '*.html' | xargs ls -l 
+-rw-r--r--  1 quoha  staff  94 Sep 29 22:23 public/index.html
+-rw-r--r--  1 quoha  staff   0 Sep 29 22:23 public/post/first/index.html
+-rw-r--r--  1 quoha  staff   0 Sep 29 22:23 public/post/index.html
+-rw-r--r--  1 quoha  staff   0 Sep 29 22:23 public/post/second/index.html
+$ cat public/index.html 
+<!DOCTYPE html>
+<html>
+<body>
+  
+    <h1>second</h1>
+  
+    <h1>first</h1>
+  
+</body>
+</html>
+$
+

Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let’s take a moment to appreciate what we’ve done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you’ve learned everything you need to know to build a theme. All that’s really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.

+

And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don’t worry, though, that’s all to come.

+

Add Content to the Posts

+

We’re working with posts, which are in the content/post/ directory. That means that their section is “post” (and if we don’t do something weird, their type is also “post”).

+

Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can’t find one, then it will look in the _default/ directory. There are some twists that we’ll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.

+

Now that we know the search rule, let’s see what we actually have available:

+
$ find themes/zafta -name single.html | xargs ls -l
+-rw-r--r--  1 quoha  staff  132 Sep 29 17:31 themes/zafta/layouts/_default/single.html
+

We could create a new template, post/single.html, or change the default. Since we don’t know of any other content types, let’s start with updating the default.

+

Remember, any content that we haven’t created a template for will end up using this template. That can be good or bad. Bad because I know that we’re going to be adding different types of content and we’re going to end up undoing some of the changes we’ve made. It’s good because we’ll be able to see immediate results. It’s also good to start here because we can start to build the basic layout for the site. As we add more content types, we’ll refactor this file and move logic around. Hugo makes that fairly painless, so we’ll accept the cost and proceed.

+

Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you’re building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That’s a refreshing amount of joy right there.

+

Update the Template File

+
$ vi themes/zafta/layouts/_default/single.html 
+<!DOCTYPE html>
+<html>
+<head>
+  <title>{{ .Title }}</title>
+</head>
+<body>
+  <h1>{{ .Title }}</h1>
+  {{ .Content }}
+</body>
+</html>
+:wq
+
+$
+

Build the web site and verify the results.

+
$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+2 pages created 
+0 tags created
+0 categories created
+in 4 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r--  1 quoha  staff   94 Sep 29 22:40 public/index.html
+-rw-r--r--  1 quoha  staff  125 Sep 29 22:40 public/post/first/index.html
+-rw-r--r--  1 quoha  staff    0 Sep 29 22:40 public/post/index.html
+-rw-r--r--  1 quoha  staff  128 Sep 29 22:40 public/post/second/index.html
+
+$ cat public/post/first/index.html 
+<!DOCTYPE html>
+<html>
+<head>
+  <title>first</title>
+</head>
+<body>
+  <h1>first</h1>
+  <p>my first post</p>
+
+</body>
+</html>
+
+$ cat public/post/second/index.html 
+<!DOCTYPE html>
+<html>
+<head>
+  <title>second</title>
+</head>
+<body>
+  <h1>second</h1>
+  <p>my second post</p>
+
+</body>
+</html>
+$
+

Notice that the posts now have content. You can go to localhost:1313/post/first to verify.

+

Linking to Content

+

The posts are on the home page. Let’s add a link from there to the post. Since this is the home page, we’ll update its template.

+
$ vi themes/zafta/layouts/index.html
+<!DOCTYPE html>
+<html>
+<body>
+  {{ range first 10 .Data.Pages }}
+    <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+  {{ end }}
+</body>
+</html>
+

Build the web site and verify the results.

+
$ rm -rf public
+$ hugo --verbose
+INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/
+INFO: 2014/09/29 found taxonomies: map[string]string{"tag":"tags", "category":"categories"}
+WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html]
+0 draft content 
+0 future content 
+2 pages created 
+0 tags created
+0 categories created
+in 4 ms
+
+$ find public -type f -name '*.html' | xargs ls -l
+-rw-r--r--  1 quoha  staff  149 Sep 29 22:44 public/index.html
+-rw-r--r--  1 quoha  staff  125 Sep 29 22:44 public/post/first/index.html
+-rw-r--r--  1 quoha  staff    0 Sep 29 22:44 public/post/index.html
+-rw-r--r--  1 quoha  staff  128 Sep 29 22:44 public/post/second/index.html
+
+$ cat public/index.html 
+<!DOCTYPE html>
+<html>
+<body>
+  
+    <h1><a href="/post/second/">second</a></h1>
+  
+    <h1><a href="/post/first/">first</a></h1>
+  
+</body>
+</html>
+
+$
+

Create a Post Listing

+

We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let’s make it show a list of all posts (not just the first ten).

+

We need to decide which template to update. This will be a listing, so it should be a list template. Let’s take a quick look and see which list templates are available.

+
$ find themes/zafta -name list.html | xargs ls -l
+-rw-r--r--  1 quoha  staff  0 Sep 29 17:31 themes/zafta/layouts/_default/list.html
+

As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don’t have multiple content types, so let’s stay consistent and update the default list template.

+

Creating Top Level Pages

+

Let’s add an “about” page and display it at the top level (as opposed to a sub-level like we did with posts).

+

The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let’s verify that by creating an “about” page at the top level:

+
$ vi content/about.md 
++++
+title = "about"
+description = "about this site"
+date = "2014-09-27"
+slug = "about time"
++++
+
+## about us
+
+i'm speechless
+:wq
+

Generate the web site and verify the results.

+
$ find public -name '*.html' | xargs ls -l
+-rw-rw-r--  1 mdhender  staff   334 Sep 27 15:08 public/about-time/index.html
+-rw-rw-r--  1 mdhender  staff   527 Sep 27 15:08 public/index.html
+-rw-rw-r--  1 mdhender  staff   358 Sep 27 15:08 public/post/first-post/index.html
+-rw-rw-r--  1 mdhender  staff     0 Sep 27 15:08 public/post/index.html
+-rw-rw-r--  1 mdhender  staff   342 Sep 27 15:08 public/post/second-post/index.html
+

Notice that the page wasn’t created at the top level. It was created in a sub-directory named ‘about-time/’. That name came from our slug. Hugo will use the slug to name the generated content. It’s a reasonable default, by the way, but we can learn a few things by fighting it for this file.

+

One other thing. Take a look at the home page.

+
$ cat public/index.html
+<!DOCTYPE html>
+<html>
+<body>
+    <h1><a href="http://localhost:1313/post/theme/">creating a new theme</a></h1>
+    <h1><a href="http://localhost:1313/about-time/">about</a></h1>
+    <h1><a href="http://localhost:1313/post/second-post/">second</a></h1>
+    <h1><a href="http://localhost:1313/post/first-post/">first</a></h1>
+<script>document.write('<script src="http://'
+        + (location.host || 'localhost').split(':')[0]
+		+ ':1313/livereload.js?mindelay=10"></'
+        + 'script>')</script></body>
+</html>
+

Notice that the “about” link is listed with the posts? That’s not desirable, so let’s change that first.

+
$ vi themes/zafta/layouts/index.html
+<!DOCTYPE html>
+<html>
+<body>
+  <h1>posts</h1>
+  {{ range first 10 .Data.Pages }}
+    {{ if eq .Type "post"}}
+      <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+    {{ end }}
+  {{ end }}
+
+  <h1>pages</h1>
+  {{ range .Data.Pages }}
+    {{ if eq .Type "page" }}
+      <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+    {{ end }}
+  {{ end }}
+</body>
+</html>
+:wq
+

Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.

+

But, that about page still renders to about-time/index.html.

+
$ find public -name '*.html' | xargs ls -l
+-rw-rw-r--  1 mdhender  staff    334 Sep 27 15:33 public/about-time/index.html
+-rw-rw-r--  1 mdhender  staff    645 Sep 27 15:33 public/index.html
+-rw-rw-r--  1 mdhender  staff    358 Sep 27 15:33 public/post/first-post/index.html
+-rw-rw-r--  1 mdhender  staff      0 Sep 27 15:33 public/post/index.html
+-rw-rw-r--  1 mdhender  staff    342 Sep 27 15:33 public/post/second-post/index.html
+

Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let’s do it the hard way and change the permalink in the configuration file.

+
$ vi config.toml
+[permalinks]
+	page = "/:title/"
+	about = "/:filename/"
+

Generate the web site and verify that this didn’t work. Hugo lets “slug” or “URL” override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.

+

Sharing Templates

+

If you’ve been following along, you probably noticed that posts have titles in the browser and the home page doesn’t. That’s because we didn’t put the title in the home page’s template (layouts/index.html). That’s an easy thing to do, but let’s look at a different option.

+

We can put the common bits into a shared template that’s stored in the themes/zafta/layouts/partials/ directory.

+ +

In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme’s presentation.

+
$ vi themes/zafta/layouts/partials/header.html
+<!DOCTYPE html>
+<html>
+<head>
+	<title>{{ .Title }}</title>
+</head>
+<body>
+:wq
+
+$ vi themes/zafta/layouts/partials/footer.html
+</body>
+</html>
+:wq
+

Update the Home Page Template to Use the Partials

+

The most noticeable difference between a template call and a partials call is the lack of path:

+
{{ template "theme/partials/header.html" . }}
+

versus

+
{{ partial "header.html" . }}
+

Both pass in the context.

+

Let’s change the home page template to use these new partials.

+
$ vi themes/zafta/layouts/index.html
+{{ partial "header.html" . }}
+
+  <h1>posts</h1>
+  {{ range first 10 .Data.Pages }}
+    {{ if eq .Type "post"}}
+      <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+    {{ end }}
+  {{ end }}
+
+  <h1>pages</h1>
+  {{ range .Data.Pages }}
+    {{ if or (eq .Type "page") (eq .Type "about") }}
+      <h2><a href="{{ .Permalink }}">{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}</a></h2>
+    {{ end }}
+  {{ end }}
+
+{{ partial "footer.html" . }}
+:wq
+

Generate the web site and verify the results. The title on the home page is now “your title here”, which comes from the “title” variable in the config.toml file.

+

Update the Default Single Template to Use the Partials

+
$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+  <h1>{{ .Title }}</h1>
+  {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+

Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.

+

Add “Date Published” to Posts

+

It’s common to have posts display the date that they were written or published, so let’s add that. The front matter of our posts has a variable named “date.” It’s usually the date the content was created, but let’s pretend that’s the value we want to display.

+

Add “Date Published” to the Template

+

We’ll start by updating the template used to render the posts. The template code will look like:

+
{{ .Date.Format "Mon, Jan 2, 2006" }}
+

Posts use the default single template, so we’ll change that file.

+
$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+  <h1>{{ .Title }}</h1>
+  <h2>{{ .Date.Format "Mon, Jan 2, 2006" }}</h2>
+  {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+

Generate the web site and verify the results. The posts now have the date displayed in them. There’s a problem, though. The “about” page also has the date displayed.

+

As usual, there are a couple of ways to make the date display only on posts. We could do an “if” statement like we did on the home page. Another way would be to create a separate template for posts.

+

The “if” solution works for sites that have just a couple of content types. It aligns with the principle of “code for today,” too.

+

Let’s assume, though, that we’ve made our site so complex that we feel we have to create a new template type. In Hugo-speak, we’re going to create a section template.

+

Let’s restore the default single template before we forget.

+
$ mkdir themes/zafta/layouts/post
+$ vi themes/zafta/layouts/_default/single.html
+{{ partial "header.html" . }}
+
+  <h1>{{ .Title }}</h1>
+  {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+

Now we’ll update the post’s version of the single template. If you remember Hugo’s rules, the template engine will use this version over the default.

+
$ vi themes/zafta/layouts/post/single.html
+{{ partial "header.html" . }}
+
+  <h1>{{ .Title }}</h1>
+  <h2>{{ .Date.Format "Mon, Jan 2, 2006" }}</h2>
+  {{ .Content }}
+
+{{ partial "footer.html" . }}
+:wq
+
+

Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn’t.

+

Don’t Repeat Yourself

+

DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you’re figuring that out, accept that you’ll be doing some refactoring. Hugo makes that easy and fast, so it’s okay to delay splitting up a template.

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/goisforlovers/index.html b/post/goisforlovers/index.html new file mode 100644 index 00000000..cf9203a7 --- /dev/null +++ b/post/goisforlovers/index.html @@ -0,0 +1,442 @@ + + + + + + + + + + (Hu)go Template Primer · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

(Hu)go Template Primer

+

+ April 2, 2014 + + +
+ + + + go + + golang + + templates + + themes + + development + + + +

+
+ +
+

Hugo uses the excellent go html/template library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.

+

This document is a brief primer on using go templates. The go docs +provide more details.

+

Introduction to Go Templates

+

Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.

+

A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the go docs.

+

Basic Syntax

+

Go lang templates are html files with the addition of variables and +functions.

+

Go variables and functions are accessible within {{ }}

+

Accessing a predefined variable “foo”:

+
{{ foo }}
+
+

Parameters are separated using spaces

+

Calling the add function with input of 1, 2:

+
{{ add 1 2 }}
+
+

Methods and fields are accessed via dot notation

+

Accessing the Page Parameter “bar”

+
{{ .Params.bar }}
+
+

Parentheses can be used to group items together

+
{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
+
+

Variables

+

Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +variables page.

+

A variable is accessed by referencing the variable name.

+
<title>{{ .Title }}</title>
+
+

Variables can also be defined and referenced.

+
{{ $address := "123 Main St."}}
+{{ $address }}
+
+

Functions

+

Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. Hugo template +functions provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.

+

Example:

+
{{ add 1 2 }}
+
+

Includes

+

When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.

+

Example:

+
{{ template "chrome/header.html" . }}
+
+

Logic

+

Go templates provide the most basic iteration and conditional logic.

+

Iteration

+

Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.

+

Example 1: Using Context

+
{{ range array }} 
+    {{ . }}
+{{ end }}
+
+

Example 2: Declaring value variable name

+
{{range $element := array}} 
+    {{ $element }} 
+{{ end }}
+
+

Example 2: Declaring key and value variable name

+
{{range $index, $element := array}}
+    {{ $index }} 
+    {{ $element }} 
+{{ end }}
+
+

Conditionals

+

If, else, with, or, & and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with end.

+

Go Templates treat the following values as false:

+
    +
  • false
  • +
  • 0
  • +
  • any array, slice, map, or string of length zero
  • +
+

Example 1: If

+
{{ if isset .Params "title" }}<h4>{{ index .Params "title" }}</h4>{{ end }}
+
+

Example 2: If -> Else

+
{{ if isset .Params "alt" }} 
+    {{ index .Params "alt" }}
+{{else}}
+    {{ index .Params "caption" }}
+{{ end }}
+
+

Example 3: And & Or

+
{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
+
+

Example 4: With

+

An alternative way of writing “if” and then referencing the same value +is to use “with” instead. With rebinds the context . within its scope, +and skips the block if the variable is absent.

+

The first example above could be simplified as:

+
{{ with .Params.title }}<h4>{{ . }}</h4>{{ end }}
+
+

Example 5: If -> Else If

+
{{ if isset .Params "alt" }} 
+    {{ index .Params "alt" }}
+{{ else if isset .Params "caption" }}
+    {{ index .Params "caption" }}
+{{ end }}
+
+

Pipes

+

One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline’s output becomes the +input of the following pipe.

+

Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.

+

A few simple examples should help convey how to use the pipe.

+

Example 1 :

+
{{ if eq 1 1 }} Same {{ end }}
+
+

is the same as

+
{{ eq 1 1 | if }} Same {{ end }}
+
+

It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.

+

Example 2 :

+
{{ index .Params "disqus_url" | html }}
+
+

Access the page parameter called “disqus_url” and escape the HTML.

+

Example 3 :

+
{{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
+Stuff Here
+{{ end }}
+
+

Could be rewritten as

+
{{  isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" | if }}
+Stuff Here 
+{{ end }}
+
+

Context (aka. the dot)

+

The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.

+

Example:

+
  {{ $title := .Site.Title }}
+  {{ range .Params.tags }}
+    <li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a> - {{ $title }} </li>
+  {{ end }}
+
+

Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.

+

Hugo Parameters

+

Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.

+

Using Content (page) Parameters

+

In each piece of content you can provide variables to be used by the +templates. This happens in the front matter.

+

An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn’t make a lot of sense. We’ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.

+

Here is the example front matter:

+
---
+title: "Permalinks"
+date: "2013-11-18"
+aliases:
+  - "/doc/permalinks/"
+groups: ["extras"]
+groups_weight: 30
+notoc: true
+---
+

Here is the corresponding code inside of the template:

+
  {{ if not .Params.notoc }}
+    <div id="toc" class="well col-md-4 col-sm-6">
+    {{ .TableOfContents }}
+    </div>
+  {{ end }}
+
+

Using Site (config) Parameters

+

In your top-level configuration file (eg, config.yaml) you can define site +parameters, which are values which will be available to you in chrome.

+

For instance, you might declare:

+
params:
+  CopyrightHTML: "Copyright &#xA9; 2013 John Doe. All Rights Reserved."
+  TwitterUser: "spf13"
+  SidebarRecentLimit: 5
+

Within a footer layout, you might then declare a <footer> which is only +provided if the CopyrightHTML parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.

+
{{if .Site.Params.CopyrightHTML}}<footer>
+<div class="text-center">{{.Site.Params.CopyrightHTML | safeHtml}}</div>
+</footer>{{end}}
+

An alternative way of writing the “if” and then referencing the same value +is to use “with” instead. With rebinds the context . within its scope, +and skips the block if the variable is absent:

+
{{with .Site.Params.TwitterUser}}<span class="twitter">
+<a href="https://twitter.com/{{.}}" rel="author">
+<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
+ alt="Twitter"></a>
+</span>{{end}}
+

Finally, if you want to pull “magic constants” out of your layouts, you can do +so, such as in this example:

+
<nav class="recent">
+  <h1>Recent Posts</h1>
+  <ul>{{range first .Site.Params.SidebarRecentLimit .Site.Recent}}
+    <li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
+  {{end}}</ul>
+</nav>
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/hugoisforlovers/index.html b/post/hugoisforlovers/index.html new file mode 100644 index 00000000..e189b43f --- /dev/null +++ b/post/hugoisforlovers/index.html @@ -0,0 +1,261 @@ + + + + + + + + + + Getting Started with Hugo · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Getting Started with Hugo

+

+ April 2, 2014 + + +
+ + + + go + + golang + + hugo + + development + + + +

+
+ +
+

Step 1. Install Hugo

+

Goto hugo releases and download the +appropriate version for your os and architecture.

+

Save it somewhere specific as we will be using it in the next step.

+

More complete instructions are available at installing hugo

+

Step 2. Build the Docs

+

Hugo has its own example site which happens to also be the documentation site +you are reading right now.

+

Follow the following steps:

+
    +
  1. Clone the hugo repository
  2. +
  3. Go into the repo
  4. +
  5. Run hugo in server mode and build the docs
  6. +
  7. Open your browser to http://localhost:1313
  8. +
+

Corresponding pseudo commands:

+
git clone https://github.com/spf13/hugo
+cd hugo
+/path/to/where/you/installed/hugo server --source=./docs
+> 29 pages created
+> 0 tags index created
+> in 27 ms
+> Web Server is available at http://localhost:1313
+> Press ctrl+c to stop
+
+

Once you’ve gotten here, follow along the rest of this page on your local build.

+

Step 3. Change the docs site

+

Stop the Hugo process by hitting ctrl+c.

+

Now we are going to run hugo again, but this time with hugo in watch mode.

+
/path/to/hugo/from/step/1/hugo server --source=./docs --watch
+> 29 pages created
+> 0 tags index created
+> in 27 ms
+> Web Server is available at http://localhost:1313
+> Watching for changes in /Users/spf13/Code/hugo/docs/content
+> Press ctrl+c to stop
+
+

Open your favorite editor and change one of the source +content pages. How about changing this very file to fix the typo. How about changing this very file to fix the typo.

+

Content files are found in docs/content/. Unless otherwise specified, files +are located at the same relative location as the url, in our case +docs/content/overview/quickstart.md.

+

Change and save this file.. Notice what happened in your terminal.

+
> Change detected, rebuilding site
+
+> 29 pages created
+> 0 tags index created
+> in 26 ms
+
+

Refresh the browser and observe that the typo is now fixed.

+

Notice how quick that was. Try to refresh the site before it’s finished building.. I double dare you. +Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.

+

Step 4. Have fun

+

The best way to learn something is to play with it.

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/index.html b/post/index.html new file mode 100644 index 00000000..173ef1df --- /dev/null +++ b/post/index.html @@ -0,0 +1,227 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/index.xml b/post/index.xml new file mode 100644 index 00000000..e7bb7da9 --- /dev/null +++ b/post/index.xml @@ -0,0 +1,4262 @@ + + + Posts on SJTUG - A Joyful Techie User Group + https://sjtug.org/post/ + Recent content in Posts on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Thu, 02 Nov 2023 12:08:00 -0700 + + + + + + Creating a New Theme + https://sjtug.org/post/creating-a-new-theme/ + Sun, 28 Sep 2014 00:00:00 +0000 + + https://sjtug.org/post/creating-a-new-theme/ + <h3 id="introduction"><strong>Introduction</strong></h3> +<p>This tutorial will show you how to create a simple theme in Hugo. I assume that you are familiar with HTML, the bash command line, and that you are comfortable using Markdown to format content. I&rsquo;ll explain how Hugo uses templates and how you can organize your templates to create a theme. I won&rsquo;t cover using CSS to style your theme.</p> +<p>We&rsquo;ll start with creating a new site with a very basic template. Then we&rsquo;ll add in a few pages and posts. With small variations on that, you will be able to create many different types of web sites.</p> +<p>In this tutorial, commands that you enter will start with the &ldquo;$&rdquo; prompt. The output will follow. Lines that start with &ldquo;#&rdquo; are comments that I&rsquo;ve added to explain a point. When I show updates to a file, the &ldquo;:wq&rdquo; on the last line means to save the file.</p> +<p>Here&rsquo;s an example:</p> +<pre><code>package main + +import &quot;fmt&quot; + +func main() { + fmt.Print(&quot;Hello&quot;) +} +</code></pre><blockquote> +<p>There are a few concepts that you need to understand before creating a theme.</p> +</blockquote> +<h3 id="skins">Skins</h3> +<p>Skins are the files responsible for the look and feel of your site. It’s the CSS that controls colors and fonts, it’s the Javascript that determines actions and reactions. It’s also the rules that Hugo uses to transform your content into the HTML that the site will serve to visitors.</p> +<p>You have two ways to create a skin. The simplest way is to create it in the <code>layouts/</code> directory. If you do, then you don’t have to worry about configuring Hugo to recognize it. The first place that Hugo will look for rules and files is in the <code>layouts/</code> directory so it will always find the skin.</p> +<p>Your second choice is to create it in a sub-directory of the <code>themes/</code> directory. If you do, then you must always tell Hugo where to search for the skin. It’s extra work, though, so why bother with it?</p> +<p>The difference between creating a skin in <code>layouts/</code> and creating it in <code>themes/</code> is very subtle. A skin in <code>layouts/</code> can’t be customized without updating the templates and static files that it is built from. A skin created in <code>themes/</code>, on the other hand, can be and that makes it easier for other people to use it.</p> +<p>The rest of this tutorial will call a skin created in the <code>themes/</code> directory a theme.</p> +<p>Note that you can use this tutorial to create a skin in the <code>layouts/</code> directory if you wish to. The main difference will be that you won’t need to update the site’s configuration file to use a theme.</p> +<h3 id="the-home-page">The Home Page</h3> +<p>The home page, or landing page, is the first page that many visitors to a site see. It is the index.html file in the root directory of the web site. Since Hugo writes files to the public/ directory, our home page is public/index.html.</p> +<h3 id="site-configuration-file">Site Configuration File</h3> +<p>When Hugo runs, it looks for a configuration file that contains settings that override default values for the entire site. The file can use TOML, YAML, or JSON. I prefer to use TOML for my configuration files. If you prefer to use JSON or YAML, you’ll need to translate my examples. You’ll also need to change the name of the file since Hugo uses the extension to determine how to process it.</p> +<p>Hugo translates Markdown files into HTML. By default, Hugo expects to find Markdown files in your <code>content/</code> directory and template files in your <code>themes/</code> directory. It will create HTML files in your <code>public/</code> directory. You can change this by specifying alternate locations in the configuration file.</p> +<h3 id="content">Content</h3> +<p>Content is stored in text files that contain two sections. The first section is the “front matter,” which is the meta-information on the content. The second section contains Markdown that will be converted to HTML.</p> +<h4 id="front-matter">Front Matter</h4> +<p>The front matter is information about the content. Like the configuration file, it can be written in TOML, YAML, or JSON. Unlike the configuration file, Hugo doesn’t use the file’s extension to know the format. It looks for markers to signal the type. TOML is surrounded by “<code>+++</code>”, YAML by “<code>---</code>”, and JSON is enclosed in curly braces. I prefer to use TOML, so you’ll need to translate my examples if you prefer YAML or JSON.</p> +<p>The information in the front matter is passed into the template before the content is rendered into HTML.</p> +<h4 id="markdown">Markdown</h4> +<p>Content is written in Markdown which makes it easier to create the content. Hugo runs the content through a Markdown engine to create the HTML which will be written to the output file.</p> +<h3 id="template-files">Template Files</h3> +<p>Hugo uses template files to render content into HTML. Template files are a bridge between the content and presentation. Rules in the template define what content is published, where it&rsquo;s published to, and how it will rendered to the HTML file. The template guides the presentation by specifying the style to use.</p> +<p>There are three types of templates: single, list, and partial. Each type takes a bit of content as input and transforms it based on the commands in the template.</p> +<p>Hugo uses its knowledge of the content to find the template file used to render the content. If it can’t find a template that is an exact match for the content, it will shift up a level and search from there. It will continue to do so until it finds a matching template or runs out of templates to try. If it can’t find a template, it will use the default template for the site.</p> +<p>Please note that you can use the front matter to influence Hugo’s choice of templates.</p> +<h4 id="single-template">Single Template</h4> +<p>A single template is used to render a single piece of content. For example, an article or post would be a single piece of content and use a single template.</p> +<h4 id="list-template">List Template</h4> +<p>A list template renders a group of related content. That could be a summary of recent postings or all articles in a category. List templates can contain multiple groups.</p> +<p>The homepage template is a special type of list template. Hugo assumes that the home page of your site will act as the portal for the rest of the content in the site.</p> +<h4 id="partial-template">Partial Template</h4> +<p>A partial template is a template that can be included in other templates. Partial templates must be called using the “partial” template command. They are very handy for rolling up common behavior. For example, your site may have a banner that all pages use. Instead of copying the text of the banner into every single and list template, you could create a partial with the banner in it. That way if you decide to change the banner, you only have to change the partial template.</p> +<h2 id="create-a-new-site">Create a New Site</h2> +<p>Let&rsquo;s use Hugo to create a new web site. I&rsquo;m a Mac user, so I&rsquo;ll create mine in my home directory, in the Sites folder. If you&rsquo;re using Linux, you might have to create the folder first.</p> +<p>The &ldquo;new site&rdquo; command will create a skeleton of a site. It will give you the basic directory structure and a useable configuration file.</p> +<pre><code>$ hugo new site ~/Sites/zafta +$ cd ~/Sites/zafta +$ ls -l +total 8 +drwxr-xr-x 7 quoha staff 238 Sep 29 16:49 . +drwxr-xr-x 3 quoha staff 102 Sep 29 16:49 .. +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes +-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static +$ +</code></pre><p>Take a look in the content/ directory to confirm that it is empty.</p> +<p>The other directories (archetypes/, layouts/, and static/) are used when customizing a theme. That&rsquo;s a topic for a different tutorial, so please ignore them for now.</p> +<h3 id="generate-the-html-for-the-new-site">Generate the HTML For the New Site</h3> +<p>Running the <code>hugo</code> command with no options will read all the available content and generate the HTML files. It will also copy all static files (that&rsquo;s everything that&rsquo;s not content). Since we have an empty site, it won&rsquo;t do much, but it will do it very quickly.</p> +<pre><code>$ hugo --verbose +INFO: 2014/09/29 Using config file: config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] +WARN: 2014/09/29 Unable to locate layout: [404.html] +0 draft content +0 future content +0 pages created +0 tags created +0 categories created +in 2 ms +$ +</code></pre><p>The &ldquo;<code>--verbose</code>&rdquo; flag gives extra information that will be helpful when we build the template. Every line of the output that starts with &ldquo;INFO:&rdquo; or &ldquo;WARN:&rdquo; is present because we used that flag. The lines that start with &ldquo;WARN:&rdquo; are warning messages. We&rsquo;ll go over them later.</p> +<p>We can verify that the command worked by looking at the directory again.</p> +<pre><code>$ ls -l +total 8 +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes +-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts +drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static +$ +</code></pre><p>See that new public/ directory? Hugo placed all generated content there. When you&rsquo;re ready to publish your web site, that&rsquo;s the place to start. For now, though, let&rsquo;s just confirm that we have what we&rsquo;d expect from a site with no content.</p> +<pre><code>$ ls -l public +total 16 +-rw-r--r-- 1 quoha staff 416 Sep 29 17:02 index.xml +-rw-r--r-- 1 quoha staff 262 Sep 29 17:02 sitemap.xml +$ +</code></pre><p>Hugo created two XML files, which is standard, but there are no HTML files.</p> +<h3 id="test-the-new-site">Test the New Site</h3> +<p>Verify that you can run the built-in web server. It will dramatically shorten your development cycle if you do. Start it by running the &ldquo;server&rdquo; command. If it is successful, you will see output similar to the following:</p> +<pre><code>$ hugo server --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] +WARN: 2014/09/29 Unable to locate layout: [404.html] +0 draft content +0 future content +0 pages created +0 tags created +0 categories created +in 2 ms +Serving pages from /Users/quoha/Sites/zafta/public +Web Server is available at http://localhost:1313 +Press Ctrl+C to stop +</code></pre><p>Connect to the listed URL (it&rsquo;s on the line that starts with &ldquo;Web Server&rdquo;). If everything is working correctly, you should get a page that shows the following:</p> +<pre><code>index.xml +sitemap.xml +</code></pre><p>That&rsquo;s a listing of your public/ directory. Hugo didn&rsquo;t create a home page because our site has no content. When there&rsquo;s no index.html file in a directory, the server lists the files in the directory, which is what you should see in your browser.</p> +<p>Let’s go back and look at those warnings again.</p> +<pre><code>WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] +WARN: 2014/09/29 Unable to locate layout: [404.html] +</code></pre><p>That second warning is easier to explain. We haven’t created a template to be used to generate “page not found errors.” The 404 message is a topic for a separate tutorial.</p> +<p>Now for the first warning. It is for the home page. You can tell because the first layout that it looked for was “index.html.” That’s only used by the home page.</p> +<p>I like that the verbose flag causes Hugo to list the files that it&rsquo;s searching for. For the home page, they are index.html, _default/list.html, and _default/single.html. There are some rules that we&rsquo;ll cover later that explain the names and paths. For now, just remember that Hugo couldn&rsquo;t find a template for the home page and it told you so.</p> +<p>At this point, you&rsquo;ve got a working installation and site that we can build upon. All that’s left is to add some content and a theme to display it.</p> +<h2 id="create-a-new-theme">Create a New Theme</h2> +<p>Hugo doesn&rsquo;t ship with a default theme. There are a few available (I counted a dozen when I first installed Hugo) and Hugo comes with a command to create new themes.</p> +<p>We&rsquo;re going to create a new theme called &ldquo;zafta.&rdquo; Since the goal of this tutorial is to show you how to fill out the files to pull in your content, the theme will not contain any CSS. In other words, ugly but functional.</p> +<p>All themes have opinions on content and layout. For example, Zafta uses &ldquo;post&rdquo; over &ldquo;blog&rdquo;. Strong opinions make for simpler templates but differing opinions make it tougher to use themes. When you build a theme, consider using the terms that other themes do.</p> +<h3 id="create-a-skeleton">Create a Skeleton</h3> +<p>Use the hugo &ldquo;new&rdquo; command to create the skeleton of a theme. This creates the directory structure and places empty files for you to fill out.</p> +<pre><code>$ hugo new theme zafta + +$ ls -l +total 8 +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 archetypes +-rw-r--r-- 1 quoha staff 82 Sep 29 16:49 config.toml +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 content +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 layouts +drwxr-xr-x 4 quoha staff 136 Sep 29 17:02 public +drwxr-xr-x 2 quoha staff 68 Sep 29 16:49 static +drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes + +$ find themes -type f | xargs ls -l +-rw-r--r-- 1 quoha staff 1081 Sep 29 17:31 themes/zafta/LICENSE.md +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/archetypes/default.md +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html +-rw-r--r-- 1 quoha staff 93 Sep 29 17:31 themes/zafta/theme.toml +$ +</code></pre><p>The skeleton includes templates (the files ending in .html), license file, a description of your theme (the theme.toml file), and an empty archetype.</p> +<p>Please take a minute to fill out the theme.toml and LICENSE.md files. They&rsquo;re optional, but if you&rsquo;re going to be distributing your theme, it tells the world who to praise (or blame). It&rsquo;s also nice to declare the license so that people will know how they can use the theme.</p> +<pre><code>$ vi themes/zafta/theme.toml +author = &quot;michael d henderson&quot; +description = &quot;a minimal working template&quot; +license = &quot;MIT&quot; +name = &quot;zafta&quot; +source_repo = &quot;&quot; +tags = [&quot;tags&quot;, &quot;categories&quot;] +:wq + +## also edit themes/zafta/LICENSE.md and change +## the bit that says &quot;YOUR_NAME_HERE&quot; +</code></pre><p>Note that the the skeleton&rsquo;s template files are empty. Don&rsquo;t worry, we&rsquo;ll be changing that shortly.</p> +<pre><code>$ find themes/zafta -name '*.html' | xargs ls -l +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/single.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/footer.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/partials/header.html +$ +</code></pre><h3 id="update-the-configuration-file-to-use-the-theme">Update the Configuration File to Use the Theme</h3> +<p>Now that we&rsquo;ve got a theme to work with, it&rsquo;s a good idea to add the theme name to the configuration file. This is optional, because you can always add &ldquo;-t zafta&rdquo; on all your commands. I like to put it the configuration file because I like shorter command lines. If you don&rsquo;t put it in the configuration file or specify it on the command line, you won&rsquo;t use the template that you&rsquo;re expecting to.</p> +<p>Edit the file to add the theme, add a title for the site, and specify that all of our content will use the TOML format.</p> +<pre><code>$ vi config.toml +theme = &quot;zafta&quot; +baseurl = &quot;&quot; +languageCode = &quot;en-us&quot; +title = &quot;zafta - totally refreshing&quot; +MetaDataFormat = &quot;toml&quot; +:wq + +$ +</code></pre><h3 id="generate-the-site">Generate the Site</h3> +<p>Now that we have an empty theme, let&rsquo;s generate the site again.</p> +<pre><code>$ hugo --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +0 pages created +0 tags created +0 categories created +in 2 ms +$ +</code></pre><p>Did you notice that the output is different? The warning message for the home page has disappeared and we have an additional information line saying that Hugo is syncing from the theme&rsquo;s directory.</p> +<p>Let&rsquo;s check the public/ directory to see what Hugo&rsquo;s created.</p> +<pre><code>$ ls -l public +total 16 +drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 css +-rw-r--r-- 1 quoha staff 0 Sep 29 17:56 index.html +-rw-r--r-- 1 quoha staff 407 Sep 29 17:56 index.xml +drwxr-xr-x 2 quoha staff 68 Sep 29 17:56 js +-rw-r--r-- 1 quoha staff 243 Sep 29 17:56 sitemap.xml +$ +</code></pre><p>Notice four things:</p> +<ol> +<li>Hugo created a home page. This is the file public/index.html.</li> +<li>Hugo created a css/ directory.</li> +<li>Hugo created a js/ directory.</li> +<li>Hugo claimed that it created 0 pages. It created a file and copied over static files, but didn&rsquo;t create any pages. That&rsquo;s because it considers a &ldquo;page&rdquo; to be a file created directly from a content file. It doesn&rsquo;t count things like the index.html files that it creates automatically.</li> +</ol> +<h4 id="the-home-page-1">The Home Page</h4> +<p>Hugo supports many different types of templates. The home page is special because it gets its own type of template and its own template file. The file, layouts/index.html, is used to generate the HTML for the home page. The Hugo documentation says that this is the only required template, but that depends. Hugo&rsquo;s warning message shows that it looks for three different templates:</p> +<pre><code>WARN: 2014/09/29 Unable to locate layout: [index.html _default/list.html _default/single.html] +</code></pre><p>If it can&rsquo;t find any of these, it completely skips creating the home page. We noticed that when we built the site without having a theme installed.</p> +<p>When Hugo created our theme, it created an empty home page template. Now, when we build the site, Hugo finds the template and uses it to generate the HTML for the home page. Since the template file is empty, the HTML file is empty, too. If the template had any rules in it, then Hugo would have used them to generate the home page.</p> +<pre><code>$ find . -name index.html | xargs ls -l +-rw-r--r-- 1 quoha staff 0 Sep 29 20:21 ./public/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 ./themes/zafta/layouts/index.html +$ +</code></pre><h4 id="the-magic-of-static">The Magic of Static</h4> +<p>Hugo does two things when generating the site. It uses templates to transform content into HTML and it copies static files into the site. Unlike content, static files are not transformed. They are copied exactly as they are.</p> +<p>Hugo assumes that your site will use both CSS and JavaScript, so it creates directories in your theme to hold them. Remember opinions? Well, Hugo&rsquo;s opinion is that you&rsquo;ll store your CSS in a directory named css/ and your JavaScript in a directory named js/. If you don&rsquo;t like that, you can change the directory names in your theme directory or even delete them completely. Hugo&rsquo;s nice enough to offer its opinion, then behave nicely if you disagree.</p> +<pre><code>$ find themes/zafta -type d | xargs ls -ld +drwxr-xr-x 7 quoha staff 238 Sep 29 17:38 themes/zafta +drwxr-xr-x 3 quoha staff 102 Sep 29 17:31 themes/zafta/archetypes +drwxr-xr-x 5 quoha staff 170 Sep 29 17:31 themes/zafta/layouts +drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/_default +drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/layouts/partials +drwxr-xr-x 4 quoha staff 136 Sep 29 17:31 themes/zafta/static +drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/css +drwxr-xr-x 2 quoha staff 68 Sep 29 17:31 themes/zafta/static/js +$ +</code></pre><h2 id="the-theme-development-cycle">The Theme Development Cycle</h2> +<p>When you&rsquo;re working on a theme, you will make changes in the theme&rsquo;s directory, rebuild the site, and check your changes in the browser. Hugo makes this very easy:</p> +<ol> +<li>Purge the public/ directory.</li> +<li>Run the built in web server in watch mode.</li> +<li>Open your site in a browser.</li> +<li>Update the theme.</li> +<li>Glance at your browser window to see changes.</li> +<li>Return to step 4.</li> +</ol> +<p>I’ll throw in one more opinion: never work on a theme on a live site. Always work on a copy of your site. Make changes to your theme, test them, then copy them up to your site. For added safety, use a tool like Git to keep a revision history of your content and your theme. Believe me when I say that it is too easy to lose both your mind and your changes.</p> +<p>Check the main Hugo site for information on using Git with Hugo.</p> +<h3 id="purge-the-public-directory">Purge the public/ Directory</h3> +<p>When generating the site, Hugo will create new files and update existing ones in the <code>public/</code> directory. It will not delete files that are no longer used. For example, files that were created in the wrong directory or with the wrong title will remain. If you leave them, you might get confused by them later. I recommend cleaning out your site prior to generating it.</p> +<p>Note: If you&rsquo;re building on an SSD, you should ignore this. Churning on a SSD can be costly.</p> +<h3 id="hugos-watch-option">Hugo&rsquo;s Watch Option</h3> +<p>Hugo&rsquo;s &ldquo;<code>--watch</code>&rdquo; option will monitor the content/ and your theme directories for changes and rebuild the site automatically.</p> +<h3 id="live-reload">Live Reload</h3> +<p>Hugo&rsquo;s built in web server supports live reload. As pages are saved on the server, the browser is told to refresh the page. Usually, this happens faster than you can say, &ldquo;Wow, that&rsquo;s totally amazing.&rdquo;</p> +<h3 id="development-commands">Development Commands</h3> +<p>Use the following commands as the basis for your workflow.</p> +<pre><code>## purge old files. hugo will recreate the public directory. +## +$ rm -rf public +## +## run hugo in watch mode +## +$ hugo server --watch --verbose +</code></pre><p>Here&rsquo;s sample output showing Hugo detecting a change to the template for the home page. Once generated, the web browser automatically reloaded the page. I&rsquo;ve said this before, it&rsquo;s amazing.</p> +<pre><code>$ rm -rf public +$ hugo server --watch --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +0 pages created +0 tags created +0 categories created +in 2 ms +Watching for changes in /Users/quoha/Sites/zafta/content +Serving pages from /Users/quoha/Sites/zafta/public +Web Server is available at http://localhost:1313 +Press Ctrl+C to stop +INFO: 2014/09/29 File System Event: [&quot;/Users/quoha/Sites/zafta/themes/zafta/layouts/index.html&quot;: MODIFY|ATTRIB] +Change detected, rebuilding site + +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +0 pages created +0 tags created +0 categories created +in 1 ms +</code></pre><h2 id="update-the-home-page-template">Update the Home Page Template</h2> +<p>The home page is one of a few special pages that Hugo creates automatically. As mentioned earlier, it looks for one of three files in the theme&rsquo;s layout/ directory:</p> +<ol> +<li>index.html</li> +<li>_default/list.html</li> +<li>_default/single.html</li> +</ol> +<p>We could update one of the default templates, but a good design decision is to update the most specific template available. That&rsquo;s not a hard and fast rule (in fact, we&rsquo;ll break it a few times in this tutorial), but it is a good generalization.</p> +<h3 id="make-a-static-home-page">Make a Static Home Page</h3> +<p>Right now, that page is empty because we don&rsquo;t have any content and we don&rsquo;t have any logic in the template. Let&rsquo;s change that by adding some text to the template.</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-html" data-lang="html">$ vi themes/zafta/layouts/index.html +<span style="color:#75715e">&lt;!DOCTYPE html&gt;</span> +&lt;<span style="color:#f92672">html</span>&gt; +&lt;<span style="color:#f92672">body</span>&gt; + &lt;<span style="color:#f92672">p</span>&gt;hugo says hello!&lt;/<span style="color:#f92672">p</span>&gt; +&lt;/<span style="color:#f92672">body</span>&gt; +&lt;/<span style="color:#f92672">html</span>&gt; +:wq + +$ +</code></pre></div><p>Build the web site and then verify the results.</p> +<pre><code>$ hugo --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +0 pages created +0 tags created +0 categories created +in 2 ms + +$ find public -type f -name '*.html' | xargs ls -l +-rw-r--r-- 1 quoha staff 78 Sep 29 21:26 public/index.html + +$ cat public/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + &lt;p&gt;hugo says hello!&lt;/p&gt; +&lt;/html&gt; +</code></pre><h4 id="live-reload-1">Live Reload</h4> +<p>Note: If you&rsquo;re running the server with the <code>--watch</code> option, you&rsquo;ll see different content in the file:</p> +<pre><code>$ cat public/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + &lt;p&gt;hugo says hello!&lt;/p&gt; +&lt;script&gt;document.write('&lt;script src=&quot;http://' + + (location.host || 'localhost').split(':')[0] + + ':1313/livereload.js?mindelay=10&quot;&gt;&lt;/' + + 'script&gt;')&lt;/script&gt;&lt;/body&gt; +&lt;/html&gt; +</code></pre><p>When you use <code>--watch</code>, the Live Reload script is added by Hugo. Look for live reload in the documentation to see what it does and how to disable it.</p> +<h3 id="build-a-dynamic-home-page">Build a &ldquo;Dynamic&rdquo; Home Page</h3> +<p>&ldquo;Dynamic home page?&rdquo; Hugo&rsquo;s a static web site generator, so this seems an odd thing to say. I mean let&rsquo;s have the home page automatically reflect the content in the site every time Hugo builds it. We&rsquo;ll use iteration in the template to do that.</p> +<h4 id="create-new-posts">Create New Posts</h4> +<p>Now that we have the home page generating static content, let&rsquo;s add some content to the site. We&rsquo;ll display these posts as a list on the home page and on their own page, too.</p> +<p>Hugo has a command to generate a skeleton post, just like it does for sites and themes.</p> +<pre><code>$ hugo --verbose new post/first.md +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 attempting to create post/first.md of post +INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/default.md +ERROR: 2014/09/29 Unable to Cast &lt;nil&gt; to map[string]interface{} + +$ +</code></pre><p>That wasn&rsquo;t very nice, was it?</p> +<p>The &ldquo;new&rdquo; command uses an archetype to create the post file. Hugo created an empty default archetype file, but that causes an error when there&rsquo;s a theme. For me, the workaround was to create an archetypes file specifically for the post type.</p> +<pre><code>$ vi themes/zafta/archetypes/post.md ++++ +Description = &quot;&quot; +Tags = [] +Categories = [] ++++ +:wq + +$ find themes/zafta/archetypes -type f | xargs ls -l +-rw-r--r-- 1 quoha staff 0 Sep 29 21:53 themes/zafta/archetypes/default.md +-rw-r--r-- 1 quoha staff 51 Sep 29 21:54 themes/zafta/archetypes/post.md + +$ hugo --verbose new post/first.md +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 attempting to create post/first.md of post +INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md +INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/first.md +/Users/quoha/Sites/zafta/content/post/first.md created + +$ hugo --verbose new post/second.md +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 attempting to create post/second.md of post +INFO: 2014/09/29 curpath: /Users/quoha/Sites/zafta/themes/zafta/archetypes/post.md +INFO: 2014/09/29 creating /Users/quoha/Sites/zafta/content/post/second.md +/Users/quoha/Sites/zafta/content/post/second.md created + +$ ls -l content/post +total 16 +-rw-r--r-- 1 quoha staff 104 Sep 29 21:54 first.md +-rw-r--r-- 1 quoha staff 105 Sep 29 21:57 second.md + +$ cat content/post/first.md ++++ +Categories = [] +Description = &quot;&quot; +Tags = [] +date = &quot;2014-09-29T21:54:53-05:00&quot; +title = &quot;first&quot; + ++++ +my first post + +$ cat content/post/second.md ++++ +Categories = [] +Description = &quot;&quot; +Tags = [] +date = &quot;2014-09-29T21:57:09-05:00&quot; +title = &quot;second&quot; + ++++ +my second post + +$ +</code></pre><p>Build the web site and then verify the results.</p> +<pre><code>$ rm -rf public +$ hugo --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 found taxonomies: map[string]string{&quot;category&quot;:&quot;categories&quot;, &quot;tag&quot;:&quot;tags&quot;} +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +2 pages created +0 tags created +0 categories created +in 4 ms +$ +</code></pre><p>The output says that it created 2 pages. Those are our new posts:</p> +<pre><code>$ find public -type f -name '*.html' | xargs ls -l +-rw-r--r-- 1 quoha staff 78 Sep 29 22:13 public/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/first/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:13 public/post/second/index.html +$ +</code></pre><p>The new files are empty because because the templates used to generate the content are empty. The homepage doesn&rsquo;t show the new content, either. We have to update the templates to add the posts.</p> +<h3 id="list-and-single-templates">List and Single Templates</h3> +<p>In Hugo, we have three major kinds of templates. There&rsquo;s the home page template that we updated previously. It is used only by the home page. We also have &ldquo;single&rdquo; templates which are used to generate output for a single content file. We also have &ldquo;list&rdquo; templates that are used to group multiple pieces of content before generating output.</p> +<p>Generally speaking, list templates are named &ldquo;list.html&rdquo; and single templates are named &ldquo;single.html.&rdquo;</p> +<p>There are three other types of templates: partials, content views, and terms. We will not go into much detail on these.</p> +<h3 id="add-content-to-the-homepage">Add Content to the Homepage</h3> +<p>The home page will contain a list of posts. Let&rsquo;s update its template to add the posts that we just created. The logic in the template will run every time we build the site.</p> +<pre><code>$ vi themes/zafta/layouts/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + {{ range first 10 .Data.Pages }} + &lt;h1&gt;{{ .Title }}&lt;/h1&gt; + {{ end }} +&lt;/body&gt; +&lt;/html&gt; +:wq + +$ +</code></pre><p>Hugo uses the Go template engine. That engine scans the template files for commands which are enclosed between &ldquo;{{&rdquo; and &ldquo;}}&rdquo;. In our template, the commands are:</p> +<ol> +<li>range</li> +<li>.Title</li> +<li>end</li> +</ol> +<p>The &ldquo;range&rdquo; command is an iterator. We&rsquo;re going to use it to go through the first ten pages. Every HTML file that Hugo creates is treated as a page, so looping through the list of pages will look at every file that will be created.</p> +<p>The &ldquo;.Title&rdquo; command prints the value of the &ldquo;title&rdquo; variable. Hugo pulls it from the front matter in the Markdown file.</p> +<p>The &ldquo;end&rdquo; command signals the end of the range iterator. The engine loops back to the top of the iteration when it finds &ldquo;end.&rdquo; Everything between the &ldquo;range&rdquo; and &ldquo;end&rdquo; is evaluated every time the engine goes through the iteration. In this file, that would cause the title from the first ten pages to be output as heading level one.</p> +<p>It&rsquo;s helpful to remember that some variables, like .Data, are created before any output files. Hugo loads every content file into the variable and then gives the template a chance to process before creating the HTML files.</p> +<p>Build the web site and then verify the results.</p> +<pre><code>$ rm -rf public +$ hugo --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 found taxonomies: map[string]string{&quot;tag&quot;:&quot;tags&quot;, &quot;category&quot;:&quot;categories&quot;} +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +2 pages created +0 tags created +0 categories created +in 4 ms +$ find public -type f -name '*.html' | xargs ls -l +-rw-r--r-- 1 quoha staff 94 Sep 29 22:23 public/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/first/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:23 public/post/second/index.html +$ cat public/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + + &lt;h1&gt;second&lt;/h1&gt; + + &lt;h1&gt;first&lt;/h1&gt; + +&lt;/body&gt; +&lt;/html&gt; +$ +</code></pre><p>Congratulations, the home page shows the title of the two posts. The posts themselves are still empty, but let&rsquo;s take a moment to appreciate what we&rsquo;ve done. Your template now generates output dynamically. Believe it or not, by inserting the range command inside of those curly braces, you&rsquo;ve learned everything you need to know to build a theme. All that&rsquo;s really left is understanding which template will be used to generate each content file and becoming familiar with the commands for the template engine.</p> +<p>And, if that were entirely true, this tutorial would be much shorter. There are a few things to know that will make creating a new template much easier. Don&rsquo;t worry, though, that&rsquo;s all to come.</p> +<h3 id="add-content-to-the-posts">Add Content to the Posts</h3> +<p>We&rsquo;re working with posts, which are in the content/post/ directory. That means that their section is &ldquo;post&rdquo; (and if we don&rsquo;t do something weird, their type is also &ldquo;post&rdquo;).</p> +<p>Hugo uses the section and type to find the template file for every piece of content. Hugo will first look for a template file that matches the section or type name. If it can&rsquo;t find one, then it will look in the _default/ directory. There are some twists that we&rsquo;ll cover when we get to categories and tags, but for now we can assume that Hugo will try post/single.html, then _default/single.html.</p> +<p>Now that we know the search rule, let&rsquo;s see what we actually have available:</p> +<pre><code>$ find themes/zafta -name single.html | xargs ls -l +-rw-r--r-- 1 quoha staff 132 Sep 29 17:31 themes/zafta/layouts/_default/single.html +</code></pre><p>We could create a new template, post/single.html, or change the default. Since we don&rsquo;t know of any other content types, let&rsquo;s start with updating the default.</p> +<p>Remember, any content that we haven&rsquo;t created a template for will end up using this template. That can be good or bad. Bad because I know that we&rsquo;re going to be adding different types of content and we&rsquo;re going to end up undoing some of the changes we&rsquo;ve made. It&rsquo;s good because we&rsquo;ll be able to see immediate results. It&rsquo;s also good to start here because we can start to build the basic layout for the site. As we add more content types, we&rsquo;ll refactor this file and move logic around. Hugo makes that fairly painless, so we&rsquo;ll accept the cost and proceed.</p> +<p>Please see the Hugo documentation on template rendering for all the details on determining which template to use. And, as the docs mention, if you&rsquo;re building a single page application (SPA) web site, you can delete all of the other templates and work with just the default single page. That&rsquo;s a refreshing amount of joy right there.</p> +<h4 id="update-the-template-file">Update the Template File</h4> +<pre><code>$ vi themes/zafta/layouts/_default/single.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;head&gt; + &lt;title&gt;{{ .Title }}&lt;/title&gt; +&lt;/head&gt; +&lt;body&gt; + &lt;h1&gt;{{ .Title }}&lt;/h1&gt; + {{ .Content }} +&lt;/body&gt; +&lt;/html&gt; +:wq + +$ +</code></pre><p>Build the web site and verify the results.</p> +<pre><code>$ rm -rf public +$ hugo --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 found taxonomies: map[string]string{&quot;tag&quot;:&quot;tags&quot;, &quot;category&quot;:&quot;categories&quot;} +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +2 pages created +0 tags created +0 categories created +in 4 ms + +$ find public -type f -name '*.html' | xargs ls -l +-rw-r--r-- 1 quoha staff 94 Sep 29 22:40 public/index.html +-rw-r--r-- 1 quoha staff 125 Sep 29 22:40 public/post/first/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:40 public/post/index.html +-rw-r--r-- 1 quoha staff 128 Sep 29 22:40 public/post/second/index.html + +$ cat public/post/first/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;head&gt; + &lt;title&gt;first&lt;/title&gt; +&lt;/head&gt; +&lt;body&gt; + &lt;h1&gt;first&lt;/h1&gt; + &lt;p&gt;my first post&lt;/p&gt; + +&lt;/body&gt; +&lt;/html&gt; + +$ cat public/post/second/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;head&gt; + &lt;title&gt;second&lt;/title&gt; +&lt;/head&gt; +&lt;body&gt; + &lt;h1&gt;second&lt;/h1&gt; + &lt;p&gt;my second post&lt;/p&gt; + +&lt;/body&gt; +&lt;/html&gt; +$ +</code></pre><p>Notice that the posts now have content. You can go to localhost:1313/post/first to verify.</p> +<h3 id="linking-to-content">Linking to Content</h3> +<p>The posts are on the home page. Let&rsquo;s add a link from there to the post. Since this is the home page, we&rsquo;ll update its template.</p> +<pre><code>$ vi themes/zafta/layouts/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + {{ range first 10 .Data.Pages }} + &lt;h1&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h1&gt; + {{ end }} +&lt;/body&gt; +&lt;/html&gt; +</code></pre><p>Build the web site and verify the results.</p> +<pre><code>$ rm -rf public +$ hugo --verbose +INFO: 2014/09/29 Using config file: /Users/quoha/Sites/zafta/config.toml +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/themes/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 syncing from /Users/quoha/Sites/zafta/static/ to /Users/quoha/Sites/zafta/public/ +INFO: 2014/09/29 found taxonomies: map[string]string{&quot;tag&quot;:&quot;tags&quot;, &quot;category&quot;:&quot;categories&quot;} +WARN: 2014/09/29 Unable to locate layout: [404.html theme/404.html] +0 draft content +0 future content +2 pages created +0 tags created +0 categories created +in 4 ms + +$ find public -type f -name '*.html' | xargs ls -l +-rw-r--r-- 1 quoha staff 149 Sep 29 22:44 public/index.html +-rw-r--r-- 1 quoha staff 125 Sep 29 22:44 public/post/first/index.html +-rw-r--r-- 1 quoha staff 0 Sep 29 22:44 public/post/index.html +-rw-r--r-- 1 quoha staff 128 Sep 29 22:44 public/post/second/index.html + +$ cat public/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + + &lt;h1&gt;&lt;a href=&quot;/post/second/&quot;&gt;second&lt;/a&gt;&lt;/h1&gt; + + &lt;h1&gt;&lt;a href=&quot;/post/first/&quot;&gt;first&lt;/a&gt;&lt;/h1&gt; + +&lt;/body&gt; +&lt;/html&gt; + +$ +</code></pre><h3 id="create-a-post-listing">Create a Post Listing</h3> +<p>We have the posts displaying on the home page and on their own page. We also have a file public/post/index.html that is empty. Let&rsquo;s make it show a list of all posts (not just the first ten).</p> +<p>We need to decide which template to update. This will be a listing, so it should be a list template. Let&rsquo;s take a quick look and see which list templates are available.</p> +<pre><code>$ find themes/zafta -name list.html | xargs ls -l +-rw-r--r-- 1 quoha staff 0 Sep 29 17:31 themes/zafta/layouts/_default/list.html +</code></pre><p>As with the single post, we have to decide to update _default/list.html or create post/list.html. We still don&rsquo;t have multiple content types, so let&rsquo;s stay consistent and update the default list template.</p> +<h2 id="creating-top-level-pages">Creating Top Level Pages</h2> +<p>Let&rsquo;s add an &ldquo;about&rdquo; page and display it at the top level (as opposed to a sub-level like we did with posts).</p> +<p>The default in Hugo is to use the directory structure of the content/ directory to guide the location of the generated html in the public/ directory. Let&rsquo;s verify that by creating an &ldquo;about&rdquo; page at the top level:</p> +<pre><code>$ vi content/about.md ++++ +title = &quot;about&quot; +description = &quot;about this site&quot; +date = &quot;2014-09-27&quot; +slug = &quot;about time&quot; ++++ + +## about us + +i'm speechless +:wq +</code></pre><p>Generate the web site and verify the results.</p> +<pre><code>$ find public -name '*.html' | xargs ls -l +-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:08 public/about-time/index.html +-rw-rw-r-- 1 mdhender staff 527 Sep 27 15:08 public/index.html +-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:08 public/post/first-post/index.html +-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:08 public/post/index.html +-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:08 public/post/second-post/index.html +</code></pre><p>Notice that the page wasn&rsquo;t created at the top level. It was created in a sub-directory named &lsquo;about-time/&rsquo;. That name came from our slug. Hugo will use the slug to name the generated content. It&rsquo;s a reasonable default, by the way, but we can learn a few things by fighting it for this file.</p> +<p>One other thing. Take a look at the home page.</p> +<pre><code>$ cat public/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + &lt;h1&gt;&lt;a href=&quot;http://localhost:1313/post/theme/&quot;&gt;creating a new theme&lt;/a&gt;&lt;/h1&gt; + &lt;h1&gt;&lt;a href=&quot;http://localhost:1313/about-time/&quot;&gt;about&lt;/a&gt;&lt;/h1&gt; + &lt;h1&gt;&lt;a href=&quot;http://localhost:1313/post/second-post/&quot;&gt;second&lt;/a&gt;&lt;/h1&gt; + &lt;h1&gt;&lt;a href=&quot;http://localhost:1313/post/first-post/&quot;&gt;first&lt;/a&gt;&lt;/h1&gt; +&lt;script&gt;document.write('&lt;script src=&quot;http://' + + (location.host || 'localhost').split(':')[0] + + ':1313/livereload.js?mindelay=10&quot;&gt;&lt;/' + + 'script&gt;')&lt;/script&gt;&lt;/body&gt; +&lt;/html&gt; +</code></pre><p>Notice that the &ldquo;about&rdquo; link is listed with the posts? That&rsquo;s not desirable, so let&rsquo;s change that first.</p> +<pre><code>$ vi themes/zafta/layouts/index.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;body&gt; + &lt;h1&gt;posts&lt;/h1&gt; + {{ range first 10 .Data.Pages }} + {{ if eq .Type &quot;post&quot;}} + &lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h2&gt; + {{ end }} + {{ end }} + + &lt;h1&gt;pages&lt;/h1&gt; + {{ range .Data.Pages }} + {{ if eq .Type &quot;page&quot; }} + &lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h2&gt; + {{ end }} + {{ end }} +&lt;/body&gt; +&lt;/html&gt; +:wq +</code></pre><p>Generate the web site and verify the results. The home page has two sections, posts and pages, and each section has the right set of headings and links in it.</p> +<p>But, that about page still renders to about-time/index.html.</p> +<pre><code>$ find public -name '*.html' | xargs ls -l +-rw-rw-r-- 1 mdhender staff 334 Sep 27 15:33 public/about-time/index.html +-rw-rw-r-- 1 mdhender staff 645 Sep 27 15:33 public/index.html +-rw-rw-r-- 1 mdhender staff 358 Sep 27 15:33 public/post/first-post/index.html +-rw-rw-r-- 1 mdhender staff 0 Sep 27 15:33 public/post/index.html +-rw-rw-r-- 1 mdhender staff 342 Sep 27 15:33 public/post/second-post/index.html +</code></pre><p>Knowing that hugo is using the slug to generate the file name, the simplest solution is to change the slug. Let&rsquo;s do it the hard way and change the permalink in the configuration file.</p> +<pre><code>$ vi config.toml +[permalinks] + page = &quot;/:title/&quot; + about = &quot;/:filename/&quot; +</code></pre><p>Generate the web site and verify that this didn&rsquo;t work. Hugo lets &ldquo;slug&rdquo; or &ldquo;URL&rdquo; override the permalinks setting in the configuration file. Go ahead and comment out the slug in content/about.md, then generate the web site to get it to be created in the right place.</p> +<h2 id="sharing-templates">Sharing Templates</h2> +<p>If you&rsquo;ve been following along, you probably noticed that posts have titles in the browser and the home page doesn&rsquo;t. That&rsquo;s because we didn&rsquo;t put the title in the home page&rsquo;s template (layouts/index.html). That&rsquo;s an easy thing to do, but let&rsquo;s look at a different option.</p> +<p>We can put the common bits into a shared template that&rsquo;s stored in the themes/zafta/layouts/partials/ directory.</p> +<h3 id="create-the-header-and-footer-partials">Create the Header and Footer Partials</h3> +<p>In Hugo, a partial is a sugar-coated template. Normally a template reference has a path specified. Partials are different. Hugo searches for them along a TODO defined search path. This makes it easier for end-users to override the theme&rsquo;s presentation.</p> +<pre><code>$ vi themes/zafta/layouts/partials/header.html +&lt;!DOCTYPE html&gt; +&lt;html&gt; +&lt;head&gt; + &lt;title&gt;{{ .Title }}&lt;/title&gt; +&lt;/head&gt; +&lt;body&gt; +:wq + +$ vi themes/zafta/layouts/partials/footer.html +&lt;/body&gt; +&lt;/html&gt; +:wq +</code></pre><h3 id="update-the-home-page-template-to-use-the-partials">Update the Home Page Template to Use the Partials</h3> +<p>The most noticeable difference between a template call and a partials call is the lack of path:</p> +<pre><code>{{ template &quot;theme/partials/header.html&quot; . }} +</code></pre><p>versus</p> +<pre><code>{{ partial &quot;header.html&quot; . }} +</code></pre><p>Both pass in the context.</p> +<p>Let&rsquo;s change the home page template to use these new partials.</p> +<pre><code>$ vi themes/zafta/layouts/index.html +{{ partial &quot;header.html&quot; . }} + + &lt;h1&gt;posts&lt;/h1&gt; + {{ range first 10 .Data.Pages }} + {{ if eq .Type &quot;post&quot;}} + &lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Title }}&lt;/a&gt;&lt;/h2&gt; + {{ end }} + {{ end }} + + &lt;h1&gt;pages&lt;/h1&gt; + {{ range .Data.Pages }} + {{ if or (eq .Type &quot;page&quot;) (eq .Type &quot;about&quot;) }} + &lt;h2&gt;&lt;a href=&quot;{{ .Permalink }}&quot;&gt;{{ .Type }} - {{ .Title }} - {{ .RelPermalink }}&lt;/a&gt;&lt;/h2&gt; + {{ end }} + {{ end }} + +{{ partial &quot;footer.html&quot; . }} +:wq +</code></pre><p>Generate the web site and verify the results. The title on the home page is now &ldquo;your title here&rdquo;, which comes from the &ldquo;title&rdquo; variable in the config.toml file.</p> +<h3 id="update-the-default-single-template-to-use-the-partials">Update the Default Single Template to Use the Partials</h3> +<pre><code>$ vi themes/zafta/layouts/_default/single.html +{{ partial &quot;header.html&quot; . }} + + &lt;h1&gt;{{ .Title }}&lt;/h1&gt; + {{ .Content }} + +{{ partial &quot;footer.html&quot; . }} +:wq +</code></pre><p>Generate the web site and verify the results. The title on the posts and the about page should both reflect the value in the markdown file.</p> +<h2 id="add-date-published-to-posts">Add “Date Published” to Posts</h2> +<p>It&rsquo;s common to have posts display the date that they were written or published, so let&rsquo;s add that. The front matter of our posts has a variable named &ldquo;date.&rdquo; It&rsquo;s usually the date the content was created, but let&rsquo;s pretend that&rsquo;s the value we want to display.</p> +<h3 id="add-date-published-to-the-template">Add “Date Published” to the Template</h3> +<p>We&rsquo;ll start by updating the template used to render the posts. The template code will look like:</p> +<pre><code>{{ .Date.Format &quot;Mon, Jan 2, 2006&quot; }} +</code></pre><p>Posts use the default single template, so we&rsquo;ll change that file.</p> +<pre><code>$ vi themes/zafta/layouts/_default/single.html +{{ partial &quot;header.html&quot; . }} + + &lt;h1&gt;{{ .Title }}&lt;/h1&gt; + &lt;h2&gt;{{ .Date.Format &quot;Mon, Jan 2, 2006&quot; }}&lt;/h2&gt; + {{ .Content }} + +{{ partial &quot;footer.html&quot; . }} +:wq +</code></pre><p>Generate the web site and verify the results. The posts now have the date displayed in them. There&rsquo;s a problem, though. The &ldquo;about&rdquo; page also has the date displayed.</p> +<p>As usual, there are a couple of ways to make the date display only on posts. We could do an &ldquo;if&rdquo; statement like we did on the home page. Another way would be to create a separate template for posts.</p> +<p>The &ldquo;if&rdquo; solution works for sites that have just a couple of content types. It aligns with the principle of &ldquo;code for today,&rdquo; too.</p> +<p>Let&rsquo;s assume, though, that we&rsquo;ve made our site so complex that we feel we have to create a new template type. In Hugo-speak, we&rsquo;re going to create a section template.</p> +<p>Let&rsquo;s restore the default single template before we forget.</p> +<pre><code>$ mkdir themes/zafta/layouts/post +$ vi themes/zafta/layouts/_default/single.html +{{ partial &quot;header.html&quot; . }} + + &lt;h1&gt;{{ .Title }}&lt;/h1&gt; + {{ .Content }} + +{{ partial &quot;footer.html&quot; . }} +:wq +</code></pre><p>Now we&rsquo;ll update the post&rsquo;s version of the single template. If you remember Hugo&rsquo;s rules, the template engine will use this version over the default.</p> +<pre><code>$ vi themes/zafta/layouts/post/single.html +{{ partial &quot;header.html&quot; . }} + + &lt;h1&gt;{{ .Title }}&lt;/h1&gt; + &lt;h2&gt;{{ .Date.Format &quot;Mon, Jan 2, 2006&quot; }}&lt;/h2&gt; + {{ .Content }} + +{{ partial &quot;footer.html&quot; . }} +:wq + +</code></pre><p>Note that we removed the date logic from the default template and put it in the post template. Generate the web site and verify the results. Posts have dates and the about page doesn&rsquo;t.</p> +<h3 id="dont-repeat-yourself">Don&rsquo;t Repeat Yourself</h3> +<p>DRY is a good design goal and Hugo does a great job supporting it. Part of the art of a good template is knowing when to add a new template and when to update an existing one. While you&rsquo;re figuring that out, accept that you&rsquo;ll be doing some refactoring. Hugo makes that easy and fast, so it&rsquo;s okay to delay splitting up a template.</p> + + + + + Migrate to Hugo from Jekyll + https://sjtug.org/post/migrate-from-jekyll/ + Mon, 10 Mar 2014 00:00:00 +0000 + + https://sjtug.org/post/migrate-from-jekyll/ + <h2 id="move-static-content-to-static">Move static content to <code>static</code></h2> +<p>Jekyll has a rule that any directory not starting with <code>_</code> will be copied as-is to the <code>_site</code> output. Hugo keeps all static content under <code>static</code>. You should therefore move it all there. +With Jekyll, something that looked like</p> +<pre><code>▾ &lt;root&gt;/ + ▾ images/ + logo.png +</code></pre> +<p>should become</p> +<pre><code>▾ &lt;root&gt;/ + ▾ static/ + ▾ images/ + logo.png +</code></pre> +<p>Additionally, you&rsquo;ll want any files that should reside at the root (such as <code>CNAME</code>) to be moved to <code>static</code>.</p> +<h2 id="create-your-hugo-configuration-file">Create your Hugo configuration file</h2> +<p>Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the <a href="https://sjtug.org/overview/configuration/">Hugo configuration documentation</a> for details.</p> +<h2 id="set-your-configuration-publish-folder-to-_site">Set your configuration publish folder to <code>_site</code></h2> +<p>The default is for Jekyll to publish to <code>_site</code> and for Hugo to publish to <code>public</code>. If, like me, you have <a href="http://blog.blindgaenger.net/generate_github_pages_in_a_submodule.html"><code>_site</code> mapped to a git submodule on the <code>gh-pages</code> branch</a>, you&rsquo;ll want to do one of two alternatives:</p> +<ol> +<li> +<p>Change your submodule to point to map <code>gh-pages</code> to public instead of <code>_site</code> (recommended).</p> +<pre><code> git submodule deinit _site + git rm _site + git submodule add -b gh-pages git@github.com:your-username/your-repo.git public +</code></pre> +</li> +<li> +<p>Or, change the Hugo configuration to use <code>_site</code> instead of <code>public</code>.</p> +<pre><code> { + .. + &quot;publishdir&quot;: &quot;_site&quot;, + .. + } +</code></pre> +</li> +</ol> +<h2 id="convert-jekyll-templates-to-hugo-templates">Convert Jekyll templates to Hugo templates</h2> +<p>That&rsquo;s the bulk of the work right here. The documentation is your friend. You should refer to <a href="http://jekyllrb.com/docs/templates/">Jekyll&rsquo;s template documentation</a> if you need to refresh your memory on how you built your blog and <a href="https://sjtug.org/layout/templates/">Hugo&rsquo;s template</a> to learn Hugo&rsquo;s way.</p> +<p>As a single reference data point, converting my templates for <a href="http://heyitsalex.net/">heyitsalex.net</a> took me no more than a few hours.</p> +<h2 id="convert-jekyll-plugins-to-hugo-shortcodes">Convert Jekyll plugins to Hugo shortcodes</h2> +<p>Jekyll has <a href="http://jekyllrb.com/docs/plugins/">plugins</a>; Hugo has <a href="https://sjtug.org/doc/shortcodes/">shortcodes</a>. It&rsquo;s fairly trivial to do a port.</p> +<h3 id="implementation">Implementation</h3> +<p>As an example, I was using a custom <a href="https://github.com/alexandre-normand/alexandre-normand/blob/74bb12036a71334fdb7dba84e073382fc06908ec/_plugins/image_tag.rb"><code>image_tag</code></a> plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.</p> +<p>Jekyll&rsquo;s plugin:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-ruby" data-lang="ruby"> <span style="color:#66d9ef">module</span> Jekyll + <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">ImageTag</span> <span style="color:#f92672">&lt;</span> <span style="color:#66d9ef">Liquid</span><span style="color:#f92672">::</span><span style="color:#66d9ef">Tag</span> + @url <span style="color:#f92672">=</span> <span style="color:#66d9ef">nil</span> + @caption <span style="color:#f92672">=</span> <span style="color:#66d9ef">nil</span> + @class <span style="color:#f92672">=</span> <span style="color:#66d9ef">nil</span> + @link <span style="color:#f92672">=</span> <span style="color:#66d9ef">nil</span> + <span style="color:#e6db74">//</span> <span style="color:#66d9ef">Patterns</span> + <span style="color:#66d9ef">IMAGE_URL_WITH_CLASS_AND_CAPTION</span> <span style="color:#f92672">=</span> + <span style="color:#66d9ef">IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">/(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)&#34;(.*?)&#34;(\s+)-&gt;((https?:\/\/|\/)(\S+))(\s*)/i</span> + <span style="color:#66d9ef">IMAGE_URL_WITH_CAPTION</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">/((https?:\/\/|\/)(\S+))(\s+)&#34;(.*?)&#34;/i</span> + <span style="color:#66d9ef">IMAGE_URL_WITH_CLASS</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">/(\w+)(\s+)((https?:\/\/|\/)(\S+))/i</span> + <span style="color:#66d9ef">IMAGE_URL</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">/((https?:\/\/|\/)(\S+))/i</span> + <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">initialize</span>(tag_name, markup, tokens) + <span style="color:#66d9ef">super</span> + <span style="color:#66d9ef">if</span> markup <span style="color:#f92672">=~</span> <span style="color:#66d9ef">IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK</span> + @class <span style="color:#f92672">=</span> $1 + @url <span style="color:#f92672">=</span> $3 + @caption <span style="color:#f92672">=</span> $7 + @link <span style="color:#f92672">=</span> $9 + <span style="color:#66d9ef">elsif</span> markup <span style="color:#f92672">=~</span> <span style="color:#66d9ef">IMAGE_URL_WITH_CLASS_AND_CAPTION</span> + @class <span style="color:#f92672">=</span> $1 + @url <span style="color:#f92672">=</span> $3 + @caption <span style="color:#f92672">=</span> $7 + <span style="color:#66d9ef">elsif</span> markup <span style="color:#f92672">=~</span> <span style="color:#66d9ef">IMAGE_URL_WITH_CAPTION</span> + @url <span style="color:#f92672">=</span> $1 + @caption <span style="color:#f92672">=</span> $5 + <span style="color:#66d9ef">elsif</span> markup <span style="color:#f92672">=~</span> <span style="color:#66d9ef">IMAGE_URL_WITH_CLASS</span> + @class <span style="color:#f92672">=</span> $1 + @url <span style="color:#f92672">=</span> $3 + <span style="color:#66d9ef">elsif</span> markup <span style="color:#f92672">=~</span> <span style="color:#66d9ef">IMAGE_URL</span> + @url <span style="color:#f92672">=</span> $1 + <span style="color:#66d9ef">end</span> + <span style="color:#66d9ef">end</span> + <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">render</span>(context) + <span style="color:#66d9ef">if</span> @class + source <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;&lt;figure class=&#39;</span><span style="color:#e6db74">#{</span>@class<span style="color:#e6db74">}</span><span style="color:#e6db74">&#39;&gt;&#34;</span> + <span style="color:#66d9ef">else</span> + source <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;&lt;figure&gt;&#34;</span> + <span style="color:#66d9ef">end</span> + <span style="color:#66d9ef">if</span> @link + source <span style="color:#f92672">+=</span> <span style="color:#e6db74">&#34;&lt;a href=</span><span style="color:#ae81ff">\&#34;</span><span style="color:#e6db74">#{</span>@link<span style="color:#e6db74">}</span><span style="color:#ae81ff">\&#34;</span><span style="color:#e6db74">&gt;&#34;</span> + <span style="color:#66d9ef">end</span> + source <span style="color:#f92672">+=</span> <span style="color:#e6db74">&#34;&lt;img src=</span><span style="color:#ae81ff">\&#34;</span><span style="color:#e6db74">#{</span>@url<span style="color:#e6db74">}</span><span style="color:#ae81ff">\&#34;</span><span style="color:#e6db74">&gt;&#34;</span> + <span style="color:#66d9ef">if</span> @link + source <span style="color:#f92672">+=</span> <span style="color:#e6db74">&#34;&lt;/a&gt;&#34;</span> + <span style="color:#66d9ef">end</span> + source <span style="color:#f92672">+=</span> <span style="color:#e6db74">&#34;&lt;figcaption&gt;</span><span style="color:#e6db74">#{</span>@caption<span style="color:#e6db74">}</span><span style="color:#e6db74">&lt;/figcaption&gt;&#34;</span> <span style="color:#66d9ef">if</span> @caption + source <span style="color:#f92672">+=</span> <span style="color:#e6db74">&#34;&lt;/figure&gt;&#34;</span> + source + <span style="color:#66d9ef">end</span> + <span style="color:#66d9ef">end</span> + <span style="color:#66d9ef">end</span> + <span style="color:#66d9ef">Liquid</span><span style="color:#f92672">::</span><span style="color:#66d9ef">Template</span><span style="color:#f92672">.</span>register_tag(<span style="color:#e6db74">&#39;image&#39;</span>, <span style="color:#66d9ef">Jekyll</span><span style="color:#f92672">::</span><span style="color:#66d9ef">ImageTag</span>) +</code></pre></div><p>is written as this Hugo shortcode:</p> +<pre><code>&lt;!-- image --&gt; +&lt;figure {{ with .Get &quot;class&quot; }}class=&quot;{{.}}&quot;{{ end }}&gt; + {{ with .Get &quot;link&quot;}}&lt;a href=&quot;{{.}}&quot;&gt;{{ end }} + &lt;img src=&quot;{{ .Get &quot;src&quot; }}&quot; {{ if or (.Get &quot;alt&quot;) (.Get &quot;caption&quot;) }}alt=&quot;{{ with .Get &quot;alt&quot;}}{{.}}{{else}}{{ .Get &quot;caption&quot; }}{{ end }}&quot;{{ end }} /&gt; + {{ if .Get &quot;link&quot;}}&lt;/a&gt;{{ end }} + {{ if or (or (.Get &quot;title&quot;) (.Get &quot;caption&quot;)) (.Get &quot;attr&quot;)}} + &lt;figcaption&gt;{{ if isset .Params &quot;title&quot; }} + {{ .Get &quot;title&quot; }}{{ end }} + {{ if or (.Get &quot;caption&quot;) (.Get &quot;attr&quot;)}}&lt;p&gt; + {{ .Get &quot;caption&quot; }} + {{ with .Get &quot;attrlink&quot;}}&lt;a href=&quot;{{.}}&quot;&gt; {{ end }} + {{ .Get &quot;attr&quot; }} + {{ if .Get &quot;attrlink&quot;}}&lt;/a&gt; {{ end }} + &lt;/p&gt; {{ end }} + &lt;/figcaption&gt; + {{ end }} +&lt;/figure&gt; +&lt;!-- image --&gt; +</code></pre> +<h3 id="usage">Usage</h3> +<p>I simply changed:</p> +<pre><code>{% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg &quot;One of my favorite touristy-type photos. I secretly waited for the good light while we were &quot;having fun&quot; and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing.&quot; -&gt;http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %} +</code></pre> +<p>to this (this example uses a slightly extended version named <code>fig</code>, different than the built-in <code>figure</code>):</p> +<pre><code>{{% fig class=&quot;full&quot; src=&quot;http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg&quot; title=&quot;One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing.&quot; link=&quot;http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/&quot; %}} +</code></pre> +<p>As a bonus, the shortcode named parameters are, arguably, more readable.</p> +<h2 id="finishing-touches">Finishing touches</h2> +<h3 id="fix-content">Fix content</h3> +<p>Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that <code>hugo server --watch</code> is your friend. Test your changes and fix errors as needed.</p> +<h3 id="clean-up">Clean up</h3> +<p>You&rsquo;ll want to remove the Jekyll configuration at this point. If you have anything else that isn&rsquo;t used, delete it.</p> +<h2 id="a-practical-example-in-a-diff">A practical example in a diff</h2> +<p><a href="http://heyitsalex.net/">Hey, it&rsquo;s Alex</a> was migrated in less than a <em>father-with-kids day</em> from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this <a href="https://github.com/alexandre-normand/alexandre-normand/compare/869d69435bd2665c3fbf5b5c78d4c22759d7613a...b7f6605b1265e83b4b81495423294208cc74d610">diff</a>.</p> + + + + + 思源镜像站 11/03 服务异常中断 + https://sjtug.org/post/mirror-news/2023-11-03-outage/ + Thu, 02 Nov 2023 12:08:00 -0700 + + https://sjtug.org/post/mirror-news/2023-11-03-outage/ + <p>由于上游交大云服务故障,思源镜像站 (mirror.sjtu.edu.cn) 于 11/03 1:12 至 05:07 服务中断,总故障时间 3 小时 55 分钟。在此过程中,致远镜像站 (mirrors.sjtug.sjtu.edu.cn) 的部分存储服务也受到影响导致无法访问。现在本站所有服务已经恢复正常。</p> + + + + + 镜像站将于9月19-20日上午4时维护 + https://sjtug.org/post/mirror-news/2023-09-19-maintain/ + Tue, 12 Sep 2023 17:30:00 -0700 + + https://sjtug.org/post/mirror-news/2023-09-19-maintain/ + <p>SJTUG 软件源镜像站的两台服务器将分别于 2023年9月19日周二 上午4时 UTC+8 及 2023年9月20日周三 上午4时 UTC+8 进行服务器架构升级,停机窗口详见下文。届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 和 mirror.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 37 升级到 Fedora 38。</li> +<li>将思源镜像服务器的操作系统从 Debian 11 升级到 Debian 12。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年9月19日 上午4时起,我们将对致远镜像站 (mirrors.sjtug.sjtu.edu.cn) 进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。</li> +<li>2023年9月20日 上午4时起,我们将对思源镜像站 (mirror.sjtu.edu.cn) 进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + SJTUG x 交大超算 6 月吃吃喝喝与技术分享 + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + Mon, 19 Jun 2023 21:00:00 +0800 + + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + <p>本周一 (19日) 14:00 在电院E咖三楼进行的 SJTUG 吃吃喝喝和技术分享活动圆满结束~</p> +<p>本次分享的嘉宾是方禹舜同学,题目是“面向超算集群的大语言模型并行训练初探”,活动中探讨了如何突破计算和内存资源的限制,采用并行化方法训练以大语言模型为首的各类大规模模型,并简短介绍了上海交通大学学生超算队的活动及相关超算赛事。</p> +<p>现场提供了小吃以及 SJTUG 贴纸。日后的吃吃喝喝活动不出意外也会继续提供以上福利,欢迎蹭饭!感谢 <a href="https://net.sjtu.edu.cn">交大网络信息中心</a>(<a href="https://hpc.sjtu.edu.cn/">交大高性能计算中心</a>) 对本次活动的赞助!</p> +<p>本次分享在 b 站上进行了直播,录播已经上传到 <a href="https://www.dropbox.com/scl/fi/wk0sej7xrj39hwa4l6wiq/2023-06-19-14-16-41.mp4?dl=0&amp;rlkey=2apx0eamrgcanzcddwrnuekkd">Dropbox</a>。slides 已经上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a>。</p> +<p><img src="https://sjtug.org/images/2023-06.in-event.jpeg" alt="in-event"></p> + + + + + pop-os + https://sjtug.org/post/mirror-help/pop-os/ + Thu, 08 Jun 2023 18:27:00 +0800 + + https://sjtug.org/post/mirror-help/pop-os/ + <p>PopOS 是 system76 公司基于 ubuntu 开发的衍生版,具有称为 COSMIC 的定制 GNOME桌面环境,内置大量的库和开发工具。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#e6db74">&#39;s@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/pop-os/@g&#39;</span> /etc/apt/sources.list.d/pop-os-apps.sources +sed -i <span style="color:#e6db74">&#39;s@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/pop-os/@g&#39;</span> /etc/apt/sources.list.d/pop-os-release.sources +sed -i <span style="color:#e6db74">&#39;s@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/@g&#39;</span> /etc/apt/sources.list.d/system.sources +</code></pre></div> + + + + 镜像站自6月3日起公网服务不可用 + https://sjtug.org/post/mirror-news/2023-06-03-maintain/ + Sat, 03 Jun 2023 16:00:00 +0800 + + https://sjtug.org/post/mirror-news/2023-06-03-maintain/ + <p>由于上游校园主干网络临时维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。</p> +<p>本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年6月3日 (周六) 至 2023年6月5日(周一):上游校园主干网络维护</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> +<p>2023年6月3日 19:00 更新:不可用时间窗口更新</p> + + + + + 镜像站将于2月22日下午4时及2月23日上午8时15分维护 + https://sjtug.org/post/mirror-news/2023-02-23-maintain/ + Mon, 20 Feb 2023 09:30:00 +0800 + + https://sjtug.org/post/mirror-news/2023-02-23-maintain/ + <p>SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2023年2月22日周三 至 2023年2月23日周四 UTC+8 部分时段进行服务器架构升级,停机窗口详见下文。届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 35 升级到 Fedora 37。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年2月22日 下午4时起,我们将对致远镜像站进行初期升级。初期升级将在 30 分钟内完成,期间可能会出现服务中断的情况。</li> +<li>2023年2月23日 上午4时起,我们将对致远镜像站进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。</li> +<li>2023年2月23日 上午8时15分起,我们将更新配置。系统配置将在 1 小时内完成,期间可能会出现服务中断的情况。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站将于2月17日上午8时45分维护 + https://sjtug.org/post/mirror-news/2023-02-17-maintain/ + Wed, 15 Feb 2023 17:00:00 +0800 + + https://sjtug.org/post/mirror-news/2023-02-17-maintain/ + <p>SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2023年2月17日周五 上午8时45分 UTC+8 进行硬件检修。在此期间服务会中断大约一小时。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。与此同时,思源服务器 (mirror.sjtu.edu.cn) 上的软件源将不受影响。</p> +<p>本次维护将会对服务器上的硬件进行维护,以提供更好的使用体验。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年2月17日 (周五) 上午8时45分:我们将使致远服务器离线并进行硬件维护,在此期间服务会中断约一小时。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站于10月16日至10月24日公网服务不可用 + https://sjtug.org/post/mirror-news/2022-10-16-maintain/ + Sun, 16 Oct 2022 00:00:00 +0800 + + https://sjtug.org/post/mirror-news/2022-10-16-maintain/ + <p>接上海交通大学网络信息中心通知,由于上游校园主干网络维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。</p> +<p>本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2022年10月16日 (周日) 至 2022年10月24日(周一):上游校园主干网络维护</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站于6月2日至6月6日公网服务不可用 + https://sjtug.org/post/mirror-news/2022-06-02-maintain/ + Thu, 02 Jun 2022 21:30:00 +0800 + + https://sjtug.org/post/mirror-news/2022-06-02-maintain/ + <p>接上海交通大学网络信息中心通知,由于上游校园主干网络维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。</p> +<p>本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2022年6月2日 (周四) 至 2022年6月6日(周一):上游校园主干网络维护</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + SJTUG x Naive Systems 11 月吃吃喝喝与技术分享 + https://sjtug.org/post/2021-11-20-rust-sharing/ + Sat, 20 Nov 2021 20:00:00 +0800 + + https://sjtug.org/post/2021-11-20-rust-sharing/ + <p>下周五 (26日) 18:30 将在电院E咖二楼进行 SJTUG 吃吃喝喝和技术分享活动,欢迎大家参加~</p> +<p>本次分享的嘉宾是冷亦君同学,题目是“Use Abella to prove equivalence of datalog rules in Polonius (the new Rust borrow checker)”。 +届时现场会提供小吃、SJTUG 贴纸、以及来自 Naive Systems 的纪念品。感谢 <a href="https://www.naivesystems.com">Naive Systems</a> 对本次活动的赞助!活动安排如下:</p> +<ul> +<li>18:30 - 19:30 技术分享时间</li> +<li>19:30 - 20:30 小吃和闲聊时间</li> +</ul> +<p>电院E咖的位置在电子信息与电气工程学院 2 号楼和 3 号楼之间。</p> +<p>本次分享没有直播,下次一定。slides 已经上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a>。</p> +<p><img src="https://sjtug.org/images/2021-11.in-event.jpeg" alt="in-event"></p> + + + + + 镜像站将于11月14日周日上午4时维护 + https://sjtug.org/post/mirror-news/2021-11-05-maintain/ + Fri, 05 Nov 2021 13:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-11-05-maintain/ + <p>SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2021年11月14日周日 上午4时 UTC+8 进行系统升级。在此期间服务会中断大约半小时。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 33 升级到 Fedora 35。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2021年11月12日 (周五) 上午8时:我们将升级服务器上的软件包,并进行重启,为周日的升级做准备。期间服务可能会中断 5 分钟。</li> +<li>2021年11月14日 (周日) 上午4时:服务器将重启进行系统升级,在此期间服务会中断大约半小时。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站10月7日9时起服务不可用 (已恢复) + https://sjtug.org/post/mirror-news/2021-10-07-outage/ + Thu, 07 Oct 2021 09:45:00 +0800 + + https://sjtug.org/post/mirror-news/2021-10-07-outage/ + <p>由于 mirrors.sjtug.sjtu.edu.cn 升级时出现问题,镜像站服务目前处于不完全可用状态。我们正在调查服务器升级失败的原因,并尝试重启服务器。</p> +<ul> +<li>上午11时更新:初步确定服务器无法启动的原因是意外将三年前的 grub 配置覆盖了最新配置,导致无法正常进入系统。正在尝试重新生成 grub 引导配置。</li> +<li>下午3时更新:我们已经进入 Fedora recovery mode 进行修复工作。</li> +<li>8日上午9时更新:服务已经恢复。我们还将做一些维护工作,期间可能有服务中断。</li> +</ul> + + + + + 关于近期 HTTPS 证书问题的相关提示 (已更新证书) + https://sjtug.org/post/mirror-news/2021-10-04-cert/ + Mon, 04 Oct 2021 00:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-10-04-cert/ + <p>SJTUG 软件源镜像使用 Let&rsquo;s Encrypt 签发的 HTTPS 证书提供服务。2021 年 9 月 30 日晚上 10 时,用于交叉签名根证书的 <a href="https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/">DST Root CA X3 过期</a>。因此,在老版本系统中,您可能会碰到错误的“证书过期”提示。</p> +<p>如果您在更新软件包时遇到困难,可以参考对应软件源的帮助文档,先将软件源设置成 HTTP 协议访问;而后参考 <a href="https://github.com/tuna/issues/issues/1342#issuecomment-931412628">TUNA 的解决方案</a> 更新您的系统,从而从 SJTUG 镜像站获取最新的软件更新。</p> +<ul> +<li>10月12日0时更新:mirrors.sjtug.sjtu.edu.cn 已经去掉了 DST Root CA X3,证书链仅保留 ISRG Root X1。</li> +<li>10月12日0时更新:mirror.sjtu.edu.cn 已经去掉了 DST Root CA X3,证书链仅保留 ISRG Root X1。</li> +</ul> + + + + + 镜像站将于10月6-7日上午8时维护 + https://sjtug.org/post/mirror-news/2021-09-26-maintain/ + Sun, 26 Sep 2021 13:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-09-26-maintain/ + <p>SJTUG 软件源镜像站的两台服务器将分别于 2021年10月6日 上午8时 UTC+8 和 2021年10月7日 上午8时 UTC+8 起进行服务器架构升级,届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 和 mirror.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 31 升级到 Fedora 33。</li> +<li>将思源镜像服务器的操作系统从 Debian 10 升级到 Debian 11。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2021年10月6日 上午8时起,我们将首先维护思源镜像站 (mirror.sjtu.edu.cn)。Debian 系统升级将在 30 分钟内完成,期间可能会出现服务中断的情况。</li> +<li>之后将进行机器重启,思源镜像站的所有服务可能会出现 5 分钟左右的中断。如出现兼容性问题,可能会中断更长时间。</li> +<li>2021年10月7日 上午4时起,我们将维护致远镜像站 (mirrors.sjtug.sjtu.edu.cn)。Fedora 系统升级将在 2 小时内完成,期间将停止服务。</li> +<li>2021年10月7日 上午8时起,我们将更新配置。Fedora 系统配置将在 30 分钟内完成,期间可能会出现服务中断的情况。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> +<p><em>更新:致远镜像站将升级到 Fedora 33 而非 Fedora 34。</em></p> +<p><em>更新:致远镜像站将会在 4 时起停机更新,而非 8 时。</em></p> + + + + + 新增 DGL, Fedora Rawhide, OpenBSD, Raspbian Addons, Ubuntu Kylin, Ubuntu Cloud Images, Zorinos ISOs 镜像 + https://sjtug.org/post/mirror-news/2021-08-26-new-mirrors/ + Thu, 26 Aug 2021 15:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-08-26-new-mirrors/ + <p>SJTUG 软件源镜像在近期添加了一批新的镜像源。</p> +<ul> +<li>添加 Raspbian Addons 镜像。<a href="https://github.com/sjtug/mirror-docker-unified/pull/261">PR#261</a></li> +<li>添加 Fedora Rawhide 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/264">PR#264</a></li> +<li>添加 DGL (anaconda/cloud/dglteam) 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/268">PR#268</a></li> +<li>添加 OpenBSD 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/269">PR#269</a></li> +<li>添加 Ubuntu Kylin 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/270">PR#270</a></li> +<li>添加 Zorinos ISOs 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/271">PR#271</a></li> +<li>添加 Ubuntu Cloud Images 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/275">PR#275</a></li> +</ul> +<p>与此同时,我们也做了一些功能上的更新:</p> +<ul> +<li>修复了 ghcup 的同步。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/274">PR#274</a></li> +<li>Caddy Web Server 升级到了 2.4.3。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/271">PR#271</a></li> +<li>Zhiyuan 镜像服务器 (mirrors.sjtug) 支持 IPv6。</li> +</ul> +<p>欢迎大家使用。</p> + + + + + docker-ce + https://sjtug.org/post/mirror-help/docker-ce/ + Sat, 21 Aug 2021 00:33:00 +0800 + + https://sjtug.org/post/mirror-help/docker-ce/ + <h1 id="docker-community-edition-镜像使用帮助">Docker Community Edition 镜像使用帮助</h1> +<p><strong>注意: 本镜像只提供 Debian/Ubuntu/Fedora/CentOS/RHEL 的 docker 软件包,非 dockerhub</strong></p> +<h2 id="debianubuntu-用户">Debian/Ubuntu 用户</h2> +<p>以下内容根据 <a href="https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/">TUNA文档</a> 修改而来。</p> +<p>如果你过去安装过 docker,先删掉:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo apt-get remove docker docker-engine docker.io +</code></pre></div><p>首先安装依赖:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common +</code></pre></div><p>根据你的发行版,下面的内容有所不同。你使用的发行版:</p> +<details><summary>Debian</summary> +信任 Docker 的 GPG 公钥: +<pre>curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -</pre> +对于 amd64 架构的计算机,添加软件仓库: +<pre> +sudo add-apt-repository \ + "deb [arch=amd64] https://mirror.sjtu.edu.cn/docker-ce/linux/debian \ + $(lsb_release -cs) \ + stable" +</pre> +如果你用的是树莓派或其它ARM架构计算机,请运行: +<pre> +echo "deb [arch=armhf] https://mirror.sjtu.edu.cn/docker-ce/linux/debian \ + $(lsb_release -cs) stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list +</pre> +最后安装 +<pre> +sudo apt-get update +sudo apt-get install docker-ce +</pre> +</details> +<details><summary>Ubuntu</summary> +信任 Docker 的 GPG 公钥: +<pre>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</pre> +对于 amd64 架构的计算机,添加软件仓库: +<pre> +sudo add-apt-repository \ + "deb [arch=amd64] https://mirror.sjtu.edu.cn/docker-ce/linux/ubuntu \ + $(lsb_release -cs) \ + stable" +</pre> +如果你用的是树莓派或其它ARM架构计算机,请运行: +<pre> +echo "deb [arch=armhf] https://mirror.sjtu.edu.cn/docker-ce/linux/ubuntu \ + $(lsb_release -cs) stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list +</pre> +最后安装 +<pre> +sudo apt-get update +sudo apt-get install docker-ce +</pre> +</details> +<h2 id="fedoracentosrhel">Fedora/CentOS/RHEL</h2> +<p>以下内容根据<a href="https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/">TUNA文档</a>修改而来。</p> +<p>如果你之前安装过 docker,请先删掉</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo yum remove docker docker-common docker-selinux docker-engine +</code></pre></div><p>安装一些依赖</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo yum install -y yum-utils device-mapper-persistent-data lvm2 +</code></pre></div><p>根据你的发行版下载repo文件:</p> +<details><summary>CentOS/RHEL</summary> +<pre> +wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo +</pre> +</details> +<details><summary>Fedora</summary> +<pre> +wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/fedora/docker-ce.repo +</pre> +</details> +<p>把软件仓库地址替换为 SJTUG:</p> +<pre> +sudo sed -i 's+download.docker.com+mirror.sjtu.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo +</pre> +<p>最后安装:</p> +<pre> +sudo yum makecache fast +sudo yum install docker-ce +</pre> + + + + + 新增 AlmaLinux, Armbian, Fedora development, ghcup, Linux kernel, Rocky Linux 镜像 + https://sjtug.org/post/mirror-news/2021-05-25-new-mirrors/ + Tue, 25 May 2021 14:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-05-25-new-mirrors/ + <p>SJTUG 软件源镜像在近期添加了一批新的镜像源。</p> +<ul> +<li>添加 ghcup 镜像。<a href="https://github.com/sjtug/mirror-docker-unified/pull/225">PR#225</a></li> +<li>添加 Armbian 和 AlmaLinux 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/227">PR#227</a></li> +<li>添加 Linux kernel 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/228">PR#228</a></li> +<li>添加了 Fedora development 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/236">PR#236</a> <a href="https://github.com/sjtug/mirror-docker-unified/pull/238">PR#238</a></li> +<li>添加了 Rocky Linux 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/246">PR#246</a></li> +</ul> +<p>与此同时,我们也做了一些功能上的更新:</p> +<ul> +<li>Homebrew 支持从 ghcr.io 同步。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/245">PR#245</a></li> +<li>Rsync 的磁盘限制大大减小,可以为下游提供文件同步服务了。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/240">PR#240</a></li> +<li>git 源切换到了 git.sjtu.edu.cn 提供服务,用户体验更好。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/249">PR#249</a></li> +<li>Caddy Web Server 升级到了 2.4.0。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/248">PR#248</a></li> +</ul> +<p>欢迎大家使用。</p> + + + + + alpine + https://sjtug.org/post/mirror-help/alpine/ + Sat, 17 Apr 2021 17:44:00 +0800 + + https://sjtug.org/post/mirror-help/alpine/ + <p>Alpine Linux 是一个面向安全,轻量级的基于musl libc与busybox项目的Linux发行版。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#e6db74">&#39;s/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g&#39;</span> /etc/apk/repositories +</code></pre></div> + + + + ghcup + https://sjtug.org/post/mirror-help/ghcup/ + Tue, 30 Mar 2021 23:50:00 +0800 + + https://sjtug.org/post/mirror-help/ghcup/ + <p>Ghcup 是一种用于安装 Haskell 的工具,它使得用户可以轻易地在 GNU/Linux、macOS 和 FreeBSD 上安装特定版本的 ghc,并从零开始搭建好一个全新的 Haskell 开发环境(包括 cabal 与 HLS 支持)。</p> +<p><strong>使用说明</strong></p> +<p>创建 <code>~/.ghcup/config.yaml</code> 并输入以下内容</p> +<pre><code>url-source: + OwnSource: &quot;https://mirror.sjtu.edu.cn/ghcup/yaml/ghcup/data/ghcup-0.0.6.yaml&quot; +</code></pre><p>如果您尚未安装 ghcup,请在完成以上步骤后,于终端中执行以下指令(请不要以 root 用户执行),随后跟随屏幕上的指引完成安装。</p> +<ul> +<li>如果您运行的是 Linux, macOS (Intel), FreeBSD 或 WSL,请执行</li> +</ul> +<pre><code>curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | sh +</code></pre><ul> +<li>如果您运行的是 macOS (Apple 芯片) 请执行</li> +</ul> +<pre><code>curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | arch -x86_64 /bin/bash +</code></pre><p><strong>故障排除</strong></p> +<ol> +<li>ghcup 出现形如 <code>[ Error ] JSON decoding failed with: AesonException</code> 的错误</li> +</ol> +<p>这可能是由于本机 ghcup 版本与配置文件版本不匹配造成。 +ghcup 于 0.1.15.1 版本前使用 0.0.4 版本的配置文件,此版本及之后的版本使用 0.0.5+ 版本的配置文件。 +请尝试将 <code>config.yaml</code> 中的 <code>ghcup-0.0.6.yaml</code> 改为 <code>ghcup-0.0.4.yaml</code> (抑或反之)后重试。</p> +<p>请注意,ghcup 上游倾向于仅更新最新版本配置文件中的内容,当版本发生变化后请及时更新配置文件版本。</p> +<ol start="2"> +<li>通过 ghcup 安装软件包时出现 <code>Error: Download failed ...</code> 错误</li> +</ol> +<p>这一错误可能是由于您的 ghcup 版本过老,使用的配置文件已经长久未更新,其中包含的软件包版本过旧所致。我们将尽力保留旧版本的软件包,但当存储空间不足时,可能随时删除旧文件。本镜像站仅保证同步最新版本配置文件中包含的软件包。</p> +<p>当出现上述现象时,请首先尝试更新 ghcup 的版本,并根据 <code>故障排除 1</code> 的指示修改配置文件。若 ghcup 已无法更新,可以尝试删除 <code>~/.ghcup</code> 整个文件夹(这一操作将删除 ghcup 以及所有通过 ghcup 安装的软件),并根据 <code>使用说明</code> 重新安装最新版本的 ghcup。</p> +<p>若完成以上步骤后问题仍未解决,请至 <a href="https://github.com/sjtug/mirror-requests">此处</a> 向我们反馈 BUG。</p> + + + + + 新增 conda-forge/osx-arm64, GIMP, MacPorts, VSCodium 镜像 + https://sjtug.org/post/mirror-news/2021-03-23-new-mirrors/ + Tue, 23 Mar 2021 14:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-03-23-new-mirrors/ + <p>SJTUG 软件源镜像在本月添加了一批新的镜像源。</p> +<ul> +<li>conda-forge 添加了 Apple M1 平台支持。<a href="https://github.com/sjtug/mirror-docker-unified/pull/222">PR#222</a></li> +<li>GIMP <a href="https://github.com/sjtug/mirror-docker-unified/pull/220">PR#220</a></li> +<li>MacPorts <a href="https://github.com/sjtug/mirror-docker-unified/pull/216">PR#216</a></li> +<li>VSCodium <a href="https://github.com/sjtug/mirror-docker-unified/pull/208">PR#208</a></li> +</ul> +<p>与此同时,我们也做了一些功能上的更新:</p> +<ul> +<li>存储在 SJTU S3 上的软件源现在可以浏览所有文件了。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/212">PR#212</a></li> +<li>Flutter 切换到了新上游。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/209">PR#209</a></li> +<li>openSUSE 添加到了官方源。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/215">PR#215</a></li> +</ul> +<p>欢迎大家使用。</p> + + + + + SJTUG 2021 年春季招新 + https://sjtug.org/post/2021-03-09-welcome/ + Tue, 09 Mar 2021 23:00:00 +0800 + + https://sjtug.org/post/2021-03-09-welcome/ + <p>SJTUG (上海交通大学 Linux 用户组) 是一个非盈利的技术组织。只要你对 *nix 相关技术感兴趣、有热情,即可成为我们的一员。</p> +<p>成为 SJTUG 的一员,即可参与:</p> +<ul> +<li>不定期的技术分享活动。</li> +<li>不确定的学期吃锅活动。</li> +<li>参与维护软件源镜像站。(仅限校内成员)</li> +</ul> +<p>加入 SJTUG 成员所在的讨论组,即可成为 SJTUG 的一员。相关的活动通知也会同步发送到这些位置。目前 SJTUG 的成员主要出现在这些地方:</p> +<ul> +<li>SJTUG 微信群。由于群人数即将达到限制,目前仅能通过邀请入群。</li> +<li>2021 年新建的 QQ 群。群号 715273806。</li> +<li>电报群。首先,关注 <a href="https://t.me/sjtug_mirrors_news">SJTUG 镜像站的通知频道</a>。而后,加入频道关联的群组。</li> +</ul> +<p>期待您的加入!</p> + + + + + 新增 Bioconductor, openEuler, Void Linux, Wireshark 镜像 + https://sjtug.org/post/mirror-news/2021-03-06-new-mirrors/ + Sat, 06 Mar 2021 18:40:00 +0800 + + https://sjtug.org/post/mirror-news/2021-03-06-new-mirrors/ + <p>近期,SJTUG 的镜像同步工具 mirror-clone <a href="https://github.com/sjtug/mirror-clone/pull/57">添加了 Rsync 支持</a>。 +在此基础上,我们增加了 Bioconductor, Void Linux 和 Wireshark 镜像。这三个镜像都存储在 SJTU 对象存储服务上。 +从这些软件源下载软件时,您会被自动重定向到 SJTU 对象存储服务。</p> +<p>我们还增加了 openEuler 镜像,存储在思源 (mirror.sjtu.edu.cn) 服务器上。</p> +<p>您可以参阅镜像站首页的帮助文档,配置相关软件使用 SJTUG 镜像。</p> +<p>与此同时,由于致远服务器压力过大,我们将部分软件源迁移到了其他存储中。您可以调整相关软件的设置,以取得最好的使用体验。</p> +<ul> +<li>manjaro 迁移到了思源服务器。</li> +<li>archlinux 迁移到了思源服务器。</li> +<li>ctan 迁移到了思源服务器。</li> +<li>anaconda 迁移到了 SJTU 对象存储服务。</li> +</ul> +<p>欢迎大家使用。</p> + + + + + qt + https://sjtug.org/post/mirror-help/qt/ + Mon, 22 Feb 2021 11:00:00 +0800 + + https://sjtug.org/post/mirror-help/qt/ + <p>通常来说,Qt 在线安装器会自动选择最近的镜像,因此无需做特殊设置即可使用 SJTUG Qt 镜像。</p> +<p>你可以通过下面的方法手动指定 Qt 镜像。</p> +<ul> +<li>使用离线安装器安装:在 <a href="https://www.qt.io/offline-installers">Offline Installers</a> 页面中找到需要下载的版本,并将链接中的 +<code>http://download.qt.io</code> 替换为 <code>https://mirrors.sjtug.sjtu.edu.cn/qt</code>。</li> +<li>使用在线安装器安装:参考 <a href="https://wiki.qt.io/Online_Installer_4.x#Selecting_a_mirror_for_opensource">Qt Wiki</a>, +在命令行中给安装器提供 <code>--mirror https://mirrors.sjtug.sjtu.edu.cn/qt</code> 的参数。比如在 macOS 上:</li> +</ul> +<pre><code>./qt-unified-macOS-x86_64-4.0.1-1-online.app/Contents/MacOS/qt-unified-macOS-x86_64-4.0.1-1-online --mirror https://mirrors.sjtug.sjtu.edu.cn/qt +</code></pre> + + + + 镜像站将于2月17日上午8时维护 + https://sjtug.org/post/mirror-news/2021-02-10-maintain/ + Wed, 10 Feb 2021 13:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-02-10-maintain/ + <p>SJTUG 软件源镜像站致远镜像服务器将于 2021年2月17日 上午8时 UTC+8 起进行服务器架构升级,届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将 ftp.sjtu.edu.cn 的反向代理源更改为思源镜像服务器的对应镜像。</li> +<li>解决部分目录重定向到错误路径导致 404 的问题。</li> +<li>停止提供 nodejs-release, maven-central, npm-registry, google-fonts 服务,相关服务会重定向到上游。 +技术详情可以参阅 <a href="https://github.com/sjtug/mirror-docker-siyuan/projects/1">Zhiyuan Migration Project</a>。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>维护前 24 小时停止 rsync 服务,使得上游不再将用户重定向到本镜像站。</li> +<li>Web 服务器重启将在 5 分钟内完成。在此期间,所有软件源均不可用。</li> +<li>同步服务重启将在 30 分钟内完成。在此期间,前端将无法显示同步状态。</li> +<li>涉及到子域名的服务(如 Docker 反代、anaconda)可能无法立即正常提供服务,在 1 小时内可以恢复。</li> +</ul> +<p>在新年来临之际,我谨代表 SJTUG 镜像站维护人员,祝大家在即将到来的一年里,阖家欢乐,万事如意。</p> + + + + + fedora-ostree + https://sjtug.org/post/mirror-help/fedora-ostree/ + Mon, 04 Jan 2021 22:00:00 +0800 + + https://sjtug.org/post/mirror-help/fedora-ostree/ + <p>fedora-ostree 是 Fedora Silverblue (原 Atomic Workstation) 的智能缓存。 +Fedora Silverblue 通过 rpm-ostree 管理整个系统。 +当您第一次请求镜像中的资源时,如果文件没有被镜像服务器缓存,我们会将您重定向回原站, +并在后台进行缓存。目前镜像服务器上已经预先缓存了所有 fedora-ostree 仓库的分支。</p> +<p>使用方法:编辑 <code>/etc/ostree/remotes.d/fedora.conf</code></p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-plain" data-lang="plain">[remote &#34;fedora&#34;] +url=https://mirror.sjtu.edu.cn/fedora-ostree +gpg-verify=true +gpgkeypath=/etc/pki/rpm-gpg/ +# contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist +</code></pre></div> + + + + flathub + https://sjtug.org/post/mirror-help/flathub/ + Mon, 04 Jan 2021 22:00:00 +0800 + + https://sjtug.org/post/mirror-help/flathub/ + <p>Flathub 镜像是 <a href="https://flathub.org">flathub.org</a> 的智能缓存。当您请求镜像中的资源时, +如果文件没有被镜像服务器缓存,我们会将您重定向回原站,并在后台进行缓存。 +目前镜像服务器上已经预先缓存了所有 Flathub 软件的分支。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo flatpak remote-modify flathub --url<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/flathub +</code></pre></div><p>如果出现错误可尝试:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">wget https://mirror.sjtu.edu.cn/flathub/flathub.gpg +sudo flatpak remote-modify --gpg-import<span style="color:#f92672">=</span>flathub.gpg flathub +</code></pre></div><p>目前 sel.flathub.org 已经重定向到 SJTUG 镜像站。如果您原先使用该服务器作为 Flathub 上游, +无需做任何设置即可使用。</p> +<p>Flathub 中部分软件由于重分发授权问题,需要从官方服务器下载,无法使用镜像站加速。比如 +NVIDIA 驱动、JetBrains 系列软件等。如果您的使用体验不佳,请及时通过 GitHub 或邮件向我们反馈。</p> +<p>如果您中断了某次安装,重新下载可能会出现找不到文件的问题。您可以使用 <code>flatpak repair</code> 解决相关的问题。</p> + + + + + 新增 apache, DragonFlyBSD 等镜像 + https://sjtug.org/post/mirror-news/2021-01-04-siyuan-available/ + Mon, 04 Jan 2021 16:30:00 +0800 + + https://sjtug.org/post/mirror-news/2021-01-04-siyuan-available/ + <p>SJTUG 的新服务器“思源 (Siyuan)”服务器已经在 <a href="https://mirror.sjtu.edu.cn">https://mirror.sjtu.edu.cn</a> 上线。 +该服务器兼容原 <a href="https://ftp.sjtu.edu.cn">ftp.sjtu.edu.cn</a> 服务器提供的服务,并在此基础上增加了许多软件源镜像。 +原先的 <a href="https://ftp.sjtu.edu.cn">ftp.sjtu.edu.cn</a> 将在近几个月内解析至 SJTUG 思源镜像服务器。</p> +<p>新服务器兼容以下 18 个 <a href="https://ftp.sjtu.edu.cn">ftp.sjtu.edu.cn</a> 上的软件源镜像。</p> +<ul> +<li>centos</li> +<li>debian</li> +<li>debian-cd</li> +<li>debian-security</li> +<li>deepin</li> +<li>deepin-cd</li> +<li>fedora/linux</li> +<li>fedora/epel</li> +<li>fedora-secondary</li> +<li>linuxmint</li> +<li>linuxmint-cd</li> +<li>mageia</li> +<li>opensuse</li> +<li>openvz</li> +<li>remi</li> +<li>scientific</li> +<li>ubuntu</li> +<li>ubuntu-cd</li> +</ul> +<p>新服务器新增了以下 8 个镜像。</p> +<ul> +<li>apache</li> +<li>docker-ce</li> +<li>ubuntu-cdimage</li> +<li>ubuntu-ports</li> +<li>openwrt</li> +<li>rpmfusion</li> +<li>dragonflybsd/dports</li> +<li>dragonflybsd/iso-images</li> +</ul> +<p>与此同时,我们也上线了大量常用 git 仓库镜像。</p> +<p>欢迎大家继续使用 SJTUG 镜像站。</p> + + + + + 新增 FreeCAD 镜像与 GitHub Release 智能缓存 + https://sjtug.org/post/mirror-news/2021-01-02-add-github-release-freecad/ + Sat, 02 Jan 2021 09:55:00 +0800 + + https://sjtug.org/post/mirror-news/2021-01-02-add-github-release-freecad/ + <p>FreeCAD 镜像可以在 <a href="https://mirrors.sjtug.sjtu.edu.cn/github-release/FreeCAD/FreeCAD/releases/download/?mirror_intel_list">这里</a> 访问,我们已经全量同步了近 3 个版本。</p> +<p>目前 GitHub Release 智能缓存只开放了 FreeCAD 项目的缓存。您可以在 <a href="https://github.com/sjtug/mirror-requests/issues">mirror-requests</a> 中通过 issue 的方式请求添加新的 GitHub Release 镜像。</p> + + + + + Dart 与 Flutter 镜像源已全量同步 + https://sjtug.org/post/mirror-news/2020-12-25-fix-flutter/ + Fri, 25 Dec 2020 13:15:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-25-fix-flutter/ + <p>在 Flutter 中文社区的大力支持下,我们修复了 Dart 与 Flutter 镜像访问不稳定的问题。请参考帮助文档进行配置。欢迎大家继续使用 SJTUG 镜像源。</p> + + + + + Guix 镜像源正式上线 + https://sjtug.org/post/mirror-news/2020-12-21-release-guix/ + Mon, 21 Dec 2020 15:30:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-21-release-guix/ + <p>在 Guix 中文社区的大力支持下,我们上线了 Guix 镜像源。Guix 镜像源的实现方式是智能缓存。当镜像站用户第一次请求某个资源时,它会被永久缓存在镜像站服务器上。</p> +<p>Guix 镜像源分为 git 镜像和 substitute 镜像,请参考帮助文档进行配置。欢迎大家使用。</p> + + + + + PyPI 全量同步镜像源重新上线 + https://sjtug.org/post/mirror-news/2020-12-08-add-pypi/ + Thu, 10 Dec 2020 13:30:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-08-add-pypi/ + <p>继 SJTUG 镜像源智能缓存上线后,我们从清华大学开源软件镜像站 (TUNA) 全量同步了 PyPI 软件源。感谢上海交通大学网络信息中心和 TUNA 的支持。欢迎大家继续使用 PyPI 镜像源。</p> + + + + + SJTUG 镜像源智能缓存正式上线 + https://sjtug.org/post/mirror-news/2020-12-07-announcing-new-arch/ + Mon, 07 Dec 2020 12:00:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-07-announcing-new-arch/ + <p>SJTUG 镜像在近期进行了一次更新。我们开发了智能缓存工具 <a href="https://github.com/sjtug/mirror-intel">mirror-intel</a>, +并将部分反向代理软件源移植到了智能缓存系统上。</p> +<p>智能缓存的后端是由上海交通大学网络信息中心提供的对象存储服务。</p> +<p>当您访问智能缓存软件源时,服务器会先检测文件是否在对象存储中。如果存在,请求会直接被重定向到 <a href="https://s3.jcloud.sjtu.edu.cn">https://s3.jcloud.sjtu.edu.cn</a> 。 +否则,请求会被重定向到上游;与此同时,智能缓存会将文件同步到对象存储中。</p> +<p>目前通过智能缓存提供服务的软件源镜像包括:</p> +<ul> +<li>rust-static (rustup 镜像源)。上游为 <a href="https://static.rust-lang.org">https://static.rust-lang.org</a> 。近三个月的工具链均已缓存。</li> +<li>crates.io (cargo 包管理器镜像源)。上游为 <a href="https://static.crates.io">https://static.crates.io</a> 。所有包都已缓存。</li> +<li>homebrew-bottles。上游为清华大学开源软件镜像站 (TUNA)。所有包都已缓存。</li> +<li>pypi-packages。上游为清华大学开源软件镜像站 (TUNA)。正在同步中。</li> +<li>flathub, fedora-ostree, fedora-iot 均使用官方 ostree 上游。所有分支都已缓存。ostree 镜像还在测试阶段,正式版会在近几个月内发布。</li> +</ul> +<p>欢迎大家的使用~</p> + + + + + gcr.io + https://sjtug.org/post/mirror-help/gcr-io/ + Fri, 23 Oct 2020 10:00:00 +0800 + + https://sjtug.org/post/mirror-help/gcr-io/ + <p>该镜像是 gcr.io 反代。将所有需要用到 gcr.io 的地址换成 gcr-io.mirrors.sjtug.sjtu.edu.cn 即可。比如:</p> +<pre><code>docker pull gcr-io.mirrors.sjtug.sjtu.edu.cn/google_containers/echoserver:1.4 +</code></pre> + + + + git/opam-repository.git + https://sjtug.org/post/mirror-help/opam-git/ + Tue, 13 Oct 2020 19:00:00 +0800 + + https://sjtug.org/post/mirror-help/opam-git/ + <p><a href="https://opam.ocaml.org">opam</a> 是 OCaml 的包管理器。SJTUG 提供 opam 的反代服务。</p> +<p>首次使用 opam,可以使用 SJTUG 镜像源初始化 opam。</p> +<pre><code>opam init default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git +</code></pre><p>使用下面的指令,可以将默认源替换为 SJTUG 镜像。</p> +<pre><code>opam repo set-url default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git --all --set-default +</code></pre> + + + + 新增 emacs-elpa 与 msys2 镜像 + https://sjtug.org/post/mirror-news/2020-09-28-new-mirrors/ + Mon, 28 Sep 2020 14:00:00 +0800 + + https://sjtug.org/post/mirror-news/2020-09-28-new-mirrors/ + <p>SJTUG 镜像在最近两个月中新增了下面两个镜像。</p> +<ul> +<li>emacs-elpa (包含 GNU ELPA, MELPA, MELPA Stable, Marmalade, Org, Sunrise Commander ELPA, user42 ELPA),上游 emacs-china。</li> +<li>msys2</li> +</ul> +<p>九月中旬,镜像站的反向代理服务出现了一些稳定性问题。我们更换了反向代理方式,提高了 crates.io 等镜像的稳定性。</p> +<p>在 @johnnychen94 的帮助下,镜像站解决了 julia 镜像缺失文件的问题。</p> +<p>Qt 镜像已加入官方源。在使用官方安装器进行安装时,国内用户会自动使用 SJTUG 镜像站下载文件。</p> +<p>Ubuntu, Debian 等 apt 源禁用了 https 自动跳转,现在可以直接使用 http 协议访问。</p> +<p>欢迎大家使用。</p> + + + + + emacs-elpa + https://sjtug.org/post/mirror-help/emacs-elpa/ + Fri, 14 Aug 2020 14:55:00 +0800 + + https://sjtug.org/post/mirror-help/emacs-elpa/ + <p>emacs-elpa 包含了 GNU ELPA, NonGNU ELPA, MELPA, MELPA Stable, Org 这 5 个镜像。</p> +<table> +<thead> +<tr> +<th>ELPA</th> +<th>镜像地址</th> +</tr> +</thead> +<tbody> +<tr> +<td><a href="https://elpa.gnu.org/">GNU ELPA</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/</a></td> +</tr> +<tr> +<td><a href="https://elpa.gnu.org/nongnu/">NonGNU ELPA</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/nongnu/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/nongnu/</a></td> +</tr> +<tr> +<td><a href="https://melpa.org/">MELPA</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/</a></td> +</tr> +<tr> +<td><a href="https://stable.melpa.org/#/">MELPA Stable</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/stable-melpa/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/stable-melpa/</a></td> +</tr> +<tr> +<td><a href="https://orgmode.org/elpa.html">Org</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/</a></td> +</tr> +</tbody> +</table> +<h2 id="使用方法">使用方法</h2> +<p>根据你的需求,设置 <code>package-archives</code> ,比如用 GNU ELPA 和 MELPA:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(<span style="color:#66d9ef">setq</span> package-archives <span style="color:#f92672">&#39;</span>((<span style="color:#e6db74">&#34;gnu&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>) + (<span style="color:#e6db74">&#34;melpa&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>))) + +</code></pre></div><h3 id="spacemacs-用户">Spacemacs 用户</h3> +<h4 id="master-分支">master 分支</h4> +<p>添加下面的代码到 <code>.spacemacs</code> 的 <code>dotspacemacs/user-init()</code></p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(<span style="color:#66d9ef">setq</span> configuration-layer--elpa-archives + <span style="color:#f92672">&#39;</span>((<span style="color:#e6db74">&#34;melpa-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>) + (<span style="color:#e6db74">&#34;org-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/&#34;</span>) + (<span style="color:#e6db74">&#34;gnu-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>))) +</code></pre></div><h4 id="develop-分支">develop 分支</h4> +<p>使用 <code>configuration-layer-elpa-archives</code> 代替原来的 <code>configuration-layer--elpa-archives</code> ( <code>--</code> 换成 <code>-</code> )</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(<span style="color:#66d9ef">setq</span> configuration-layer-elpa-archives + <span style="color:#f92672">&#39;</span>((<span style="color:#e6db74">&#34;melpa-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>) + (<span style="color:#e6db74">&#34;org-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/&#34;</span>) + (<span style="color:#e6db74">&#34;gnu-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>))) +</code></pre></div><h3 id="cask-用户">Cask 用户</h3> +<p><a href="https://github.com/cask/cask">Cask</a> 是一个 Emacs Lisp 的项目管理工具。这里还是以 GNU ELPA 和 MELPA 为例,在添加下面的代码到 Cask</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(source <span style="color:#e6db74">&#34;gnu&#34;</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>) +(source <span style="color:#e6db74">&#34;melpa&#34;</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>) +</code></pre></div><p>本镜像上游为 <a href="https://elpa.emacs-china.org">https://elpa.emacs-china.org</a> 。</p> +<p>SJTUG 不提供 rsync 镜像。</p> + + + + + 新增 archlinuxarm, julia, mongodb, Qt 镜像 + https://sjtug.org/post/mirror-news/2020-08-05-new-mirrors/ + Wed, 05 Aug 2020 18:00:00 +0800 + + https://sjtug.org/post/mirror-news/2020-08-05-new-mirrors/ + <p>SJTUG 镜像源近期迎来了一大批更新。</p> +<ul> +<li>改变了 archlinux 镜像的同步方式,实时性更强。</li> +<li>新增 archlinuxarm 源。</li> +<li>在 anaconda 中新增了 PyTorch 源。</li> +<li>新增 julia 源。该镜像源将成为中国大陆境内官方 Pkg Server 的上游之一。</li> +<li>新增 mongodb 源。</li> +<li>新增 Qt 源。我们近期在联系 Qt,希望将镜像加入官方镜像列表中。</li> +</ul> +<p>欢迎大家体验!</p> +<p>2019-2020 年我们还新增/修复了下面这些镜像:</p> +<ul> +<li>增强了 anaconda 同步的稳定性,修复了部分源 404 的问题。</li> +<li>修复了 CRAN 的同步问题。</li> +<li>修复了 crates.io 的重定向问题。</li> +<li>修复了 dart-package 的重定向问题。</li> +<li>pypi 改为反代。</li> +<li>修复了 maven 的访问问题。</li> +<li>新增了 google-fonts 反代。</li> +<li>新增了 packagist 元数据。</li> +</ul> + + + + + julia + https://sjtug.org/post/mirror-help/julia/ + Wed, 05 Aug 2020 12:00:00 +0800 + + https://sjtug.org/post/mirror-help/julia/ + <p>SJTUG 目前提供了 Julia 的官方包注册表 <a href="https://github.com/JuliaRegistries/General">General</a> 镜像来加速 Julia 包的安装。</p> +<p>关于 Julia 的安装,请使用 <code>julia-releases</code> 镜像。</p> +<p>注:本镜像的使用需要 Julia <code>v1.4.0</code> 或更新的版本。</p> +<h2 id="使用方式">使用方式</h2> +<p>只需要设置环境变量 <code>JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia</code> 即可切换镜像。若成功切换镜像,则能通过 <code>versioninfo()</code> 查询到相关信息,例如:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia">julia<span style="color:#f92672">&gt;</span> versioninfo() +Julia Version <span style="color:#ae81ff">1.5.0</span> +Commit <span style="color:#ae81ff">96786e22</span>cc (<span style="color:#ae81ff">2020</span><span style="color:#f92672">-</span><span style="color:#ae81ff">08</span><span style="color:#f92672">-</span><span style="color:#ae81ff">01</span> <span style="color:#ae81ff">23</span><span style="color:#f92672">:</span><span style="color:#ae81ff">44</span> UTC) +Platform Info<span style="color:#f92672">:</span> + OS<span style="color:#f92672">:</span> macOS (x86_64<span style="color:#f92672">-</span>apple<span style="color:#f92672">-</span>darwin18<span style="color:#ae81ff">.7.0</span>) + CPU<span style="color:#f92672">:</span> Intel(R) Core(TM) i9<span style="color:#f92672">-</span><span style="color:#ae81ff">9880</span>H CPU <span style="color:#960050;background-color:#1e0010">@</span> <span style="color:#ae81ff">2.30</span>GHz + WORD_SIZE<span style="color:#f92672">:</span> <span style="color:#ae81ff">64</span> + LIBM<span style="color:#f92672">:</span> libopenlibm + LLVM<span style="color:#f92672">:</span> libLLVM<span style="color:#f92672">-</span><span style="color:#ae81ff">9.0.1</span> (ORCJIT, skylake) +Environment<span style="color:#f92672">:</span> + JULIA_PKG_SERVER <span style="color:#f92672">=</span> https<span style="color:#f92672">://</span>mirrors<span style="color:#f92672">.</span>sjtug<span style="color:#f92672">.</span>sjtu<span style="color:#f92672">.</span>edu<span style="color:#f92672">.</span>cn<span style="color:#f92672">/</span>julia +</code></pre></div><p>若不设置该环境变量则默认使用官方服务器 <code>pkg.julialang.org</code> 作为上游。本镜像站是其国内服务器的数据上游之一。</p> +<h3 id="临时使用">临时使用</h3> +<p>不同系统和命令行下设置环境变量的方式各不相同,在命令行下可以通过以下方式来临时修改环境变量</p> +<ul> +<li>Linux Bash: <code>export JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia</code></li> +<li>Windows Powershell: <code>$env:JULIA_PKG_SERVER = 'https://mirrors.sjtug.sjtu.edu.cn/julia'</code></li> +</ul> +<p>也可以利用 JuliaCN 社区维护的中文本地化工具包 <a href="https://github.com/JuliaCN/JuliaZH.jl">JuliaZH</a> 来进行切换:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia"><span style="color:#66d9ef">using</span> JuliaZH <span style="color:#75715e"># 在 using 时会自动切换到国内的镜像站</span> +JuliaZH<span style="color:#f92672">.</span>set_mirror(<span style="color:#e6db74">&#34;SJTUG&#34;</span>) <span style="color:#75715e"># 也可以选择手动切换到 BFSU 镜像</span> +JuliaZH<span style="color:#f92672">.</span>mirrors <span style="color:#75715e"># 查询记录的上游信息</span> +</code></pre></div><h3 id="永久使用">永久使用</h3> +<p>不同系统和命令行下永久设定环境变量的方式也不相同,例如 Linux Bash 下可以通过修改 <code>~/.bashrc</code> 文件实现该目的:</p> +<pre><code># ~/.bashrc +export JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia +</code></pre><p>此外,这里再提供一种针对 Julia 的全平台通用的方式:<code>$JULIA_DEPOT_PATH/config/startup.jl</code> +( 默认为 <code>~/.julia/config/startup.jl</code> ) 文件定义了每次启动 Julia 时都会执行的命令,编辑该文件,添加以下内容即可:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia"><span style="color:#75715e"># ~/.julia/config/startup.jl</span> +ENV[<span style="color:#e6db74">&#34;JULIA_PKG_SERVER&#34;</span>] <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/julia&#34;</span> +</code></pre></div><p>也可以选择使用 <code>JuliaZH</code> 来一键修改/创建 <code>startup.jl</code> 文件:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia">julia<span style="color:#f92672">&gt;</span> JuliaZH<span style="color:#f92672">.</span>generate_startup(<span style="color:#e6db74">&#34;SJTUG&#34;</span>) +┌ Info<span style="color:#f92672">:</span> 添加 PkgServer +│ 服务器地址 <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/julia&#34;</span> +└ 配置文件 <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;/root/.julia/config/startup.jl&#34;</span> +</code></pre></div><p>若要临时禁止,可以通过 <code>julia --startup-file=no</code> 来取消执行 <code>startup.jl</code> 文件。</p> +<h2 id="常见问题">常见问题</h2> +<h3 id="加快-condajl-相关操作的速度">加快 Conda.jl 相关操作的速度</h3> +<p><code>Conda.jl</code> 的加速分为两部分:</p> +<ul> +<li><code>conda</code> 的安装:如果系统中没有找到 <code>conda</code> 的话,<code>Conda.jl</code> 会下载并安装一份 miniconda。如果这一步下载非常缓慢的话,你可以提前从 <a href="https://mirrors.bfsu.edu.cn/anaconda/archive/">BFSU 镜像站</a>下载并安装 anaconda,然后通过设置环境变量 <code>CONDA_JL_HOME=$HOME/anaconda3</code> 来指定 <code>Conda.jl</code> 所使用的<code>conda</code>,这样就避免重复下载 <code>miniconda</code>. (<code>$HOME/anaconda3</code>是 anaconda3 的默认安装位置,你可能需要根据具体情况进行调整。)</li> +<li><code>conda add</code> 等操作的加速:这个只需要配置 anaconda 镜像源即可,即修改 <code>~/.condarc</code> 文件。具体的配置可以查看镜像站中 anaconda 镜像的使用说明。</li> +</ul> +<h3 id="为什么有些包的下载还是很慢">为什么有些包的下载还是很慢?</h3> +<p>有两类数据不会被镜像:</p> +<ul> +<li>在 <code>deps/build.jl</code> 文件中硬编码的下载地址,例如 <a href="https://github.com/jheinen/GR.jl/blob/70f025d5cb439d036409f1985107cb5e1615097f/deps/build.jl#L116">GR</a>.</li> +<li>在 <code>Artifacts.toml</code> 中没有给出 <code>download</code> 项的资源, 例如 <a href="https://github.com/JuliaImages/TestImages.jl/blob/eaa94348df619c65956e8cfb0032ecddb7a29d3a/Artifacts.toml">TestImages</a>.</li> +</ul> +<p>在安装包含这两类数据的包时,其数据依然是从原始地址进行下载,因此若网络不稳定则可能会在 <code>build</code> 阶段报错。</p> +<h3 id="为什么注册表还是从原地址下载">为什么注册表还是从原地址下载?</h3> +<p>Julia <code>v1.4.0</code> 之前的版本采用的是 <code>git clone</code> 的方式拉取注册表。为了保持兼容性,如果现有的注册表是一个完整的 git 仓库的话, +那么即使设置了 PkgServer 作为上游镜像也依然会通过 <code>git</code> 来进行更新,换句话说,不会通过镜像站来下载注册表数据。</p> +<p>以默认注册表 <code>General</code> 为例,只需要手动将其重置到镜像站即可:</p> +<ol> +<li>删除当前注册表:<code>(@v1.4) pkg&gt; registry rm General</code></li> +<li>从镜像站重新下载数据:<code>(@v1.4) pkg&gt; registry add General</code></li> +</ol> +<h3 id="为什么有些包还是从原地址下载">为什么有些包还是从原地址下载?</h3> +<p>镜像站只镜像注册表中记录的包,因此如果某些包是通过指定 URL 的方式来安装的话,那么该包的更新不会从镜像站进行下载。 +这常见于那些还未注册的包及其版本,例如:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia">]add Flux<span style="color:#75715e">#master</span> +]add https<span style="color:#f92672">://</span>github<span style="color:#f92672">.</span>com<span style="color:#f92672">/</span>FluxML<span style="color:#f92672">/</span>Flux<span style="color:#f92672">.</span>jl<span style="color:#f92672">.</span>git +Pkg<span style="color:#f92672">.</span>add(PackageSpec(url<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://github.com/FluxML/Flux.jl.git&#34;</span>)) +</code></pre></div> + + + + julia-releases + https://sjtug.org/post/mirror-help/julia-releases/ + Wed, 05 Aug 2020 12:00:00 +0800 + + https://sjtug.org/post/mirror-help/julia-releases/ + <h2 id="julia-二进制安装程序">Julia 二进制安装程序</h2> +<p>Julia 是一个全新的以科学计算为核心的通用编程语言,本镜像为其二进制发行程序。关于 Julia 下各种工具包的安装,请使用 <code>julia</code> 镜像。</p> +<p>这里仅镜像 <a href="https://julialang.org/downloads/">JuliaLang Downloads</a> 中提供的稳定发行版以及 rc 版本。每日构建的测试版 (nightlies) 以及 +<a href="http://junolab.org/">Juno</a>/<a href="https://juliacomputing.com/products/juliapro">Julia Pro</a>等 IDE 版本不包括在内。</p> +<p>尽管一些包管理工具(例如 <code>apt</code>, <code>pacman</code>, <code>conda</code>, <code>choco</code>) 中提供有 Julia,但是这些工具或多或少都存在一些由二进制 +依赖导致的问题,因此官方推荐的方式是根据自己的使用平台下载相应的二进制程序,然后通过解压的方式进行手动安装。</p> +<h2 id="julia-一键安装">Julia 一键安装</h2> +<p>对于习惯命令行的用户而言,<a href="https://github.com/johnnychen94/jill.py">jill.py</a> 是一个社区维护的全平台下一键安装 +Julia 的命令行工具。</p> +<p>安装/更新 <code>jill</code>: <code>pip install jill --user -U</code> (需要 Python <code>3.6</code> 或更新的版本)</p> +<ul> +<li>安装 Julia:<code>jill install [VERSION] [--upstream UPSTREAM] [--confirm]</code> +<ul> +<li><code>jill install</code>:最新的 <code>x.y.z</code> 版本</li> +<li><code>jill install --confirm</code>:无需交互确认直接安装</li> +<li><code>jill install --upstream SJTUG</code>:从本镜像站下载并安装</li> +<li><code>jill install 1.5</code>:安装最新的 <code>1.5.z</code> 版本</li> +</ul> +</li> +<li>查询现存的上游镜像:<code>jill upstream</code></li> +<li>帮助文档:<code>jill [COMMAND] --help</code> +<ul> +<li><code>jill --help</code>:查询存在的 <code>jill</code> 命令</li> +<li><code>jill install --help</code>:查询 <code>install</code> 命令的使用方式</li> +</ul> +</li> +</ul> +<p>利用 <code>jill</code> 安装完成后即可通过在命令行执行 <code>julia</code>/<code>julia-1</code>/<code>julia-1.5</code> 来启动不同版本的 Julia.</p> + + + + + mongodb + https://sjtug.org/post/mirror-help/mongodb/ + Sat, 01 Aug 2020 23:30:00 +0800 + + https://sjtug.org/post/mirror-help/mongodb/ + <p>mongodb 源是 <a href="http://repo.mongodb.org">repo.mongodb.org</a> 的全量同步。</p> +<p><strong>使用说明</strong></p> +<p>请参照官方教程配置并安装 <a href="https://docs.mongodb.com/manual/administration/install-on-linux/">https://docs.mongodb.com/manual/administration/install-on-linux/</a>。 +在安装过程中,把 <code>https://repo.mongodb.org/</code> 替换为 <code>https://mirrors.sjtug.sjtu.edu.cn/mongodb/</code>。比如在 Ubuntu focal 中使用时,可以执行以下指令。</p> +<pre><code>wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - +echo &quot;deb [ arch=amd64,arm64 ] https://mirrors.sjtug.sjtu.edu.cn/mongodb/apt/ubuntu/ focal/mongodb-org/4.4 multiverse&quot; | tee /etc/apt/sources.list.d/mongodb-org-4.4.list +</code></pre> + + + + crates.io + https://sjtug.org/post/mirror-help/crates.io/ + Thu, 09 Jul 2020 01:00:00 +0800 + + https://sjtug.org/post/mirror-help/crates.io/ + <p>编辑 <code>~/.cargo/config.toml</code></p> +<pre><code>[source] + +[source.mirror] +registry = &quot;sparse+https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/&quot; + +[source.crates-io] +replace-with = &quot;mirror&quot; +</code></pre><p>若您的 cargo 版本低于 1.68,请使用以下配置</p> +<pre><code>[source] + +[source.mirror] +registry = &quot;https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/&quot; + +[source.crates-io] +replace-with = &quot;mirror&quot; +</code></pre> + + + + git/crates.io-index + https://sjtug.org/post/mirror-help/creates.io.git/ + Thu, 09 Jul 2020 01:00:00 +0800 + + https://sjtug.org/post/mirror-help/creates.io.git/ + <p>编辑 <code>~/.cargo/config</code></p> +<pre><code>[source] + +[source.mirror] +registry = &quot;https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/&quot; + +[source.crates-io] +replace-with = &quot;mirror&quot; +</code></pre> + + + + cran + https://sjtug.org/post/mirror-help/cran/ + Sat, 04 Jul 2020 15:33:04 +0800 + + https://sjtug.org/post/mirror-help/cran/ + <p>使用方法:</p> +<p>在安装时指定 repo。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-R" data-lang="R"><span style="color:#a6e22e">install.packages</span>(<span style="color:#e6db74">&#34;lattice&#34;</span>, repos<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/cran/&#34;</span>) +</code></pre></div><p>在 <code>.Rprofile</code> 中设置默认 repo。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-R" data-lang="R"><span style="color:#a6e22e">options</span>(repos<span style="color:#f92672">=</span><span style="color:#a6e22e">structure</span>(<span style="color:#a6e22e">c</span>(CRAN<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/cran/&#34;</span>))) +</code></pre></div> + + + + 镜像站将于4月20日凌晨2点维护 + https://sjtug.org/post/mirror-news/2020-04-18-maintain/ + Sat, 18 Apr 2020 19:00:00 -0400 + + https://sjtug.org/post/mirror-news/2020-04-18-maintain/ + <p>SJTUG 软件源镜像站 将在 2020年4月20日 凌晨2时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:2小时。</p> + + + + + 关于19年10月软件源日志泄漏的通告 + https://sjtug.org/post/mirror-news/2019-10-10-data-leak/ + Thu, 10 Oct 2019 19:37:00 -0700 + + https://sjtug.org/post/mirror-news/2019-10-10-data-leak/ + <h1 id="发生了什么">发生了什么</h1> +<p>由于镜像状态页面的Access Token未被合理限权,未授权外部用户可以查看软件源的所有日志。</p> +<h1 id="范围">范围</h1> +<p>2018年4月3日2019年10月10日的日志,其中可能会对用户造成影响的内容包括:用户的IP、访问时间与路径</p> +<h1 id="目前采取的措施">目前采取的措施</h1> +<p>目前已经此漏洞已被以下措施修复:</p> +<ul> +<li>注销了之前未被限权的Access Token</li> +<li>更换了日志账户的Account Token</li> +<li>在完成日志权限模型之前,暂时停止日志上传</li> +<li>更换了泄漏的代理后端的IP,并换用了随机性更强的域名</li> +</ul> +<p>之后将会更加审慎处理相关信息的接口,保障数据安全。</p> + + + + + Pypi镜像源改为反代 + https://sjtug.org/post/mirror-news/2019-10-09-remove-pypi/ + Wed, 09 Oct 2019 22:23:00 -0700 + + https://sjtug.org/post/mirror-news/2019-10-09-remove-pypi/ + <p>由于PyPI镜像占用空间过大,经过权衡我们决定放弃PyPI的全量镜像。出于兼容性考虑,https://mirrors.sjtug.sjtu.edu.cn/pypi/web 现在反代 <a href="https://pypi.org">https://pypi.org</a> (与原有URL相同,已有用户不必进行更改)。有需要的用户可以迁移到其他镜像或继续使用反代服务。</p> + + + + + SJTUG 技术分享:Build system, lazy evaluation and incremental computation + https://sjtug.org/post/2019-09-18-build-system/ + Thu, 12 Sep 2019 16:00:00 +0800 + + https://sjtug.org/post/2019-09-18-build-system/ + <p>在9月18日我们将会进行一次SJTUG技术分享以及开学吃锅活动!</p> +<p>本次带来技术分享的是张震学长,技术分享结束后是吃锅活动,欢迎大家参加技术分享/吃锅/both!</p> +<p>技术分享活动时间:9月18日 18:00-19:00 +地点:新图书馆 E216</p> +<p>标题:Build system, lazy evaluation and incremental computation</p> +<p>摘要:什么是 Build System(构建系统)的本质?工程实践中为什么有 make、bazel 等众多“轮子”?它们之间的区别是什么?Build system 和更为基础的 Lazy Evaluation(惰性求值)和 Incremental Computation(增量计算)这两种紧密联系的计算概念又有何联系?如何在你的开发实践中运用惰性求值和增量计算?这些概念在浏览器布局引擎、自动代码生成等应用里有什么样的应用?这次分享活动将从实际代码出发来探讨这些话题,并思考算法开发的未来趋势。</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + 镜像站将于21日凌晨2点维护 + https://sjtug.org/post/mirror-news/2019-06-19-maintain/ + Wed, 19 Jun 2019 13:51:00 -0700 + + https://sjtug.org/post/mirror-news/2019-06-19-maintain/ + <p>SJTUG 软件源镜像站 将在 2019年6月21日 凌晨2时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:2小时。</p> + + + + + SJTUG 技术分享:任务型对话概览 + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + Mon, 01 Apr 2019 19:00:00 +0800 + + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + <p>周一(4月1日)晚 19:00 将在 图书馆主馆 E312 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>任务型对话概览 @ 刘啸远</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + 镜像站已支持TLS v1.3访问 + https://sjtug.org/post/mirror-news/2019-03-06-tls-1.3/ + Wed, 06 Mar 2019 20:00:00 -0800 + + https://sjtug.org/post/mirror-news/2019-03-06-tls-1.3/ + <p>镜像站现已正式支持TLS 1.3访问。使用 curl &gt;= 7.52.0 的软件会自动采用TLS 1.3以降低访问延时。</p> + + + + + 镜像站已于01/05恢复正常 + https://sjtug.org/post/mirror-news/2019-01-04-outage/ + Fri, 04 Jan 2019 20:30:00 -0800 + + https://sjtug.org/post/mirror-news/2019-01-04-outage/ + <p>由于网页服务器异常crash,镜像站于1月4日14时到5日3时期间无法正常访问。目前已经修复,欢迎大家继续使用。</p> + + + + + SJTUG 技术分享:C++中的运行期与编译期多态 + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + Sat, 08 Dec 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + <p>下周六(15日)晚 19:00 将在 李政道图书馆 209 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>C++中的运行期与编译期多态 (Runtime and Compile-Time Polymorphism) in C++ @ 任云玮</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + 镜像站11/22 6:31开始服务暂时不可用 + https://sjtug.org/post/mirror-news/2018-11-22-outage/ + Thu, 22 Nov 2018 05:55:00 +0800 + + https://sjtug.org/post/mirror-news/2018-11-22-outage/ + <p>镜像站在11/22早6:31开始,服务暂时不可用,目前我们正在调查原因。</p> + + + + + 镜像站将在 11/22 凌晨3时 UTC+8维护 + https://sjtug.org/post/mirror-news/2018-11-20-maintain/ + Tue, 20 Nov 2018 11:55:00 +0800 + + https://sjtug.org/post/mirror-news/2018-11-20-maintain/ + <p>SJTUG 软件源镜像站 将在2018年11月22日 凌晨3时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:1小时。</p> + + + + + 新增homebrew与raspbian/raspberrypi镜像 + https://sjtug.org/post/mirror-news/2018-06-15-raspbian-homebrew/ + Fri, 15 Jun 2018 15:00:00 +0800 + + https://sjtug.org/post/mirror-news/2018-06-15-raspbian-homebrew/ + <p>新增了MacOS的homebrew包管理器与适用于树莓派的raspbian/raspberrypi仓库的镜像。</p> +<p>欢迎大家查看<code>git/homebrew-{core/cask}.git</code>、<code>homebrew-bottles</code>与<code>raspbian</code>/<code>raspberrypi</code>了解如何使用。</p> + + + + + SJTUG 2018 暑期课堂预告 + https://sjtug.org/post/2018-06-06-summer-class/ + Wed, 06 Jun 2018 19:35:00 +0800 + + https://sjtug.org/post/2018-06-06-summer-class/ + <p>6-30 Update: 请大家注意,由于社总安排变更,上课地点改为东中院 1-103</p> +<p>Update: 课程具体时间地点安排已更新</p> +<blockquote> +<p><a href="https://www.wjx.top/m/24873152.aspx">报名链接点这里</a></p> +<p>课程安排情况(社总信息):<a href="https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA">https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA</a></p> +</blockquote> +<p>SJTUG 本次暑假小学期再次开设了夏季课堂,面向对编程及相关技术感兴趣的同学进行 5~6 次分享,主讲人除 SJTUG 成员外,预计还将邀请在业界的学长做 Guest Talk/Sharing,以下是主要内容预告(暂定,持续更新中):</p> +<table> +<thead> +<tr> +<th>活动</th> +<th>时间</th> +<th>地点</th> +<th>主讲人</th> +<th>内容</th> +</tr> +</thead> +<tbody> +<tr> +<td>Tutorial</td> +<td>07.03 19:00</td> +<td>东中院 1-103</td> +<td><a href="http://evensgn.com">@Evensgn</a></td> +<td>Git 使用教学</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.06 19:00</td> +<td>东中院 1-103</td> +<td>@littleRound</td> +<td>计算机工作原理漫谈</td> +</tr> +<tr> +<td>Guest Talk</td> +<td>07.10 19:00</td> +<td>东中院 1-103</td> +<td>周健,依图科技研发总监,上海交大计算机系学士、硕士;亚洲首个世界大学生程序设计竞赛世界冠军</td> +<td>从摩尔定律到行星级的智能系统————漫谈 AI 时代的过去、现在和将来</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.13 19:00</td> +<td>东中院 1-103</td> +<td>@footoredo</td> +<td>浅谈密码学与密码</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.17 19:00</td> +<td>东中院 1-103</td> +<td><a href="https://io-meter.com">@茄子(ant_sz)</a></td> +<td>基于 KV Store 的实时多维数据分析</td> +</tr> +<tr> +<td>Guest Sharing</td> +<td>07.20 19:00</td> +<td>东中院 1-103</td> +<td>施闻轩,PingCAP 工程师</td> +<td>A small bite of Rust</td> +</tr> +</tbody> +</table> +<p>欢迎感兴趣的同学们参加!</p> +<p>暑期课堂结束之后,所有讲者的 slides 会在我们的<a href="https://github.com/sjtug/sharing">Github仓库</a> 公开,欢迎大家 Star~</p> + + + + + ROS源上游故障 + https://sjtug.org/post/mirror-news/2018-06-04-ros-failure/ + Mon, 04 Jun 2018 19:40:00 +0800 + + https://sjtug.org/post/mirror-news/2018-06-04-ros-failure/ + <p>今天中午12:00左右,ROS上游唯一的Rsync源出现故障无法进行同步,大部分国内镜像站都会受到影响。已经同步的包仍然可以正常下载,但12:00以后的更新将无法反馈到用户。目前我们在密切观察这一现象,若短时间内rsync源无法恢复,我们将会尝试切换到apt-cache源。</p> + + + + + 镜像源维护完成 + https://sjtug.org/post/mirror-news/2018-05-29-maintain-complete/ + Tue, 29 May 2018 23:30:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-29-maintain-complete/ + <p>SJTUG 镜像源在今天晚上 11:00 ~ 11:21 按计划进行了例行维护,在维护期间服务暂时不可用,目前已经恢复正常。</p> + + + + + 镜像站将在05/29 晚11:00 UTC+8维护 + https://sjtug.org/post/mirror-news/2018-05-29-maintain/ + Tue, 29 May 2018 11:55:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-29-maintain/ + <p>SJTUG 软件源镜像站 将在2018年5月29日晚11:00 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。维护时间据估计不会超过30分钟。</p> + + + + + SJTUG 镜像源加入 GNU、CTAN 官方镜像源列表 + https://sjtug.org/post/mirror-news/2018-05-17-gnu-ctan-repo/ + Thu, 17 May 2018 21:40:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-17-gnu-ctan-repo/ + <p>SJTUG 软件源镜像站 v2 正式上线后,现已加入 GNU、CTAN 官方镜像源列表:</p> +<ul> +<li><a href="https://www.gnu.org/prep/ftp.html">GNU Mirror List</a></li> +<li><a href="https://ctan.org/mirrors">CTAN Sites</a></li> +</ul> + + + + + SJTUG 2018 第 4 次分享:合作训练(Cooperative Training) + https://sjtug.org/post/2018-05-12-cooperative-training/ + Tue, 08 May 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-05-12-cooperative-training/ + <p>本周六(12日)晚 19:00 将在 图书馆主馆 E216 进行本学期第 4 次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>合作训练:CoT Cooperative Training @ 卢思迪</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + 镜像源域名更换为mirrors.sjtug.sjtu.edu.cn + https://sjtug.org/post/mirror-news/2018-05-07-domain-update/ + Mon, 07 May 2018 15:00:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-07-domain-update/ + <p>欢迎大家之后使用新域名访问</p> + + + + + SJTUG 2018 第 3 次分享:Rust 中的内存安全 + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + Sat, 14 Apr 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + <p>本周日(22日)晚 19:00 将在 图书馆主馆 E309 进行本学期第 3 次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>Rust 中的内存安全 @ 张宇宁</p> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018第二次分享:Concatenative Programming 初探 + https://sjtug.org/post/2018-03-31-concatenative-programming/ + Mon, 26 Mar 2018 21:00:00 +0800 + + https://sjtug.org/post/2018-03-31-concatenative-programming/ + <p>本周六(31日)晚 19:00 将在 图书馆主馆 E216 进行本学期第二次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>Concatenative Programming 初探 @ 王竹阳</p> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018第一次分享:FOSS历史与Web开发入门 + https://sjtug.org/post/2018-03-10-intro/ + Sat, 10 Mar 2018 21:00:00 +0800 + + https://sjtug.org/post/2018-03-10-intro/ + <p>本周六(10日)晚7点将在 图书馆主馆 E210 进行本学期第一次分享,欢迎大家带电脑前来参加。内容有:</p> +<ol> +<li>Linux 入门与开源社区 @ 骆铮</li> +<li>Python Web Application 开发入门 @ 范舟</li> +</ol> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + 镜像源v2 Beta版上线! + https://sjtug.org/post/mirror-news/2018-03-04-v2-beta/ + Sun, 04 Mar 2018 22:00:00 +0800 + + https://sjtug.org/post/mirror-news/2018-03-04-v2-beta/ + + + + + Haskell小课堂 01 + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + Thu, 02 Nov 2017 22:00:00 +0800 + + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + <p>Haskell 是一门默认惰性求值的纯函数式语言,在 stackoverflow 的统计中它是程序员在夜晚和双休日使用最多的语言。本周六的 Haskell 小课堂将带大家简单了解一下 Haskell 的语法和特性,以及代数数据类型、模式匹配、typeclass 等基础知识,为后续课程作铺垫。本次小课堂旨在从入门到入门,不需要前置知识。</p> +<p>本周六下午3:00将由王竹阳同学在新图B118给大家带来Haskell小课堂的第一节课程,欢迎同学们前来探讨。</p> + + + + + SJTUG例行分享:系统性能的测量与分析 + https://sjtug.org/post/2017-10-28-performance-measurement/ + Sat, 28 Oct 2017 19:00:00 +0800 + + https://sjtug.org/post/2017-10-28-performance-measurement/ + <p>本周六将由贾枭学长给大家分享系统性能的测量与分析的常用思路与技巧,欢迎大家前来。</p> +<p><a href="https://github.com/sjtug/sharing/tree/master/2017-10-28">Slides下载</a></p> + + + + + 暑期课堂学生分流 + https://sjtug.org/post/2017-06-25-summer-class-schedule/ + Sun, 25 Jun 2017 21:57:00 +0800 + + https://sjtug.org/post/2017-06-25-summer-class-schedule/ + <p>由于暑期课堂报名人数接近90人,教室无法容纳这么多的人数,因此我们不得不采取分流措施。选择这门课的老师与同学建议按照以下表格前来上课。</p> +<p>当然,如果您有特别感兴趣的话题可以随时来听,但可能会发生没有座位的情况。</p> +<h2 id="建议在第14周6月29日7月20日前来的老师与同学的手机后4位">建议在第1、4周(6月29日/7月20日)前来的老师与同学的手机后4位</h2> +<pre><code>0076 +0158 +0203 +1025 +1991 +2073 +2180 +2529 +2537 +2701 +3081 +3136 +3253 +3739 +4746 +5042 +5301 +5397 +5425 +5532 +6265 +6527 +6708 +6723 +6985 +7035 +7051 +7076 +7586 +7683 +8038 +8189 +8851 +9108 +9481 +</code></pre><p>以及学号是B045090027,没有填写手机号的同学</p> +<h2 id="建议在第23周7月7日7月13日前来的老师与同学的手机后4位">建议在第2、3周(7月7日/7月13日)前来的老师与同学的手机后4位</h2> +<pre><code>0039 +0069 +0153 +0159 +0200 +0320 +0709 +0874 +1160 +1172 +1362 +1691 +1716 +2127 +2530 +2596 +2913 +3215 +3580 +3680 +4486 +4648 +4782 +5028 +5163 +5209 +5336 +5585 +5732 +5831 +5996 +6090 +6217 +6241 +6321 +7065 +7076 +7317 +7450 +7597 +7598 +7931 +7959 +8127 +8360 +8525 +8676 +8972 +9150 +9371 +9731 +</code></pre> + + + + 2017-SJTUG暑期课堂课程主页 + https://sjtug.org/post/2017-06-24-summer-class-portal/ + Sat, 24 Jun 2017 20:29:00 +0800 + + https://sjtug.org/post/2017-06-24-summer-class-portal/ + <p>这里是SJTUG 2017暑期课堂的课程主页,之后所有的课程时间、地点以本页为准,相关的资料也会在本页发放。</p> +<blockquote> +<p>UPDATE(06-25): <a href="https://sjtug.org/post/2017-06-25-summer-class-schedule">人员分流名单</a>已经公布,请尽快查看自己的时间 +UPDATE(06-29):更新第一周课件及第二周时间地点 +UPDATE(07-01):更新第二周主题</p> +</blockquote> +<h2 id="6月29日开源与自由软件历史">6月29日/开源与自由软件历史</h2> +<p>时间:6月29日(19周周四)18:00</p> +<p>地点:东上309</p> +<p>主讲人:<a href="https://intmainreturn0.com">@htfy96</a></p> +<p>课件:<a href="http://sjtug.org/sharing/2017-06-29/">在线查看</a> <a href="https://github.com/sjtug/sharing/tree/master/2017-06-29">下载</a></p> +<h2 id="7月7日git使用">7月7日/Git使用</h2> +<p>时间:<strong>7月7日(20周周五)20:30</strong>(有更改)</p> +<p>地点:东中4-302</p> +<p>主讲人:<a href="https://io-meter.com">@茄子(ant_sz)</a></p> +<p>课件:N/A</p> +<h2 id="7月13日game-theory-and-mechanism">7月13日/Game Theory and Mechanism</h2> +<p>时间:7月13日(21周周四)18:00</p> +<p>地点:东上309</p> +<p>主讲人:<a href="javascript:;">@Phijack</a></p> +<p>课件:N/A</p> +<h2 id="7月20日haskell-school-of-music">7月20日/Haskell School of Music</h2> +<p>时间:7月20日(22周周四)18:00</p> +<p>地点:东上309</p> +<p>主讲人:<a href="http://codeworm96.github.io">@codeworm96</a></p> +<p>课件:N/A</p> +<h2 id="获取最新资讯">获取最新资讯</h2> +<p>可以通过<a href="http://sjtug.org/tags/summer_school/index.xml">RSS订阅</a>或关注我们的微信号@sjtunix获取最新资讯:</p> +<p><img src="https://sjtug.org/images/wechat_qrcode.jpg" alt="wechat_qrcode"></p> + + + + + SJTUG暑期课堂报名中! + https://sjtug.org/post/2017-06-12-summer-class/ + Mon, 12 Jun 2017 15:58:00 +0800 + + https://sjtug.org/post/2017-06-12-summer-class/ + <p>UPDATE: <a href="http://sjtug.org/post/2017-06-24-summer-class-portal/">课程主页</a>已经开通!</p> +<p>SJTUG本次暑假开设了夏季第二课堂,将面向初学者与感兴趣同学的进行3~4次分享,主要内容见下:</p> +<table> +<thead> +<tr> +<th>日期</th> +<th>地点</th> +<th>主讲人</th> +<th>内容</th> +</tr> +</thead> +<tbody> +<tr> +<td>6月29日(19周周四)</td> +<td>东上309</td> +<td><a href="https://intmainreturn0.com">@htfy96</a></td> +<td>开源与自由软件历史。以几个人物作为主线科普自由软件及其相关运动的起伏与发展,不需要代码水平的科普性质讲座。</td> +</tr> +<tr> +<td>7月6日(20周周四)</td> +<td>待定</td> +<td><a href="https://io-meter.com">@茄子(ant_sz)</a></td> +<td>待定</td> +</tr> +<tr> +<td>7月13日(21周周四)</td> +<td>东上309</td> +<td><a href="javascript:;">@Phijack</a></td> +<td>Game Theory and Mechanism</td> +</tr> +<tr> +<td>7月20日(22周周四)</td> +<td>东上309</td> +<td><a href="http://codeworm96.github.io">@codeworm96</a></td> +<td>Haskell School of Music,探索用程序语言的方式对音乐进行抽象,不要求编程或音乐理论基础。<a href="http://codeworm96.github.io/posts/2017-06-15-HSoM.html">详细介绍点此</a></td> +</tr> +</tbody> +</table> +<p>课堂将保证小规模,确保来的同学都有当面指导的机会。欢迎对技术感兴趣的同学来参加!我们尤其欢迎在Linux、自由软件、函数式编程等领域有兴趣的同学。</p> +<p>强烈建议加最后的微信群以获取资料与课前信息。</p> +<p>不管你是否已经毕业,还是只能来几节课,都欢迎填写这张表格报名:</p> +<p><a href="https://wj.qq.com/s/1401085/f0a5" target="_blank" rel="nofollow" style="color:#fff;font-size:20px; background:#5badf0;padding: 10px 20px 10px 20px;">立即报名</a></p> +<p>之后,所有的Slides都会在我们的<a href="https://github.com/sjtug/sharing">Github仓库</a>公开,欢迎Star~</p> +<p>欢迎想来的同学长按识别二维码加群或加微信69oulciV@: +<img src="https://user-images.githubusercontent.com/8121231/27035049-82b2b8c2-4fb2-11e7-84f9-ccf2c05be98c.jpg" alt="SJTUG Summer Class2017"></p> + + + + + GPG Sign Party & Yubikey安利 + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + Thu, 09 Mar 2017 22:11:40 +0800 + + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + <p>本周日(12日)下午3点到5点,在新图E216将举行GPG Sign Party&amp;Yubikey安利活动。将手把手教大家签发/交换密钥与加密、签名信息,欢迎参加!</p> +<p>校内同学点击<a href="http://studyroom.lib.sjtu.edu.cn/reserve_plus.asp">这里加入学习室</a>。 +申请单号94388,密码165165</p> + + + + + SJTUG开学聚餐 + https://sjtug.org/post/2017-02-21-hotpot/ + Tue, 21 Feb 2017 19:41:47 +0800 + + https://sjtug.org/post/2017-02-21-hotpot/ + <p>又到了开学聚餐的时间啦!这次聚餐还是定在欧尚部落情,在本周六(25日)晚5:30GMT+8于拖鞋门前旗杆下集合。欢迎各位过来吃锅!</p> +<p>如果时间安排不合适,可以填写<a href="https://goo.gl/forms/tXNbYezH0pOeAHe83">这个表单</a>。如果时间冲突的同学多的话可能会进行调整</p> + + + + + sjtug.org写作指南 + https://sjtug.org/post/2017-01-15-writing-guide/ + Sun, 15 Jan 2017 23:12:56 +0800 + + https://sjtug.org/post/2017-01-15-writing-guide/ + <p>这里介绍了一下发布新文章的步骤</p> +<h2 id="安装hugo-或直接新建文章">安装Hugo, 或直接新建文章</h2> +<p>安装<code>hugo</code>然后<code>hugo new post/YYYY-MM-DD-article-title.md</code>;或直接新建<code>content/post/YYYY-MM-DD-article-title.md</code>,手动指定<code>date</code></p> +<p>软件源新闻放在<code>content/post/mirror-news</code>下面,带上<code>mirror-news</code>的tag。</p> +<p>软件源帮助放在<code>content/post/mirror-help</code>下面,带上<code>mirror-help</code>的tag,title设定成和name相同(注意大小写)。</p> +<h2 id="front-matters">Front matters</h2> +<p>头部<code>+++</code>的front matters部分,可以指定的部分有:</p> +<ul> +<li><code>title = &quot;article title&quot;</code> 必填</li> +<li><code>author = &quot;htfy96&quot;</code> 必填</li> +<li><code>tags = [&quot;tag1&quot;, &quot;tag2&quot;]</code> 建议填写,只有包含<code>news</code> tag的文章才会在首页显示,其它常用tag包括<code>announcement</code>, <code>guide</code>, <code>sharing</code>等</li> +<li><code>activity_time = &quot;2017-01-08T15:00:00+08:00&quot;</code>,格式同date,当有<code>sharing</code>标签时建议填写,代表活动开始时间</li> +<li><code>activity_place = &quot;Main Library&quot;</code>,同上,代表活动地点</li> +<li><code>draft = true</code>,当不想立即发布时才填写,默认情况<code>false</code>不用填写</li> +</ul> +<h2 id="测试并提交">测试并提交</h2> +<ul> +<li>使用<code>hugo server</code>看看最终效果是否理想</li> +<li>提交到 <a href="https://github.com/sjtug/portal">https://github.com/sjtug/portal</a> ,主页会自动生成到sjtug.org</li> +</ul> + + + + + SJTUG新版首页上线 + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + Sat, 14 Jan 2017 20:55:00 +0800 + + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + <p>我们的首页已经更新到基于Hugo的版本,希望能给大家带来更好的阅读体验。</p> +<p>接下来这里将会加入例行分享的报道及一些技术文章,欢迎大家订阅。</p> + + + + + SJTUG例行分享:HaLVM + https://sjtug.org/post/2017-01-08-halvm/ + Sun, 08 Jan 2017 20:55:00 +0800 + + https://sjtug.org/post/2017-01-08-halvm/ + <p>本周日(1月8日)下午15:00 - 17:30,@张震巨巨在新图E210给大家介绍HaLVM项目,欢迎大家来参加分享</p> +<p>项目地址:<a href="https://github.com/GaloisInc/HaLVM">Github/HaLVM</a></p> +<p>巨巨主页:<a href="https://github.com/izgzhen">Github/izgzhen</a></p> +<blockquote> +<p>HaLVM(Haskell Lightweight Virtual Machine)是一个让Glasgow Haskell Compiler套件直接在Xen虚拟环境下运行的项目。</p> +</blockquote> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2017-01-08">sjtug/sharing/HaLVM</a></p> + + + + + SJTUG例行分享:Life of a packet + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + Sat, 12 Nov 2016 23:40:00 +0800 + + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + <p>11月12日晚18:00将在光彪楼二楼进行例行分享,由@贾枭 学长给大家带来分享 Life of a packet,欢迎大家来参与活动</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-11-12">sjtug/sharing</a></p> + + + + + SJTUG例行分享:简单的物理引擎 + https://sjtug.org/post/2016-10-29-physical-engine/ + Sat, 29 Oct 2016 23:45:00 +0800 + + https://sjtug.org/post/2016-10-29-physical-engine/ + <p>10月29日晚18:00将在新图E316进行例行分享,由大一巨巨 @时光机 给大家带来「简单的物理引擎」分享,欢迎大家来参与活动</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-16">sjtug/sharing</a></p> + + + + + SJTUG例行分享:C11 Memory Model + https://sjtug.org/post/2016-10-16-c11-memory-model/ + Sun, 16 Oct 2016 22:45:00 +0800 + + https://sjtug.org/post/2016-10-16-c11-memory-model/ + <p>10月16日晚18:00,@贾枭 学长在新图B416向大家介绍 C11 Memory Model 的有关知识。</p> +<p>视频在 <a href="https://www.liveedu.tv/sjtug/">LiveEdu</a> 可以看到。</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-16">sjtug/sharing</a></p> + + + + + SJTUG例行分享:Dependent Type + https://sjtug.org/post/2016-10-04-dependent-type/ + Tue, 04 Oct 2016 22:55:00 +0800 + + https://sjtug.org/post/2016-10-04-dependent-type/ + <p>10月4日晚18:00 - 21:00,@邵成 @钱泽森 两位同学在新图E316向大家介绍 Dependent Type。</p> +<p>邵成:Fun with Dependent Types in Haskell<br> +钱泽森:How to Write a Safe Printf in Agda</p> +<p>视频在 <a href="https://www.liveedu.tv/sjtug/">LiveEdu</a> 可以看到</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-04">sjtug/sharing</a></p> + + + + + 喜迎校庆 SJTUG Mirrors加入Arch Linux镜像源 + https://sjtug.org/post/mirror-news/2016-04-07-arch-repo/ + Thu, 07 Apr 2016 22:00:00 +0800 + + https://sjtug.org/post/mirror-news/2016-04-07-arch-repo/ + + + + + SJTUG Demo镜像源成立 + https://sjtug.org/post/mirror-news/2016-03-17-established/ + Thu, 17 Mar 2016 22:00:00 +0800 + + https://sjtug.org/post/mirror-news/2016-03-17-established/ + + + + + (Hu)go Template Primer + https://sjtug.org/post/goisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/goisforlovers/ + <p>Hugo uses the excellent <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.</p> +<p>This document is a brief primer on using go templates. The <a href="http://golang.org/pkg/html/template/">go docs</a> +provide more details.</p> +<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2> +<p>Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.</p> +<p>A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the <a href="http://golang.org/pkg/html/template/">go docs</a>.</p> +<h2 id="basic-syntax">Basic Syntax</h2> +<p>Go lang templates are html files with the addition of variables and +functions.</p> +<p><strong>Go variables and functions are accessible within {{ }}</strong></p> +<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p> +<pre><code>{{ foo }} +</code></pre> +<p><strong>Parameters are separated using spaces</strong></p> +<p>Calling the add function with input of 1, 2:</p> +<pre><code>{{ add 1 2 }} +</code></pre> +<p><strong>Methods and fields are accessed via dot notation</strong></p> +<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p> +<pre><code>{{ .Params.bar }} +</code></pre> +<p><strong>Parentheses can be used to group items together</strong></p> +<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }} +</code></pre> +<h2 id="variables">Variables</h2> +<p>Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +<a href="https://sjtug.org/layout/variables">variables</a> page.</p> +<p>A variable is accessed by referencing the variable name.</p> +<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt; +</code></pre> +<p>Variables can also be defined and referenced.</p> +<pre><code>{{ $address := &quot;123 Main St.&quot;}} +{{ $address }} +</code></pre> +<h2 id="functions">Functions</h2> +<p>Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. <a href="https://sjtug.org/layout/functions">Hugo template +functions</a> provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ add 1 2 }} +</code></pre> +<h2 id="includes">Includes</h2> +<p>When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ template &quot;chrome/header.html&quot; . }} +</code></pre> +<h2 id="logic">Logic</h2> +<p>Go templates provide the most basic iteration and conditional logic.</p> +<h3 id="iteration">Iteration</h3> +<p>Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.</p> +<p><strong>Example 1: Using Context</strong></p> +<pre><code>{{ range array }} + {{ . }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring value variable name</strong></p> +<pre><code>{{range $element := array}} + {{ $element }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring key and value variable name</strong></p> +<pre><code>{{range $index, $element := array}} + {{ $index }} + {{ $element }} +{{ end }} +</code></pre> +<h3 id="conditionals">Conditionals</h3> +<p>If, else, with, or, &amp; and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p> +<p>Go Templates treat the following values as false:</p> +<ul> +<li>false</li> +<li>0</li> +<li>any array, slice, map, or string of length zero</li> +</ul> +<p><strong>Example 1: If</strong></p> +<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 2: If -&gt; Else</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{else}} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<p><strong>Example 3: And &amp; Or</strong></p> +<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +</code></pre> +<p><strong>Example 4: With</strong></p> +<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent.</p> +<p>The first example above could be simplified as:</p> +<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 5: If -&gt; Else If</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{ else if isset .Params &quot;caption&quot; }} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<h2 id="pipes">Pipes</h2> +<p>One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the +input of the following pipe.</p> +<p>Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.</p> +<p>A few simple examples should help convey how to use the pipe.</p> +<p><strong>Example 1 :</strong></p> +<pre><code>{{ if eq 1 1 }} Same {{ end }} +</code></pre> +<p>is the same as</p> +<pre><code>{{ eq 1 1 | if }} Same {{ end }} +</code></pre> +<p>It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.</p> +<p><strong>Example 2 :</strong></p> +<pre><code>{{ index .Params &quot;disqus_url&quot; | html }} +</code></pre> +<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p> +<p><strong>Example 3 :</strong></p> +<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +Stuff Here +{{ end }} +</code></pre> +<p>Could be rewritten as</p> +<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }} +Stuff Here +{{ end }} +</code></pre> +<h2 id="context-aka-the-dot">Context (aka. the dot)</h2> +<p>The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.</p> +<p><strong>Example:</strong></p> +<pre><code> {{ $title := .Site.Title }} + {{ range .Params.tags }} + &lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt; + {{ end }} +</code></pre> +<p>Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.</p> +<h1 id="hugo-parameters">Hugo Parameters</h1> +<p>Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.</p> +<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2> +<p>In each piece of content you can provide variables to be used by the +templates. This happens in the <a href="https://sjtug.org/content/front-matter">front matter</a>.</p> +<p>An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.</p> +<p>Here is the example front matter:</p> +<pre><code>--- +title: &quot;Permalinks&quot; +date: &quot;2013-11-18&quot; +aliases: + - &quot;/doc/permalinks/&quot; +groups: [&quot;extras&quot;] +groups_weight: 30 +notoc: true +--- +</code></pre><p>Here is the corresponding code inside of the template:</p> +<pre><code> {{ if not .Params.notoc }} + &lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt; + {{ .TableOfContents }} + &lt;/div&gt; + {{ end }} +</code></pre> +<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2> +<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site +parameters, which are values which will be available to you in chrome.</p> +<p>For instance, you might declare:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">params</span>: + <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span> + <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">&#34;spf13&#34;</span> + <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span> +</code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only +provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.</p> +<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt; +&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt; +&lt;/footer&gt;{{end}} +</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent:</p> +<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt; +&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt; +&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot; + alt=&quot;Twitter&quot;&gt;&lt;/a&gt; +&lt;/span&gt;{{end}} +</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do +so, such as in this example:</p> +<pre><code>&lt;nav class=&quot;recent&quot;&gt; + &lt;h1&gt;Recent Posts&lt;/h1&gt; + &lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} + &lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt; + {{end}}&lt;/ul&gt; +&lt;/nav&gt; +</code></pre> + + + + Getting Started with Hugo + https://sjtug.org/post/hugoisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/hugoisforlovers/ + <h2 id="step-1-install-hugo">Step 1. Install Hugo</h2> +<p>Goto <a href="https://github.com/spf13/hugo/releases">hugo releases</a> and download the +appropriate version for your os and architecture.</p> +<p>Save it somewhere specific as we will be using it in the next step.</p> +<p>More complete instructions are available at <a href="https://sjtug.org/overview/installing/">installing hugo</a></p> +<h2 id="step-2-build-the-docs">Step 2. Build the Docs</h2> +<p>Hugo has its own example site which happens to also be the documentation site +you are reading right now.</p> +<p>Follow the following steps:</p> +<ol> +<li>Clone the <a href="http://github.com/spf13/hugo">hugo repository</a></li> +<li>Go into the repo</li> +<li>Run hugo in server mode and build the docs</li> +<li>Open your browser to http://localhost:1313</li> +</ol> +<p>Corresponding pseudo commands:</p> +<pre><code>git clone https://github.com/spf13/hugo +cd hugo +/path/to/where/you/installed/hugo server --source=./docs +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Press ctrl+c to stop +</code></pre> +<p>Once you&rsquo;ve gotten here, follow along the rest of this page on your local build.</p> +<h2 id="step-3-change-the-docs-site">Step 3. Change the docs site</h2> +<p>Stop the Hugo process by hitting ctrl+c.</p> +<p>Now we are going to run hugo again, but this time with hugo in watch mode.</p> +<pre><code>/path/to/hugo/from/step/1/hugo server --source=./docs --watch +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Watching for changes in /Users/spf13/Code/hugo/docs/content +&gt; Press ctrl+c to stop +</code></pre> +<p>Open your <a href="http://vim.spf13.com">favorite editor</a> and change one of the source +content pages. How about changing this very file to <em>fix the typo</em>. How about changing this very file to <em>fix the typo</em>.</p> +<p>Content files are found in <code>docs/content/</code>. Unless otherwise specified, files +are located at the same relative location as the url, in our case +<code>docs/content/overview/quickstart.md</code>.</p> +<p>Change and save this file.. Notice what happened in your terminal.</p> +<pre><code>&gt; Change detected, rebuilding site + +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 26 ms +</code></pre> +<p>Refresh the browser and observe that the typo is now fixed.</p> +<p>Notice how quick that was. Try to refresh the site before it&rsquo;s finished building.. I double dare you. +Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.</p> +<h2 id="step-4-have-fun">Step 4. Have fun</h2> +<p>The best way to learn something is to play with it.</p> + + + + + + https://sjtug.org/post/mirror-help/elan/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/elan/ + <h1 id="glean-lean-4-镜像适配工具"><code>glean</code>: Lean 4 镜像适配工具</h1> +<p>使用上海交通大学的 <a href="https://mirror.sjtu.edu.cn">https://mirror.sjtu.edu.cn</a> 镜像服务,软件源镜像托管在 <code>elan</code> +和 <code>git/lean4-packages</code> 下。</p> +<p>请自行修改命令中的版本号,可用版本参见: +<a href="http://mirror.sjtu.edu.cn/elan/?mirror_intel_list">http://mirror.sjtu.edu.cn/elan/?mirror_intel_list</a></p> +<h2 id="安装-elan">安装 Elan</h2> +<p>Elan 是 Lean 的版本管理工具,在 Lake 调用时根据项目 <code>lean-toolchain</code> 文件下载安装 Lean 并切换到对应的版本。</p> +<pre><code>glean -install elan -version 3.0.0 +</code></pre><h2 id="安装-lean">安装 Lean</h2> +<p>以下操作会安装 Lean 与 Lean 工具链,包含语言服务器、构建工具等。</p> +<pre><code>glean -install lean --version 4.1.0 +</code></pre><h2 id="在构建项目前下载依赖">在构建项目前下载依赖</h2> +<p>每当下载完一个 Lean 项目后,在启动 VSCode 或命令行运行 <code>lake build</code> 前,可以提前通过镜像下载依赖。</p> +<pre><code>glean -lake-manifest-path ~/EG/lake-manifest.json +</code></pre> + + + + anaconda + https://sjtug.org/post/mirror-help/anaconda/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/anaconda/ + <p>Anaconda 是一种 Python 语言的免费增值开源发行版,用于进行大规模数据处理, 预测分析, 和科学计算, 致力于简化包的管理和部署。Anaconda 使用软件包管理系统 conda 进行包管理。</p> +<p>SJTUG 源镜像了常用的 conda 库,以方便科学计算用户使用。</p> +<p><strong>Note: 如果您正在从其他镜像源切换到 SJTUG,请检查我们是否同步了你所需要的 repo,以及该 repo 是否支持您使用的平台 (e.g. linux-64)。如果没有,请删除相关配置,并提出新镜像请求。</strong></p> +<p><strong>使用说明</strong></p> +<p>编辑 <code>~/.condarc</code></p> +<pre><code>default_channels: + - https://mirror.sjtu.edu.cn/anaconda/pkgs/r + - https://mirror.sjtu.edu.cn/anaconda/pkgs/main +custom_channels: + conda-forge: https://mirror.sjtu.edu.cn/anaconda/cloud/ + pytorch: https://mirror.sjtu.edu.cn/anaconda/cloud/ +channels: + - defaults +</code></pre><p>在 <code>custom_channels</code> 中您可以添加下面所列的其他第三方源。我们建议您使用上面的方法配置,而非执行下面的指令。</p> +<p>您也可以使用<code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/{{你所需要的包名}}</code>来将SJTUG源添加作为这个包的上游。目前镜像的包与安装命令包括:</p> +<ul> +<li><strong>官方源</strong>: +<ul> +<li><code>pkgs/free</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/free</code></li> +<li><code>pkgs/main</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/main</code></li> +<li><code>pkgs/mro</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/mro</code></li> +<li><code>pkgs/msys2</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/msys2</code></li> +<li><code>pkgs/pro</code>: (deprecated) <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/pro</code></li> +<li><code>pkgs/r</code>: (empty) <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/r</code></li> +</ul> +</li> +<li><strong>第三方源</strong>: +<ul> +<li><code>cloud/bioconda</code>: <code>conda config --set custom_channels.bioconda https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/conda-forge</code>: <code>conda config --set custom_channels.conda-forge https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/menpo</code>: <code>conda config --set custom_channels.menpo https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/soumith</code>: <code>conda config --set custom_channels.soumith https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/viscid-hub</code>: <code>conda config --set custom_channels.viscid-hub https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/atztogo</code>: <code>conda config --set custom_channels.atztogo https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/pytorch</code>: <code>conda config --set custom_channels.pytorch https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/pytorch-test</code>: <code>conda config --set custom_channels.pytorch-test https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +</ul> +</li> +</ul> +<p>此外,在 Conda 4.7 后,官方的 default 源组默认只包含 main 和 r (windows 会包含 msys2) channel,其他官方源仍支持手动添加。但官方建议不再使用 free channel,详见 <a href="https://www.anaconda.com/why-we-removed-the-free-channel-in-conda-4-7/">Why We Removed the “Free” Channel in Conda 4.7</a>。</p> + + + + + anthon + https://sjtug.org/post/mirror-help/anthon/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/anthon/ + <p>AOSC OS(安同 OS)软件源。AOSC OS 是一个由安同开源社区 [https://aosc.io](<a href="https://aosc.io">https://aosc.io</a>)开发的半滚动 Linux 发行版,对包括 x86-64,aarch64,LoongArch64 等多种处理器架构提供支持。</p> +<p><strong>使用方法</strong></p> +<p>AOSC OS 内置 <code>apt-gen-list</code> 用于切换社区提供的可用镜像源。不建议直接使用 <code>/etc/apt/sources.list</code> 变更镜像。</p> +<p>使用如下指令将本镜像源添加到可用镜像源列表中</p> +<pre><code>sudo apt-gen-list add-custom-mirror sjtug https://mirror.sjtu.edu.cn/anthon/ +</code></pre><p>随后使用如下启用本镜像源</p> +<pre><code>sudo apt-gen-list add-mirror sjtug +</code></pre><p>如果仅使用本镜像源,使用如下指令</p> +<pre><code>sudo apt-gen-list set-mirror sjtug +</code></pre> + + + + archlinux + https://sjtug.org/post/mirror-help/archlinux/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/archlinux/ + <p>Arch Linux 是通用 x86-64 GNU/Linux 发行版。Arch 采用滚动升级模式,尽全力提供最新的稳定版软件。初始安装的 Arch 只是一个基本系统,随后用户可以根据自己的喜好安装需要的软件并配置成符合自己理想的系统。</p> +<p>使用方法:编辑 <code>/etc/pacman.d/mirrorlist</code> 文件,添加 <code>Server = https://mirror.sjtu.edu.cn/archlinux/$repo/os/$arch</code> 这一行,同时注释掉其它所有镜像,然后运行 <code>sudo pacman -Syy</code> 更新软件包缓存。</p> + + + + + archlinux-cn + https://sjtug.org/post/mirror-help/archlinux-cn/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/archlinux-cn/ + <p>Arch Linux 中文社区仓库 是由 Arch Linux 中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。</p> +<p>完整的包信息列表(包名称/架构/维护者/状态)请 <a href="https://github.com/archlinuxcn/repo">点击这里</a> 查看。</p> +<p>仓库主地址:http://repo.archlinuxcn.org/</p> +<p>使用方法:在 <code>/etc/pacman.conf</code> 文件末尾添加以下两行:</p> +<pre><code>[archlinuxcn] +Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch +</code></pre><p>之后,请执行下面的命令安装 archlinuxcn-keyring 包导入 GPG key。</p> +<pre><code>pacman -Sy archlinuxcn-keyring +</code></pre> + + + + archlinuxarm + https://sjtug.org/post/mirror-help/archlinuxarm/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/archlinuxarm/ + <p>Arch Linux ARM 是在使用 ARM 架构处理器的计算机上运行的 Linux 发行版。它为许多主流的采用 ARM 处理器的硬件提供内核及应用程序支持,同时和 Arch Linux 一样具有提供最新的软件源、避免预安装多余软件包等特点。</p> +<p>本仓库包含 Arch Linux ARM 的系统镜像及软件源。</p> +<p>系统镜像使用方法:请访问 <a href="https://archlinuxarm.org/platforms">https://archlinuxarm.org/platforms</a> ,阅读硬件平台对应的安装指引并下载对应的系统镜像。</p> +<p>软件源使用方法:在 <code>/etc/pacman.d/mirrorlist</code> 的文件顶端(所有镜像源的最上面)加上:</p> +<pre><code>Server = https://mirrors.sjtug.sjtu.edu.cn/archlinuxarm/$arch/$repo +</code></pre><p>之后,请执行下面的命令更新软件包缓存。</p> +<pre><code>pacman -Syy +</code></pre> + + + + armbian + https://sjtug.org/post/mirror-help/armbian/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/armbian/ + <p>Armbian 是为 ARM 单板机提供的基于 Debian 和 Ubuntu 的操作系统。Armbian 仓库包括专用的 u-boot、内核及各种支持文件。</p> +<p>可以使用以下方法更换软件源:</p> +<ul> +<li>运行 <code>armbian-config</code> -&gt; Personal -&gt; Mirrors -&gt; 选择镜像站。</li> +<li>编辑 <code>/etc/apt/sources.list.d/armbian.list</code>,将 <code>http://apt.armbian.com</code> 替换为 <code>https://mirror.sjtu.edu.cn/armbian/</code>,然后执行 <code>apt update</code>。</li> +</ul> + + + + + bioconductor + https://sjtug.org/post/mirror-help/bioconductor/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/bioconductor/ + <p>Bioconductor 为高通量基因组数据的分析和可视化提供开源工具。Bioconductor多数软件包采用R统计编程语言开发。Bioconductor 每年释出两个版本,并有活跃的用户社区。</p> +<p>使用方法:</p> +<p>Bioconductor 镜像源配置文件之一是 <code>~/.Rprofile</code> 。</p> +<p>注:R 的 <code>~</code> 在类 Unix 系统下为: <code>$HOME</code> (即 <code>~</code> ),在 Windows 下为: <code>%USERPROFILE%\Documents</code> ,具体路径可以在 R 中执行 <code>path.expand(&quot;~&quot;)</code> 查看。</p> +<p>在该文件末尾添加如下语句或在R/RStudio终端下键入:</p> +<pre><code>options(BioC_mirror=&quot;https://mirror.sjtu.edu.cn/bioconductor&quot;) +</code></pre><p>即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。 +命令如下:</p> +<pre><code>if (!requireNamespace(&quot;BiocManager&quot;, quietly = TRUE)) + install.packages(&quot;BiocManager&quot;) +BiocManager::install(&quot;$package_name&quot;) +</code></pre><p>请访问<a href="http://bioconductor.org/">官方网站</a>获取更多信息。</p> + + + + + blackarch + https://sjtug.org/post/mirror-help/blackarch/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/blackarch/ + <p>BlackArch 是一款基于 ArchLinux 的为渗透测试及安全研究人员开发的发行版,相当于 Arch 版的 Kali。可以当做现有 Arch 系统的非官方用户存储库。</p> +<p>使用方法:</p> +<p>在现有 Arch 系统中,编辑<code>/etc/pacman.conf</code>,在末尾添加两行</p> +<pre><code>[blackarch] +Server = https://mirror.sjtu.edu.cn/blackarch/$repo/os/$arch +</code></pre><p>由于一些软件依赖32位的库,需要取消掉<code>/etc/pacman.conf</code>中<code>multilib</code>的注释,详见https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib</p> +<p>之后,请执行下面的命令安装 blackarch-keyring 包导入 GPG key。</p> +<pre><code>sudo pacman -Sy blackarch-keyring +</code></pre> + + + + centos + https://sjtug.org/post/mirror-help/centos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/centos/ + <p>使用方法:运行下面的指令一键替换并备份。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -e <span style="color:#e6db74">&#39;s/mirrorlist/#mirrorlist/g&#39;</span> -e <span style="color:#e6db74">&#39;s|#baseurl=http://mirror.centos.org/|baseurl=http://mirror.sjtu.edu.cn/|g&#39;</span> -i.bak /etc/yum.repos.d/&lt;需要替换的文件&gt; +</code></pre></div><p>最后运行 <code>dnf makecache</code> 生成缓存</p> + + + + + dart-pub + https://sjtug.org/post/mirror-help/dart-packages/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/dart-packages/ + <p>dart-pub 镜像全量同步了 Dart 语言官方仓库 <a href="https://pub.dartlang.org">https://pub.dartlang.org</a> ,可以加速 Dart 包的下载。</p> +<p>使用方法:</p> +<p>设置环境变量 <code>export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub</code> 即可。</p> + + + + + debian + https://sjtug.org/post/mirror-help/debian/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/debian/ + <p>Debian 是完全由自由软件组成的类UNIX操作系统,其包含的多数软件使用GNU通用公共许可协议授权,并由Debian计划的参与者组成团队对其进行打包、开发与维护。Debian以其坚守Unix和自由软件的精神,以及其给予用户的众多选择而闻名。现时Debian提供了超过25,000个软件[9],超过50,000个软件包[10],并正式支持10个计算机系统结构。</p> +<h3 id="使用方法">使用方法:</h3> +<ul> +<li>一键替换</li> +</ul> +<pre><code>sudo sed -i &quot;s|http://deb.debian.org/debian|http://mirror.sjtu.edu.cn/debian|g&quot; /etc/apt/sources.list +</code></pre><ul> +<li>手动替换</li> +</ul> +<p>先安装 ca-certificates apt-transport-https 保证第三方https源可以使用。(执行 <code>sudo apt install -y ca-certificates apt-transport-https</code>)</p> +<p>再打开<code> /etc/apt/sources.list</code>,将类似于<code>http://deb.debian.org/debian/</code>的地址均替换为<code>https://mirror.sjtu.edu.cn/debian/</code>即可。</p> + + + + + debian-cd + https://sjtug.org/post/mirror-help/debian-cd/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/debian-cd/ + <p>Debian 是完全由自由软件组成的类 UNIX 操作系统,其包含的多数软件使用 GNU 通用公共许可协议授权,并由 Debian 计划的参与者组成团队对其进行打包、开发与维护。 Debian 以其坚守 Unix 和自由软件的精神,以及其给予用户的众多选择而闻名。现时 Debian 提供了超过25,000个软件,超过50,000个软件包,并正式支持10个计算机系统结构。</p> +<p>本镜像仅提供 Debian 最新稳定版本。</p> +<p>一般来说只需在 <code>iso-cd</code> 目录 <a href="https://mirror.sjtu.edu.cn/debian-cd/current/amd64/iso-cd/">https://mirror.sjtu.edu.cn/debian-cd/current/amd64/iso-cd/</a> 寻找无后缀版本即可。当你使用不支持 UEFI 启动的系统时候,请安装 <code>mac</code> 后缀版本。当你寻找教育版时候可以寻找 <code>edu</code> 后缀版本。</p> + + + + + debian-ports + https://sjtug.org/post/mirror-help/debian-ports/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/debian-ports/ + <p>本软件源仅适用于 Debian riscv64。</p> +<p>编辑<code>/etc/apt/sources.list</code>,删除所有内容,添加以下内容并保存。</p> +<pre><code>deb [arch=riscv64] http://mirror.sjtu.edu.cn/debian-ports unstable main +deb [arch=riscv64] http://mirror.sjtu.edu.cn/debian-ports unreleased main +</code></pre><p>然后,使用<code>sudo apt update</code>更新软件包索引。</p> + + + + + docker-registry + https://sjtug.org/post/mirror-help/docker-registry/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/docker-registry/ + <p>docker-registry 源是 Docker Hub 的反向代理,可以加速<code>docker pull</code>等需要下载镜像的命令。</p> +<h2 id="docker-使用方法">Docker 使用方法:</h2> +<p>编辑或新建<code>/etc/docker/daemon.json</code>文件,向其中添加<code>registry-mirrors</code>项,使最终配置类似:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json">{ + <span style="color:#f92672">&#34;registry-mirrors&#34;</span>: [<span style="color:#e6db74">&#34;https://docker.mirrors.sjtug.sjtu.edu.cn&#34;</span>] +} +</code></pre></div><h2 id="podman-使用方法">Podman 使用方法:</h2> +<p>新建<code>/etc/containers/registries.conf.d/050-sjtug-docker-mirror.conf</code>文件(或在<code>/etc/containers/registries.conf</code>文件末尾),写入以下内容:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-toml" data-lang="toml"><span style="color:#a6e22e">unqualified</span><span style="color:#960050;background-color:#1e0010">-</span><span style="color:#a6e22e">search</span><span style="color:#960050;background-color:#1e0010">-</span><span style="color:#a6e22e">registries</span> = [<span style="color:#e6db74">&#34;docker.io&#34;</span>] + +[[<span style="color:#a6e22e">registry</span>]] +<span style="color:#a6e22e">location</span> = <span style="color:#e6db74">&#34;docker.io&#34;</span> + +[[<span style="color:#a6e22e">registry</span>.<span style="color:#a6e22e">mirror</span>]] +<span style="color:#a6e22e">location</span> = <span style="color:#e6db74">&#34;docker.mirrors.sjtug.sjtu.edu.cn&#34;</span> +</code></pre></div> + + + + dragonflybsd/dports + https://sjtug.org/post/mirror-help/dragonflybsd/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/dragonflybsd/ + <h2 id="项目简介">项目简介</h2> +<p><a href="https://www.dragonflybsd.org/">DragonFly BSD</a> 隶属于 <a href="https://en.wikipedia.org/wiki/BSD">BSD 系统家族</a>, +是其中相对小众、但富有特色的一个成员,与 <a href="https://www.freebsd.org/">FreeBSD</a>、 +<a href="https://www.openbsd.org/">OpenBSD</a>、<a href="https://www.netbsd.org/">NetBSD</a> +组成四大 BSD 操作系统。</p> +<p>自 2003 年从 FreeBSD 4.8 衍生而来, +DragonFly BSD 对虚拟内存、虚拟文件系统、网络协议栈等关键内核子系统做了大幅修改, +尽可能地消除了锁和竞争,实现了出色的 SMP 性能。 +项目创始人 Matthew Dillon 自行开发的 <a href="https://en.wikipedia.org/wiki/HAMMER2">HAMMER2</a> +文件系统是另一个主要特色,该文件系统拥有可媲美 ZFS 的功能和稳定性,但节省内存等资源。 +DragonFly BSD 的其他特色功能还有 vkernel、swapcache、LUKS、TrueCrypt、等等, +详情可参考:<a href="https://www.dragonflybsd.org/features/">主要特性列表</a>。</p> +<p>DragonFly BSD 的内核简洁小巧,代码整洁,在线手册 (man pages) 清晰,适合学习和研究。 +驱动程序和用户空间工具主要继承自 FreeBSD,同时与 FreeBSD 使用相同的包管理工具 +<a href="https://github.com/freebsd/pkg">pkg(8)</a>,可利用 FreeBSD 丰富全面的文档资源, +用户体验良好。 +此外,DragonFly BSD 的社区虽小,但很友好。</p> +<h2 id="镜像介绍">镜像介绍</h2> +<p>SJTUG 镜像是 DragonFly BSD 在中国内地的首个镜像站点, +依托于华东教育网骨干节点,提供稳定、快速的镜像服务。</p> +<p>我们的镜像服务目前提供了如下内容:</p> +<ul> +<li><a href="https://mirror.sjtu.edu.cn/dragonflybsd/iso-images/">安装镜像 (ISO/IMG)</a></li> +<li><a href="https://mirror.sjtu.edu.cn/dragonflybsd/dports/">预编译软件包</a> +(收录了 3 个版本:当前开发版本、当前发布版本、上一发布版本)</li> +</ul> +<h2 id="使用方法">使用方法</h2> +<p>创建 pkg(8) 仓库配置文件 <code>/usr/local/etc/pkg/repos/sjtug.conf</code>,添加以下内容:</p> +<pre><code class="language-conf" data-lang="conf"># China, Shanghai +SJTUG: { + url: https://mirror.sjtu.edu.cn/dragonflybsd/dports/${ABI}/LATEST, + priority: 10, + enabled: yes +} +</code></pre><p>然后执行 <code>pkg update -f</code> 更新索引即可开始使用了。</p> +<p>注:仓库的优先级 (<code>priority</code>) 默认为 0,此处通过设置 <code>priority: 10</code> +提高优先级来优先使用 SJTUG 镜像服务。</p> +<h2 id="相关链接">相关链接</h2> +<ul> +<li>官方主页: <a href="https://www.dragonflybsd.org/">https://www.dragonflybsd.org/</a></li> +<li>镜像列表: <a href="https://www.dragonflybsd.org/mirrors/">https://www.dragonflybsd.org/mirrors/</a></li> +<li>系统源码: <a href="https://gitweb.dragonflybsd.org/dragonfly.git">官方 Gitweb</a>, <a href="https://github.com/DragonFlyBSD/DragonFlyBSD">GitHub</a></li> +<li>GitHub: <a href="https://github.com/DragonFlyBSD/DragonFlyBSD">https://github.com/DragonFlyBSD</a></li> +</ul> + + + + + fedora/linux + https://sjtug.org/post/mirror-help/fedora/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/fedora/ + <p>Fedora 项目是一个由红帽公司所赞助,以统筹 Fedora Linux 操作系统开发的社区。 +Fedora 项目在建设开源软件社区的同时构建了一个被称为&quot;Fedora&quot;的 GNU/Linux 发行版。</p> +<p>使用方法:运行下面的指令一键替换并备份。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -e <span style="color:#e6db74">&#39;s/^metalink=/#metalink=/g&#39;</span> -e <span style="color:#e6db74">&#39;s|^#baseurl=http://download.example/pub/|baseurl=https://mirror.sjtu.edu.cn/|g&#39;</span> -i.bak /etc/yum.repos.d/&lt;需要替换的文件&gt; +</code></pre></div><p>最后运行 <code>dnf makecache</code> 生成缓存</p> + + + + + flutter_infra + https://sjtug.org/post/mirror-help/flutter_infra/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/flutter_infra/ + <h2 id="欢迎使用-sjtug-镜像设置-flutter-开发环境">欢迎使用 SJTUG 镜像设置 Flutter 开发环境</h2> +<p>作为国内最早提供 Flutter 的镜像站,我们在近期对镜像站的更新中提高了 Flutter +镜像的稳定性,并解决了部分问题,欢迎大家使用!</p> +<p>Flutter 是 Google 开源的 UI 工具包,帮助开发者通过一套代码库高效构建多平台精美应用, +支持移动、Web、桌面和嵌入式平台。</p> +<p>Flutter 由 Google 主导,全球的开发者共同协作开发。中国的开发者数量占全球的 20% +以上,也有大量贡献者为 Flutter 的生态提供了很大的帮助和贡献。</p> +<p>为了更好帮助国内的开发者、设计师和研究者等使用 Flutter,我们为 Flutter 的使用 +提供了加速访问的服务。您需要将开发设备的如下两个环境变量设置指向 SJTUG 镜像:</p> +<ul> +<li><code>PUB_HOSTED_URL</code></li> +<li><code>FLUTTER_STORAGE_BASE_URL</code></li> +</ul> +<h3 id="linux-和-macos-系统设定-flutter-镜像">Linux 和 macOS 系统设定 Flutter 镜像</h3> +<p>执行如下代码:</p> +<pre><code>export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub +export FLUTTER_STORAGE_BASE_URL=https://mirror.sjtu.edu.cn +</code></pre><h3 id="windows-系统设定-flutter-镜像">Windows 系统设定 Flutter 镜像</h3> +<p>右键单击“我的电脑”,单击“属性” ——&gt; “高级”选项卡 ——&gt; “环境变量”</p> +<p>在 “用户变量” 或 “系统变量” 中:</p> +<p>单击“新建”添加新变量:</p> +<ul> +<li>变量名: <code>PUB_HOSTED_URL</code></li> +<li>值: <code>https://mirror.sjtu.edu.cn/dart-pub</code></li> +<li>变量名: <code>FLUTTER_STORAGE_BASE_URL</code></li> +<li>值: <code>https://mirror.sjtu.edu.cn</code></li> +</ul> +<p>点击确定,保存生效。如果这两个变量名已经存在,点击编辑可修改变量值。</p> +<h3 id="设置-flutter-sdk-仓库镜像">设置 Flutter SDK 仓库镜像</h3> +<p>在 <code>flutter-sdk</code> 仓库下,执行如下指令即可。</p> +<pre><code>git remote set-url origin https://git.sjtu.edu.cn/sjtug/flutter-sdk.git +</code></pre><h3 id="downloadflutterio-镜像">download.flutter.io 镜像</h3> +<p>访问 <a href="https://mirror.sjtu.edu.cn/download.flutter.io/">https://mirror.sjtu.edu.cn/download.flutter.io/</a> 即可。</p> +<h2 id="更多资源">更多资源</h2> +<p>感谢 flutter.cn 对 SJTUG 镜像测试的支持。 +更多 Flutter 资源和中文文档, +请访问 Flutter 中文资源网站 (<a href="https://flutter.cn">flutter.cn</a>) +和 Dart 中文文档网站 (<a href="https://dart.cn">dart.cn</a>)。</p> + + + + + git/brew.git + https://sjtug.org/post/mirror-help/brew-git/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/brew-git/ + <p>本镜像是 Homebrew 自身的仓库,上游为<code>https://github.com/Homebrew/brew.git</code>。在<code>git</code>相关操作时使用<code>https://mirrors.sjtug.sjtu.edu.cn/git/brew.git</code>替代上述地址即可。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-core</code>, <code>homebrew-cask</code>和<code>brew-bottles</code>镜像,欢迎大家使用。</em></p> +<p>使用方法:</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_BREW_GIT_REMOTE<span style="color:#f92672">=</span>https://mirrors.sjtug.sjtu.edu.cn/git/brew.git +export HOMEBREW_CORE_GIT_REMOTE<span style="color:#f92672">=</span>https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git +export HOMEBREW_BOTTLE_DOMAIN<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/homebrew-bottles/bottles +</code></pre></div><p>另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_NO_INSTALL_FROM_API<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span> +</code></pre></div><p>随后正常使用官方脚本安装即可。</p> + + + + + git/homebrew-cask.git + https://sjtug.org/post/mirror-help/homebrew-cask/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/homebrew-cask/ + <p>homebrew-cask.git镜像了<a href="https://github.com/Homebrew/homebrew-cask.git">Homebrew Cask的描述文件,主要包括了较大的二进制文件与macOS应用</a>。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-core</code>和<code>brew-bottles</code>镜像,欢迎大家使用。</em></p> +<p><em>若首次安装 homebrew, 请参阅 <code>brew.git</code> 的说明。</em></p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-cask.git +</code></pre></div><p>然后执行:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew update +</code></pre></div><p>另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_NO_INSTALL_FROM_API<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span> +</code></pre></div> + + + + git/homebrew-core.git + https://sjtug.org/post/mirror-help/homebrew-core/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/homebrew-core/ + <p>homebrew-core.git镜像了<a href="https://github.com/Homebrew/homebrew-core.git">Homebrew官方的软件包描述文件</a>。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-cask</code>和<code>brew-bottles</code>镜像,欢迎大家使用。</em></p> +<p><em>若首次安装 homebrew, 请参阅 <code>brew.git</code> 的说明。</em></p> +<p>使用方法:</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_CORE_GIT_REMOTE<span style="color:#f92672">=</span>https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git +</code></pre></div><p>然后执行:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git +brew update +</code></pre></div><p>另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_NO_INSTALL_FROM_API<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span> +</code></pre></div> + + + + git/ohmyzsh.git + https://sjtug.org/post/mirror-help/ohmyzsh/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ohmyzsh/ + <p><a href="https://ohmyz.sh/">Oh My Zsh</a> 是一个由社区驱动的开源框架,用于管理 <a href="https://www.zsh.org/">zsh</a> 的配置。</p> +<h2 id="首次安装-oh-my-zsh">首次安装 Oh My Zsh</h2> +<p>首先,需要确保系统中安装了 zsh 和 git,然后在终端运行以下命令其中之一:</p> +<table> +<thead> +<tr> +<th style="text-align:left">方法</th> +<th style="text-align:left">命令</th> +</tr> +</thead> +<tbody> +<tr> +<td style="text-align:left"><strong>curl</strong></td> +<td style="text-align:left"><code>REPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c &quot;$(curl -fsSL https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)&quot;</code></td> +</tr> +<tr> +<td style="text-align:left"><strong>wget</strong></td> +<td style="text-align:left"><code>REPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c &quot;$(wget -O- https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)&quot;</code></td> +</tr> +<tr> +<td style="text-align:left"><strong>fetch</strong></td> +<td style="text-align:left"><code>REPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c &quot;$(fetch -o - https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)&quot;</code></td> +</tr> +</tbody> +</table> +<h2 id="替换现有仓库上游">替换现有仓库上游</h2> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">git -C $ZSH remote set-url origin https://git.sjtu.edu.cn/sjtug/ohmyzsh.git +</code></pre></div> + + + + google-fonts + https://sjtug.org/post/mirror-help/google-fonts/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/google-fonts/ + <p>本镜像提供了 Google Fonts 的反向代理。</p> +<p><strong>使用方法</strong></p> +<pre><code>&lt;link href=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; rel=&quot;stylesheet&quot;&gt; +</code></pre><p>改为</p> +<pre><code>&lt;link href=&quot;https://google-fonts.mirrors.sjtug.sjtu.edu.cn/css?family=Roboto&quot; rel=&quot;stylesheet&quot;&gt; +</code></pre> + + + + guix + https://sjtug.org/post/mirror-help/guix/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/guix/ + <p><a href="https://guix.gnu.org/">GNU/Guix</a>是隶属于GNU项目的自由软件发行版。Guix可以作为独立的操作系统发行版安装在计算机上,可以作为软件包管理器安装在别的Linux发行版上。 +它的核心是一个函数式软件包管理器,支持事务性的升级、回滚操作。用户可以通过 +<a href="https://www.gnu.org/software/guile/">Guile</a>语言编写配置文件管理操作系统的服务或者管理用户安装的软件。</p> +<h2 id="git-镜像">Git 镜像</h2> +<p>Git 镜像的地址为 <a href="https://mirror.sjtu.edu.cn/git/guix.git">https://mirror.sjtu.edu.cn/git/guix.git</a> 。修改 <code>~/.config/guix/channels.scm</code> 文件即可在 <code>guix pull</code> 时使用。</p> +<pre><code>(list (channel + (inherit (car %default-channels)) + (url &quot;https://mirror.sjtu.edu.cn/git/guix.git&quot;))) +</code></pre><h2 id="substitute-镜像">Substitute 镜像</h2> +<p>镜像地址为 <a href="https://mirror.sjtu.edu.cn/guix/">https://mirror.sjtu.edu.cn/guix/</a>。 +镜像实现方式为智能缓存,在镜像站用户首次访问某个 nar 或 narinfo 时,它会被永久缓存在镜像上; +之后的访问将直接从镜像服务器返回数据。</p> +<ul> +<li>guix命令支持使用 <code>--substitute-urls</code> 参数为单个命令的执行临时覆盖substitute服务器,例如:</li> +</ul> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">guix package -i &lt;package&gt; --substitute-urls<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/guix/&#34;</span> +</code></pre></div><ul> +<li>如果您使用 Guix 管理整个操作系统,请修改操作系统配置文件 ,替换 +<code>substitute-urls</code> 参数。例如:</li> +</ul> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-scheme" data-lang="scheme">(<span style="color:#a6e22e">operating-system</span> + (<span style="color:#a6e22e">services</span> (<span style="color:#a6e22e">modify-services</span> %desktop-services + (<span style="color:#a6e22e">guix-service-type</span> + config <span style="color:#66d9ef">=&gt; </span>(<span style="color:#a6e22e">guix-configuration</span> + (<span style="color:#a6e22e">inherit</span> config) + (<span style="color:#a6e22e">substitute-urls</span> <span style="color:#f92672">&#39;</span>(<span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/guix/&#34;</span> + <span style="color:#e6db74">&#34;https://ci.guix.gnu.org&#34;</span>)))))) + <span style="color:#f92672">...</span> + ) +</code></pre></div><ul> +<li>如果您在别的发行版上使用 Guix 包管理器,请修改 <code>guix-daemon</code> 的 +<code>--substitute-urls</code> 参数。比如修改 <code>guix-daemon.service</code> 的 <code>ExecStart</code> 为:</li> +</ul> +<pre><code class="language-conf" data-lang="conf">ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --substitute-urls=&quot;https://mirror.sjtu.edu.cn/guix/&quot; +</code></pre><p>本文档的编写参考了 <a href="https://guix.org.cn/wiki/mirror/">https://guix.org.cn/wiki/mirror/</a></p> + + + + + homebrew-bottles + https://sjtug.org/post/mirror-help/homebrew-bottles/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/homebrew-bottles/ + <p>homebrew-bottles.git镜像了<a href="https://homebrew.bintray.com/">预编译的 Homebrew 软件包</a>。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-core</code>和<code>homebrew-cask</code>镜像,欢迎大家使用。</em></p> +<p><em>若首次安装 homebrew, 请参阅 <code>brew.git</code> 的说明。</em></p> +<p>使用方法:</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_BOTTLE_DOMAIN<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/homebrew-bottles/bottles +</code></pre></div><p>SJTUG 镜像现已支持 ghcr.io 的 bottles 同步。</p> + + + + + immortalwrt + https://sjtug.org/post/mirror-help/immortalwrt/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/immortalwrt/ + <p>ImmortalWrt 是 OpenWrt 的一个第三方分支,主要针对国人用户开发,提供更多的本地化软件包和设备支持。</p> +<p>使用方法: +修改 <code>/etc/opkg/distfeeds.conf</code> 文件,将源地址 <code>downloads.immortalwrt.org</code> / <code>mirrors.vsean.net/openwrt</code> 修改为 +<code>mirror.sjtu.edu.cn/immortalwrt</code>,然后运行 <code>opkg update</code> 刷新软件包列表。</p> +<p>您也可以登录 LuCI 后台,进入 <code>系统</code> -&gt; <code>软件包</code> 页面,点击 <code>配置 opkg</code> 并按上述说明完成对源地址的更改。</p> + + + + + kali + https://sjtug.org/post/mirror-help/kali/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/kali/ + <p>Kali Linux 是基于Debian的Linux发行版,设计用于数字鉴识和渗透测试。由 Offensive Security Ltd 维护和资助。</p> +<p>使用方法:</p> +<p>编辑<code>/etc/apt/sources.list</code>,在头部添加:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">deb https://mirrors.sjtug.sjtu.edu.cn/kali kali-rolling main non-free contrib +deb-src https://mirrors.sjtug.sjtu.edu.cn/kali kali-rolling main non-free contrib +</code></pre></div> + + + + leopardsh + https://sjtug.org/post/mirror-help/leopardsh/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/leopardsh/ + <p>leopard.sh / tiger.sh 是一个 PPC Mac OS X 10.4-10.5 上的包管理器,提供了许多常用软件包,节省了 PowerPC Mac 漫长的编译时间</p> +<p><strong>使用说明</strong></p> +<p><strong>Mac OS X Tiger:</strong></p> +<p>下载 <code>tiger.sh</code>,并运行安装</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">curl -O http://leopard.sh/tigersh/tiger.sh +chmod +x ./tiger.sh +./tiger.sh +</code></pre></div><p>安装完成后,脚本会自己移动到<code>/usr/local/bin/tiger.sh</code>,对其进行编辑:</p> +<pre><code>TIGERSH_MIRROR=${TIGERSH_MIRROR:-https://mirror.sjtu.edu.cn/leopardsh} +</code></pre><p>并在文件开头添加:</p> +<pre><code>export TIGERSH_MIRROR_NO_HTTP=1 +export TIGERSH_MIRROR_NO_HEAD=1 +</code></pre><p><strong>Mac OS X Leopard:</strong></p> +<p>下载 <code>leopard.sh</code>,并运行安装</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">curl -O http://leopard.sh/leopardsh/leopard.sh +chmod +x ./leopard.sh +./leopard.sh +</code></pre></div><p>安装完成后,脚本会自己移动到<code>/usr/local/bin/leopard.sh</code>,对其进行编辑:</p> +<pre><code>LEOPARDSH_MIRROR=${LEOPARDSH_MIRROR:-https://mirror.sjtu.edu.cn/leopardsh} +</code></pre><p>并在文件开头添加:</p> +<pre><code>export LEOPARDSH_MIRROR_NO_HTTP=1 +export LEOPARDSH_MIRROR_NO_HEAD=1 +</code></pre> + + + + linuxliteos + https://sjtug.org/post/mirror-help/linuxliteos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/linuxliteos/ + <p>Linux Lite 是一个基于 Ubuntu 长期支持版本(LTS)的 Linux 发行版,搭载 Xfce 桌面环境。Linux Lite 的目的是将 Windows 用户引入 Linux,对新手比较友好。其旨在提供一套完整的应用程序来帮助用户满足用户日常的计算需求,这包括完整的办公套件、媒体播放器和其他基本的日常软件。</p> +<p><strong>使用方式:</strong> 在终端输入<code>sudo nano /etc/apt/sources.list</code>,删除原有内容,用以下内容代替。</p> +<pre><code>deb https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/ emerald main +</code></pre><p>然后</p> +<p><code>sudo apt update</code></p> + + + + + maven-central + https://sjtug.org/post/mirror-help/maven-central/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/maven-central/ + <p>Apache Maven仓库存放了可用于Maven的大量软件包(特别是Java软件)。目前本镜像为 <a href="http://repo.maven.apache.org/maven2/">http://repo.maven.apache.org/maven2/</a> 的反向代理,能够加速安装。</p> +<p>使用方法:</p> +<p>修改Maven根目录下的<code>conf/setting.xml</code>,增加一节<code>&lt;mirror /&gt;</code>,具体如下:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-xml" data-lang="xml"><span style="color:#f92672">&lt;mirrors&gt;</span> + <span style="color:#75715e">&lt;!-- Other mirrors... --&gt;</span> + <span style="color:#f92672">&lt;mirror&gt;</span> + <span style="color:#f92672">&lt;id&gt;</span>sjtugmaven<span style="color:#f92672">&lt;/id&gt;</span> + <span style="color:#f92672">&lt;name&gt;</span>sjtug maven<span style="color:#f92672">&lt;/name&gt;</span> + <span style="color:#f92672">&lt;url&gt;</span>https://mirrors.sjtug.sjtu.edu.cn/maven-central/<span style="color:#f92672">&lt;/url&gt;</span> + <span style="color:#f92672">&lt;mirrorOf&gt;</span>central<span style="color:#f92672">&lt;/mirrorOf&gt;</span> + <span style="color:#f92672">&lt;/mirror&gt;</span> +<span style="color:#f92672">&lt;/mirrors&gt;</span> +</code></pre></div> + + + + msys2 + https://sjtug.org/post/mirror-help/msys2/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/msys2/ + <p><strong>收录架构</strong></p> +<ul> +<li>MINGW: i686, x86_64</li> +<li>MSYS: i686, x86_64</li> +</ul> +<p><strong>获取基本组件包</strong></p> +<p>请访问该镜像目录下的<code>distrib/</code>目录(<a href="http://mirrors.sjtug.sjtu.edu.cn/msys2/distrib/x86_64/">x86_64</a>、<a href="http://mirrors.sjtug.sjtu.edu.cn/msys2/distrib/i686/">i686</a>),找到名为<code>msys2-&lt;架构&gt;-&lt;日期&gt;.exe</code>的文件(如<code>msys2-x86_64-20141113.exe</code>),下载安装即可。</p> +<p><strong>pacman的配置</strong></p> +<p>编辑<code>/etc/pacman.d/mirrorlist.mingw32</code>,在文件开头添加:</p> +<pre><code>Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686 +</code></pre><p>编辑<code>/etc/pacman.d/mirrorlist.mingw64</code>,在文件开头添加:</p> +<pre><code>Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/x86_64 +</code></pre><p>编辑<code>/etc/pacman.d/mirrorlist.msys</code>,在文件开头添加:</p> +<pre><code>Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/msys/$arch +</code></pre><p>然后执行<code>pacman -Sy</code>刷新软件包数据即可。</p> +<p>注:本Help参考自<a href="https://lug.ustc.edu.cn/wiki/mirrors/help/msys2">UTSC镜像</a>和<a href="https://mirrors.tuna.tsinghua.edu.cn/help/msys2/">清华镜像</a></p> + + + + + mx-isos + https://sjtug.org/post/mirror-help/mx-isos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/mx-isos/ + <p><a href="https://mxlinux.org/">MX Linux</a> 是一个基于Debian 稳定分支的面向桌面的Linux发行,它是antiX 及早先的MEPIS 社区合作的产物。它采用Xfce 作为缺省桌面,是一个轻量级操作系统。</p> +<p>本Repo镜像了MX Linux和AntiX的安装镜像。具体信息可以参见 <a href="https://mxlinux.org/wiki/system/iso-download-mirrors">https://mxlinux.org/wiki/system/iso-download-mirrors</a> 。</p> +<p>本站另有<code>mx-packages</code>镜像,包括了MX Linux与AntiX的软件包,欢迎大家使用。</p> + + + + + mx-packages + https://sjtug.org/post/mirror-help/mx-packages/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/mx-packages/ + <p><a href="https://mxlinux.org/">MX Linux</a> 是一个基于Debian 稳定分支的面向桌面的Linux发行,它是antiX 及早先的MEPIS 社区合作的产物。它采用Xfce 作为缺省桌面,是一个轻量级操作系统。</p> +<p>本Repo镜像了MX Linux和AntiX的软件包。</p> +<p>使用方法:</p> +<ul> +<li> +<p>(推荐)打开MX Repo Manager,选择SJTUG mirror</p> +</li> +<li> +<p>(手动): +打开<code> /etc/apt/sources.list</code>,将</p> +</li> +</ul> +<pre><code>deb http://mxrepo.com/mx/repo/ stretch non-free main +deb http://mxrepo.com/mx/testrepo/ mx7 test +</code></pre><p>替换成</p> +<pre><code>deb http://mirrors.sjtug.sjtu.edu.cn/mx-packages/mx/repo stretch main non-free +deb http://mirrors.sjtug.sjtu.edu.cn/mx-packages/mx/testrepo test +</code></pre> + + + + nix-channels/store + https://sjtug.org/post/mirror-help/nix-channels/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/nix-channels/ + <p>Nix 是一个支持 Linux 和 macOS 的函数式包管理器,具有原子更新、依赖隔离、构建尽可能可复现等特点。</p> +<p>Nixpkgs 是 Nix 包管理器对应的软件发行版,使用 Nix 函数式语言编写,除软件包外提供用于软件定制、构建、开发环境配置的工具。</p> +<p>使用方法:</p> +<p>单独安装的 Nix:编辑配置文件(系统配置位于 <code>/etc/nix/nix.conf</code>,用户配置位于 <code>~/.config/nix/nix.conf</code>):</p> +<pre><code>substituters = https://mirror.sjtu.edu.cn/nix-channels/store https://cache.nixos.org +</code></pre><p>单独安装的 Nix 在更改完配置文件之后需要重启 nix-daemon 才能应用配置。</p> +<p>NixOS 与 nix-darwin:编辑配置文件(一般来说,NixOS 配置位于 <code>/etc/nixos/configuration.nix</code>,nix-darwin 配置位于 <code>$HOME/.nixpkgs/darwin-configuration.nix</code>,如果你手动指定了 <code>NIX_PATH</code> 或是使用 Flakes 管理系统,请根据具体情况编辑对应的文件):</p> +<p>对于 NixOS 21.11(及之前的版本)与 nix-darwin:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-nix" data-lang="nix">{ config<span style="color:#f92672">,</span> lib<span style="color:#f92672">,</span> pkgs<span style="color:#f92672">,</span> <span style="color:#f92672">...</span> }: +{ + nix<span style="color:#f92672">.</span>binaryCaches <span style="color:#f92672">=</span> [ <span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/nix-channels/store&#34;</span> ]; +} +</code></pre></div><p>对于 NixOS 22.05(及之后的版本):</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-nix" data-lang="nix">{ config<span style="color:#f92672">,</span> lib<span style="color:#f92672">,</span> pkgs<span style="color:#f92672">,</span> <span style="color:#f92672">...</span> }: +{ + nix<span style="color:#f92672">.</span>settings<span style="color:#f92672">.</span>substituters <span style="color:#f92672">=</span> [ <span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/nix-channels/store&#34;</span> ]; +} +</code></pre></div><p>NixOS 与 nix-darwin 在更改完配置之后需要 switch 到新配置后生效。</p> + + + + + nodejs-release + https://sjtug.org/post/mirror-help/nodejs-release/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/nodejs-release/ + <p>本链接反代了 <a href="https://nodejs.org/dist/">https://nodejs.org/dist/</a> 。可以在此手动下载Nodejs的安装包,也可以配合Nodejs环境使用:</p> +<ul> +<li><code>n</code>:<code>export NODE_MIRROR=https://mirrors.sjtug.sjtu.edu.cn/nodejs-release/</code></li> +<li><code>nvm</code>:<code>export NVM_NODEJS_ORG_MIRROR=https://mirrors.sjtug.sjtu.edu.cn/nodejs-release</code></li> +</ul> + + + + + npm-registry + https://sjtug.org/post/mirror-help/npm-registry/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/npm-registry/ + <p>npm-registry 源是 NodeJS 的官方包管理 npm 的仓库的反向代理,可以加速<code>npm install</code>等需要下载的命令。</p> +<p>使用方法:</p> +<ul> +<li><strong>短期使用</strong>: 在<code>npm</code>命令后加上<code>--registry=https://mirrors.sjtug.sjtu.edu.cn/npm-registry</code>的参数,即可使用SJTUG源。</li> +<li><strong>长期使用</strong>: +<ul> +<li><strong>Xnix</strong>: 打开<code>$HOME/.npmrc</code>,添加以下内容:</li> +</ul> +<pre><code>registry=https://mirrors.sjtug.sjtu.edu.cn/npm-registry +</code></pre><p>即可大幅提升下载速度。</p> +<ul> +<li><strong>Windows</strong>: 编辑<code>%USERPROFILE%\.npmrc</code>,同样加入以上内容即可使用SJTUG镜像源。</li> +</ul> +</li> +</ul> + + + + + openEuler + https://sjtug.org/post/mirror-help/openeuler/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/openeuler/ + <p>openEuler 是一个开源、免费的 Linux 发行版,将通过开放的社区形式与全球的开发者共同构建一个开放、 +多元和架构包容的软件生态体系。</p> +<p>同时,openEuler 也是一个创新的平台,鼓励任何人在该平台上提出新想法、开拓新思路、实践新方案。</p> +<h2 id="配置方法">配置方法</h2> +<p>openEuler 源包含多个版本,假定您需要使用 openEuler-20.09 版本,在 yum 源目录(<code>/etc/yum.repos.d/</code>)下新增 openEuler.repo 文件, +注意文件中的 <code>openEuler-20.09</code> 路径:</p> +<pre><code>[OS] +name=OS +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/OS/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/OS/$basearch/RPM-GPG-KEY-openEuler +[everything] +name=everything +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/everything/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/everything/$basearch/RPM-GPG-KEY-openEuler +[EPOL] +name=EPOL +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/EPOL/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/EPOL/$basearch/RPM-GPG-KEY-openEuler +[debuginfo] +name=debuginfo +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/debuginfo/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/debuginfo/$basearch/RPM-GPG-KEY-openEuler +[source] +name=source +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/source/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/source/RPM-GPG-KEY-openEuler +</code></pre><p>正常执行 <code>yum update</code> 和 <code>yum install</code> 即可。如果您在使用的过程中遇到任何问题,可以直接联系 openEuler +社区 <a href="mailto:admin@openeuler.io">admin@openeuler.io</a>,也可以通过 GitHub 向 SJTUG 反馈 bug。</p> + + + + + packagist + https://sjtug.org/post/mirror-help/packagist/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/packagist/ + <p>Packagist 是 PHP 包管理软件 Composer 的源。本镜像仅包含所有包的 metadata,并非全量同步镜像。</p> +<p><strong>使用方法</strong></p> +<p>全局设置</p> +<pre><code>composer config -g repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn +</code></pre><p>或者仅对一个项目设置</p> +<pre><code>composer config repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn +</code></pre> + + + + parrot + https://sjtug.org/post/mirror-help/parrot/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/parrot/ + <p>Parrot Security OS是一个基于Debian的Linux发行版,专注于计算机安全。它专为渗透测试,漏洞评估和缓解,计算机取证和匿名Web浏览而设计。</p> +<p><strong>使用方法</strong></p> +<p>修改<code>etc/apt/sources.list.d/parrot.list</code>的以下内容:</p> +<pre><code>#stable repository +deb https://mirrors.sjtug.sjtu.edu.cn/parrot/ parrot main contrib non-free +#deb-src https://mirrors.sjtug.sjtu.edu.cn/parrot/ parrot main contrib non-free +</code></pre> + + + + putty + https://sjtug.org/post/mirror-help/putty/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/putty/ + <p>PuTTY是一个支持Telnet、SSH、rlogin、纯TCP以及串行端口连接软件。</p> +<p>使用方法:直接打开点击Download</p> + + + + + pypi-packages + https://sjtug.org/post/mirror-help/pypi-packages/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/pypi-packages/ + <p><del>2019年10月10日起,由于 PyPI 占用过多空间,我们将 PyPI 改为了反代。PyPI 源的服务质量可能有所下降。</del></p> +<p>2020年12月7日起,我们通过智能缓存全量同步了 PyPI。欢迎继续使用。</p> +<p>PyPI 是 Python 官方的包仓库,可以通过 <code>pip</code>, <code>easy_install</code> 等方式从 PyPI 安装 <code>numpy</code>, <code>tensorflow</code> 等常用包。</p> +<p>执行指令</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple +</code></pre></div><p>或者创建或编辑 <code>~/.config/pip/pip.conf</code> 文件,加入或修改 <code>index-url</code> 相关段落为:</p> +<pre><code class="language-conf" data-lang="conf">[global] +index-url = https://mirror.sjtu.edu.cn/pypi/web/simple +format = columns +</code></pre><p>临时使用:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip install -i https://mirror.sjtu.edu.cn/pypi/web/simple numpy +</code></pre></div> + + + + pypi/web/simple + https://sjtug.org/post/mirror-help/pypi/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/pypi/ + <p><del>2019年10月10日起,由于 PyPI 占用过多空间,我们将 PyPI 改为了反代。PyPI 源的服务质量可能有所下降。</del></p> +<p>2020年12月7日起,我们通过智能缓存全量同步了 PyPI。欢迎继续使用。</p> +<p>PyPI 是 Python 官方的包仓库,可以通过 <code>pip</code>, <code>easy_install</code> 等方式从 PyPI 安装 <code>numpy</code>, <code>tensorflow</code> 等常用包。</p> +<p>执行指令</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple +</code></pre></div><p>或者创建或编辑 <code>~/.config/pip/pip.conf</code> 文件,加入或修改 <code>index-url</code> 相关段落为:</p> +<pre><code class="language-conf" data-lang="conf">[global] +index-url = https://mirror.sjtu.edu.cn/pypi/web/simple +format = columns +</code></pre><p>临时使用:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip install -i https://mirror.sjtu.edu.cn/pypi/web/simple numpy +</code></pre></div> + + + + pytorch-wheels + https://sjtug.org/post/mirror-help/pytorch-wheels/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/pytorch-wheels/ + <p>pytorch-wheels 是 PyTorch pip 源的镜像。直接将 <a href="https://pytorch.org/get-started/locally/">PyTorch 安装指引</a> +中的 <code>https://download.pytorch.org/whl</code> 替换为 <code>https://mirror.sjtu.edu.cn/pytorch-wheels</code> 即可。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip install torch<span style="color:#f92672">===</span>1.7.1 torchvision<span style="color:#f92672">===</span>0.8.2 torchaudio<span style="color:#f92672">===</span>0.7.2 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html +</code></pre></div> + + + + raspberry-pi-os-images + https://sjtug.org/post/mirror-help/raspberry-pi-os-images/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspberry-pi-os-images/ + <p>主仓库地址: <a href="http://downloads.raspberrypi.org/">http://downloads.raspberrypi.org/</a></p> +<p><strong>使用方法</strong></p> +<p>根据需要的版本进入以下包含 Raspberry Pi OS 系统镜像的目录,选择<code>.zip</code>文件下载即可。推荐使用 <a href="https://www.balena.io/etcher/">balenaEtcher</a> 将镜像写入 SD 卡</p> +<table> +<thead> +<tr> +<th>Raspberry Pi OS 版本</th> +<th>存储目录</th> +</tr> +</thead> +<tbody> +<tr> +<td>精简版 Raspberry Pi OS 系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_lite_armhf/images/">raspios_lite_armhf</a></td> +</tr> +<tr> +<td>常规版 Raspberry Pi OS 系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_armhf/images/">raspios_armhf</a></td> +</tr> +<tr> +<td>完整版 Raspberry Pi OS 系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_full_armhf/images/">raspios_full_armhf</a></td> +</tr> +<tr> +<td>精简版 Raspberry Pi OS 64位系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_lite_arm64/images/">raspios_lite_arm64</a></td> +</tr> +<tr> +<td>常规版 Raspberry Pi OS 64位系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_arm64/images/">raspios_arm64</a></td> +</tr> +</tbody> +</table> +<p><strong>备注</strong></p> +<ul> +<li>暂无 Raspberry Pi OS 64位完整版系统</li> +<li>Raspberry Pi OS 是 Raspbian 的后继者,二者名称不同,但功能和界面相同。首个 Raspberry Pi OS 系统发行于 2020年5月27日</li> +<li>2012年7月15日-2020年2月14日期间发行的旧版 Raspbian 系统镜像与 Raspberry Pi OS 位于不同目录,各版本分别位于:<a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspbian_lite/images/">raspbian_lite</a>、<a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspbian/images/">raspbian</a>、<a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspbian_full/images/">raspbian_full</a>。</li> +</ul> +<p><strong>Raspberry Pi OS 常用设置</strong></p> +<ul> +<li> +<p>无头初始化设置</p> +<ul> +<li> +<p>启用 SSH:在 SD 卡 boot 分区中创建名为 <code>ssh</code> (不应包括任何扩展名或其他字符)的空白文件</p> +</li> +<li> +<p>预设 WiFi 信息:在 SD 卡 boot 分区中创建名为 <code>wpa_supplicant.conf</code> 的文本文件,按如下格式填写 <code>YOUR_WiFi_NAME</code> 和 <code>YOUR_WiFi_PASSWORD</code> ,推荐设置为本机 WiFi 热点或拥有管理员权限的无线路由器 WiFi ,以便查找树莓派的 IP 地址</p> +<pre><code>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev +update_config=1 +country=CN + +network={ + ssid=&quot;YOUR_WiFi_NAME&quot; + psk=&quot;YOUR_WiFi_PASSWORD&quot; +} +</code></pre></li> +<li> +<p>远程连接:插卡启动树莓派,在 WiFi 热点中查询 IP 分配情况,确认树莓派的 IP 地址,使用 SSH 进行远程连接。树莓派的默认 SSH 端口为 22,用户名为 <code>pi</code> ,默认密码为 <code>raspberry</code></p> +</li> +</ul> +</li> +<li> +<p>命令行下的设置</p> +<ul> +<li>在终端输入 <code>sudo raspi-config</code> 命令进行基本设置。可将时区设置为 <code>Asia/Shanghai</code> ,将默认区域更改为 <code>en_US.UTF-8</code> (英文)或 <code>zh_CN.UTF-8</code> (中文);连接USB键盘时,可将键盘布局修改为美式键盘(Generic 104-key PC -&gt; Other -&gt; English (US) -&gt; English (US));同时还可启用 VNC 以进行远程桌面连接。</li> +</ul> +</li> +<li> +<p>图形界面下的设置</p> +<ul> +<li>首次进入桌面时,根据提示进行鼠标操作设置即可</li> +</ul> +</li> +<li> +<p>apt 软件源修改</p> +<ul> +<li> +<p>Raspberry Pi OS 系统镜像内预置的 apt 软件源在国内访问缓慢,可将 apt 软件源更改为 SJTUG 镜像源</p> +<ul> +<li>将 <code>/etc/apt/sources.list</code> 文件中的 raspbian 存储库由 <code>http://raspbian.raspberrypi.org/raspbian/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/</code> ,对于64位 Raspberry Pi OS ,将 <code>http://deb.debian.org/debian/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/debian/</code> ,将 <code>http://deb.debian.org/debian-security/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/debian-security/</code></li> +<li>将 <code>/etc/apt/sources.list.d/raspi.list</code> 文件中的 raspberrypi 存储库由 <code>http://archive.raspberrypi.org/debian/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/</code></li> +</ul> +</li> +<li> +<p>可输入以下命令完成 apt 软件源设置(截至 2021-05-28 版仍然适用)</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak +sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak +sudo sed -i <span style="color:#e6db74">&#34;s|http://raspbian.raspberrypi.org/raspbian/|https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/|g&#34;</span> /etc/apt/sources.list +sudo sed -i <span style="color:#e6db74">&#34;s|http://deb.debian.org/debian|https://mirrors.sjtug.sjtu.edu.cn/debian|g&#34;</span> /etc/apt/sources.list +sudo sed -i <span style="color:#e6db74">&#34;s|http://archive.raspberrypi.org/debian/|https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/|g&#34;</span> /etc/apt/sources.list.d/raspi.list +sudo apt update +</code></pre></div></li> +</ul> +</li> +<li> +<p>添加 Raspbian 非官方软件源 Raspbian Addons(可选)</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">wget -qO- https://mirror.sjtu.edu.cn/raspbian-addons/KEY.gpg | sudo apt-key add - +echo <span style="color:#e6db74">&#34;deb https://mirror.sjtu.edu.cn/raspbian-addons/debian precise main&#34;</span> | sudo tee /etc/apt/sources.list.d/raspbian-addons.list +sudo apt update +</code></pre></div></li> +<li> +<p>软件包更新</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">sudo apt update <span style="color:#f92672">&amp;&amp;</span> sudo apt upgrade -y <span style="color:#f92672">&amp;&amp;</span> sudo apt autoremove -y +</code></pre></div></li> +</ul> + + + + + raspberrypi + https://sjtug.org/post/mirror-help/raspberrypi/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspberrypi/ + <p>raspberrypi是树莓派基金会提供的软件源,包括 ui 相关程序及部分由树莓派基金会为树莓派编写的软件。</p> +<p><strong>使用方法</strong></p> +<p>将<code>/etc/apt/sources.list.d/raspi.list</code>中的<code>http://archive.raspberrypi.org/debian/</code>更换成<code>https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/</code>。</p> + + + + + raspbian + https://sjtug.org/post/mirror-help/raspbian/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspbian/ + <p>Raspberry Pi OS 是为树莓派设计,基于 Debian 的操作系统。本镜像提供了 Raspberry Pi OS 的官方软件源。</p> +<p><strong>使用方法</strong></p> +<p>更换软件源:</p> +<p>编辑<code>/etc/apt/sources.list</code>,将所有的<code>deb</code>与<code>deb-src</code>之后的网址替换成<code>https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/</code>。</p> + + + + + raspbian-addons + https://sjtug.org/post/mirror-help/raspbian-addons/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspbian-addons/ + <p>Raspbian Addons 是 Raspbian 非官方软件源,含有许多来自 GitHub 的开源软件,可作为对 Raspbian(Debian) 官方仓库的一个补充。</p> +<ul> +<li>项目主页:https://raspbian-addons.org</li> +<li>官方文档:https://docs.raspbian-addons.org</li> +<li>GitHub 主页:https://github.com/raspbian-addons</li> +</ul> +<p>支持架构:armhf、arm64</p> +<h2 id="使用方法">使用方法</h2> +<p>信任仓库的 GPG 公钥</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">wget -qO- https://mirror.sjtu.edu.cn/raspbian-addons/KEY.gpg | sudo apt-key add - +</code></pre></div><p>添加该仓库</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">echo <span style="color:#e6db74">&#34;deb https://mirror.sjtu.edu.cn/raspbian-addons/debian precise main&#34;</span> | sudo tee /etc/apt/sources.list.d/raspbian-addons.list +</code></pre></div><p>更新软件包缓存</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo apt update +</code></pre></div> + + + + rocky + https://sjtug.org/post/mirror-help/rocky/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/rocky/ + <p>使用方法:运行下面的指令一键替换并备份。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -e <span style="color:#e6db74">&#39;s|^mirrorlist=|#mirrorlist=|g&#39;</span> <span style="color:#ae81ff">\ +</span><span style="color:#ae81ff"></span> -e <span style="color:#e6db74">&#39;s|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.sjtug.sjtu.edu.cn/rocky|g&#39;</span> <span style="color:#ae81ff">\ +</span><span style="color:#ae81ff"></span> -i.bak <span style="color:#ae81ff">\ +</span><span style="color:#ae81ff"></span> /etc/yum.repos.d/Rocky-*.repo +</code></pre></div><p>最后运行 <code>dnf makecache</code> 生成缓存</p> + + + + + ros + https://sjtug.org/post/mirror-help/ros/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ros/ + <p>使用方式:</p> +<p>可使用<code>gedit</code>等文本编辑器修改<code>/etc/apt/sources.list.d/ros-latest.list</code>。修改后使用<code>sudo apt update</code>更新软件源。</p> +<p>Ubuntu 18.04 (ROS Melodic)</p> +<pre><code>deb https://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu bionic main +</code></pre><p>Ubuntu 20.04 (ROS Noetic)</p> +<pre><code>deb https://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu focal main +</code></pre> + + + + rust-static + https://sjtug.org/post/mirror-help/rust-static/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/rust-static/ + <p>rust-static储存了rust的工具链及<code>rustup</code>本身的镜像。</p> +<p>使用方法:安装<code>rustup</code>,将以下环境变量加入<code>~/.bashrc</code>或类似文件中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export RUSTUP_DIST_SERVER<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/rust-static +export RUSTUP_UPDATE_ROOT<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/rust-static/rustup +</code></pre></div> + + + + ubuntu + https://sjtug.org/post/mirror-help/ubuntu/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu/ + <p>Ubuntu是一个基于Debian的Linux发行版,包含了常用的大量软件包。Ubuntu的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。Ubuntu目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。</p> +<p>SJTUG镜像源可以加速软件包的安装。</p> +<p>使用方式:</p> +<p>使用<code>sudo nano /etc/apt/sources.list</code>打开镜像源列表文件。将类似于<code>http://cn.archive.ubuntu.com/ubuntu</code>或<code>http://cn.archive.ubuntu.com/ubuntu</code>的地址改成<code>https://mirror.sjtu.edu.cn/ubuntu</code>,之后按<code>Ctrl-O 回车</code>保存,按<code>Ctrl-X</code>退出。最后执行<code>sudo apt update</code>即可。</p> +<p>镜像站一天同步一次 Ubuntu 镜像。为了取得最新的安全更新,我们不建议您将 <code>security.ubuntu.com</code> 换成镜像源。</p> +<p>您也可使用<code>sudo sed -i 's/http:\/\/cn.archive.ubuntu.com/https:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list</code>指令直接批量修改。</p> +<p>以下为修改后的镜像源列表文件的示例。可使用<code>gedit</code>等文本编辑器修改<code>/etc/apt/sources.list</code>。修改后使用<code>sudo apt update</code>更新软件源。</p> +<p>Ubuntu 18.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu/ bionic main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 20.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu/ focal main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ focal-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 22.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu/ jammy main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse +</code></pre><p>其中<code>deb-src</code>为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。</p> + + + + + ubuntu-cd + https://sjtug.org/post/mirror-help/ubuntu-cd/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-cd/ + <p>Ubuntu 是一个基于 Debian 的 Linux 发行版。 Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。 Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。</p> +<p>本镜像主要收录还在生命周期内 x86 和 arm 架构的镜像,包括开发版,不包括超过 End of Standard Support 后进入 ESM 的镜像。</p> +<p>您可以通过 <a href="https://wiki.ubuntu.com/Releases">https://wiki.ubuntu.com/Releases</a> 查看现在还在生命周期内的镜像。</p> +<p>更多衍生发行版和其他架构非桌面版本请至 <a href="https://mirror.sjtu.edu.cn/ubuntu-cdimage/">https://mirror.sjtu.edu.cn/ubuntu-cdimage/</a> 查看,或者在 <a href="https://mirror.sjtu.edu.cn/docs/ubuntu-cdimage">https://mirror.sjtu.edu.cn/docs/ubuntu-cdimage</a> 获取该镜像使用帮助。</p> + + + + + ubuntu-cdimage + https://sjtug.org/post/mirror-help/ubuntu-cdimage/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-cdimage/ + <p>Ubuntu 是一个基于 Debian 的 Linux 发行版。 Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。 Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。</p> +<p>本镜像提供现在维护版本的每日构建版本、 Ubuntu 原版的 server 版本和 Ubuntu 衍生版本,提供这些版本的多个架构支持。</p> +<p>Ubuntu 衍生版现在包括 Kubuntu(KDE) 、 Xubuntu(Xfce) 、 Ubuntu Budgie 、 Ubuntu Studio 、 Lubuntu(LXDE) 、 Ubuntu Kylin (优麒麟)、Ubuntu MATE 、Ubuntu Budgie(Budgie),可以进入相关目录下载衍生版的镜像。</p> +<p>你可以查看 <a href="https://wiki.ubuntu.com/UbuntuFlavors">https://wiki.ubuntu.com/UbuntuFlavors</a> 现在所支持的 Ubuntu 衍生版本和已经不受到支持的 Ubuntu 衍生版本。</p> +<p>如果你正在寻找原版的桌面版本,你可以在 <a href="https://mirror.sjtu.edu.cn/ubuntu-cd/">https://mirror.sjtu.edu.cn/ubuntu-cd/</a> 获取, +也可以在这查看使用帮助 <a href="https://mirror.sjtu.edu.cn/docs/ubuntu-cd">https://mirror.sjtu.edu.cn/docs/ubuntu-cd</a>。</p> + + + + + ubuntu-cloud-images + https://sjtug.org/post/mirror-help/ubuntu-cloud-images/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-cloud-images/ + <p>本镜像为 OpenStack, LXD 等公有云使用的 Ubuntu 镜像,收录官方的云 Ubuntu 镜像,由 Canonical 定制,提供 Ubuntu 认证镜像,可在 OpenStack, LXD 等公有云上运行。</p> +<p>本镜像包含 KVM, Hyper-V, Xen 等虚拟结构的官方定制镜像。</p> +<p><strong>使用方法</strong></p> +<p>可以使用 <a href="https://mirror.sjtu.edu.cn/ubuntu-cloud-images/locator">https://mirror.sjtu.edu.cn/ubuntu-cloud-images/locator/</a> 查找公有云使用的镜像。</p> + + + + + ubuntu-ports + https://sjtug.org/post/mirror-help/ubuntu-ports/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-ports/ + <p>使用方式:</p> +<p>可使用<code>gedit</code>等文本编辑器修改<code>/etc/apt/sources.list</code>。修改后使用<code>sudo apt update</code>更新软件源。</p> +<p>Ubuntu 18.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 20.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 22.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse +</code></pre><p>其中<code>deb-src</code>为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。</p> + + + + + voidlinux + https://sjtug.org/post/mirror-help/voidlinux/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/voidlinux/ + <p>Void linux 是基于 Linux 内核独立开发的通用操作系统。其特色在于一份二进制/源代码混合式包管理系统,这使得用户能快速安装、更新、移除软件,或者是借助 XBPS 源代码集合从源码直接生成软件。该发行的其他特性包括对 Raspberry Pi 单板计算机(armv6 和 armv7)的支持,每日更新的滚动式开发模式,可以选择 glibc 和 musl 作为 C 库,以及名为 runit 的原生 BSD 风格 init 系统。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">mkdir -p /etc/xbps.d +cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ +sed -i <span style="color:#e6db74">&#39;s|https://alpha.de.repo.voidlinux.org|https://mirror.sjtu.edu.cn/voidlinux|g&#39;</span> /etc/xbps.d/*-repository-*.conf +</code></pre></div><p>之后可用 <code>xbps-query -L</code> 检查是否正确替换。</p> +<p>运行 <code>xbps-install -Su</code> 刷新镜像并更新系统。</p> +<p>请前往<a href="https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html">官方教程</a>获取更多信息。</p> + + + + + \ No newline at end of file diff --git a/post/migrate-from-jekyll/index.html b/post/migrate-from-jekyll/index.html new file mode 100644 index 00000000..24e7415c --- /dev/null +++ b/post/migrate-from-jekyll/index.html @@ -0,0 +1,327 @@ + + + + + + + + + + Migrate to Hugo from Jekyll · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Migrate to Hugo from Jekyll

+

+ March 10, 2014 + + +
+ +

+
+ +
+

Move static content to static

+

Jekyll has a rule that any directory not starting with _ will be copied as-is to the _site output. Hugo keeps all static content under static. You should therefore move it all there. +With Jekyll, something that looked like

+
▾ <root>/
+    ▾ images/
+        logo.png
+
+

should become

+
▾ <root>/
+    ▾ static/
+        ▾ images/
+            logo.png
+
+

Additionally, you’ll want any files that should reside at the root (such as CNAME) to be moved to static.

+

Create your Hugo configuration file

+

Hugo can read your configuration as JSON, YAML or TOML. Hugo supports parameters custom configuration too. Refer to the Hugo configuration documentation for details.

+

Set your configuration publish folder to _site

+

The default is for Jekyll to publish to _site and for Hugo to publish to public. If, like me, you have _site mapped to a git submodule on the gh-pages branch, you’ll want to do one of two alternatives:

+
    +
  1. +

    Change your submodule to point to map gh-pages to public instead of _site (recommended).

    +
     git submodule deinit _site
    + git rm _site
    + git submodule add -b gh-pages git@github.com:your-username/your-repo.git public
    +
    +
  2. +
  3. +

    Or, change the Hugo configuration to use _site instead of public.

    +
     {
    +     ..
    +     "publishdir": "_site",
    +     ..
    + }
    +
    +
  4. +
+

Convert Jekyll templates to Hugo templates

+

That’s the bulk of the work right here. The documentation is your friend. You should refer to Jekyll’s template documentation if you need to refresh your memory on how you built your blog and Hugo’s template to learn Hugo’s way.

+

As a single reference data point, converting my templates for heyitsalex.net took me no more than a few hours.

+

Convert Jekyll plugins to Hugo shortcodes

+

Jekyll has plugins; Hugo has shortcodes. It’s fairly trivial to do a port.

+

Implementation

+

As an example, I was using a custom image_tag plugin to generate figures with caption when running Jekyll. As I read about shortcodes, I found Hugo had a nice built-in shortcode that does exactly the same thing.

+

Jekyll’s plugin:

+
    module Jekyll
+      class ImageTag < Liquid::Tag
+        @url = nil
+        @caption = nil
+        @class = nil
+        @link = nil
+        // Patterns
+        IMAGE_URL_WITH_CLASS_AND_CAPTION =
+        IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK = /(\w+)(\s+)((https?:\/\/|\/)(\S+))(\s+)"(.*?)"(\s+)->((https?:\/\/|\/)(\S+))(\s*)/i
+        IMAGE_URL_WITH_CAPTION = /((https?:\/\/|\/)(\S+))(\s+)"(.*?)"/i
+        IMAGE_URL_WITH_CLASS = /(\w+)(\s+)((https?:\/\/|\/)(\S+))/i
+        IMAGE_URL = /((https?:\/\/|\/)(\S+))/i
+        def initialize(tag_name, markup, tokens)
+          super
+          if markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION_AND_LINK
+            @class   = $1
+            @url     = $3
+            @caption = $7
+            @link = $9
+          elsif markup =~ IMAGE_URL_WITH_CLASS_AND_CAPTION
+            @class   = $1
+            @url     = $3
+            @caption = $7
+          elsif markup =~ IMAGE_URL_WITH_CAPTION
+            @url     = $1
+            @caption = $5
+          elsif markup =~ IMAGE_URL_WITH_CLASS
+            @class = $1
+            @url   = $3
+          elsif markup =~ IMAGE_URL
+            @url = $1
+          end
+        end
+        def render(context)
+          if @class
+            source = "<figure class='#{@class}'>"
+          else
+            source = "<figure>"
+          end
+          if @link
+            source += "<a href=\"#{@link}\">"
+          end
+          source += "<img src=\"#{@url}\">"
+          if @link
+            source += "</a>"
+          end
+          source += "<figcaption>#{@caption}</figcaption>" if @caption
+          source += "</figure>"
+          source
+        end
+      end
+    end
+    Liquid::Template.register_tag('image', Jekyll::ImageTag)
+

is written as this Hugo shortcode:

+
<!-- image -->
+<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
+    {{ with .Get "link"}}<a href="{{.}}">{{ end }}
+        <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
+    {{ if .Get "link"}}</a>{{ end }}
+    {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
+    <figcaption>{{ if isset .Params "title" }}
+        {{ .Get "title" }}{{ end }}
+        {{ if or (.Get "caption") (.Get "attr")}}<p>
+        {{ .Get "caption" }}
+        {{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
+            {{ .Get "attr" }}
+        {{ if .Get "attrlink"}}</a> {{ end }}
+        </p> {{ end }}
+    </figcaption>
+    {{ end }}
+</figure>
+<!-- image -->
+
+

Usage

+

I simply changed:

+
{% image full http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg "One of my favorite touristy-type photos. I secretly waited for the good light while we were "having fun" and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." ->http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/ %}
+
+

to this (this example uses a slightly extended version named fig, different than the built-in figure):

+
{{% fig class="full" src="http://farm5.staticflickr.com/4136/4829260124_57712e570a_o_d.jpg" title="One of my favorite touristy-type photos. I secretly waited for the good light while we were having fun and took this. Only regret: a stupid pole in the top-left corner of the frame I had to clumsily get rid of at post-processing." link="http://www.flickr.com/photos/alexnormand/4829260124/in/set-72157624547713078/" %}}
+
+

As a bonus, the shortcode named parameters are, arguably, more readable.

+

Finishing touches

+

Fix content

+

Depending on the amount of customization that was done with each post with Jekyll, this step will require more or less effort. There are no hard and fast rules here except that hugo server --watch is your friend. Test your changes and fix errors as needed.

+

Clean up

+

You’ll want to remove the Jekyll configuration at this point. If you have anything else that isn’t used, delete it.

+

A practical example in a diff

+

Hey, it’s Alex was migrated in less than a father-with-kids day from Jekyll to Hugo. You can see all the changes (and screw-ups) by looking at this diff.

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/alpine/index.html b/post/mirror-help/alpine/index.html new file mode 100644 index 00000000..e29ecf2e --- /dev/null +++ b/post/mirror-help/alpine/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + alpine · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

alpine

+

+ April 17, 2021 + +
+ hmsjy2017 + + +
+ + + + mirror-help + + + +

+
+ +
+

Alpine Linux 是一个面向安全,轻量级的基于musl libc与busybox项目的Linux发行版。

+

使用方法:

+
sed -i 's/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g' /etc/apk/repositories
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/anaconda/index.html b/post/mirror-help/anaconda/index.html new file mode 100644 index 00000000..0feb5e7b --- /dev/null +++ b/post/mirror-help/anaconda/index.html @@ -0,0 +1,244 @@ + + + + + + + + + + anaconda · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

anaconda

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Anaconda 是一种 Python 语言的免费增值开源发行版,用于进行大规模数据处理, 预测分析, 和科学计算, 致力于简化包的管理和部署。Anaconda 使用软件包管理系统 conda 进行包管理。

+

SJTUG 源镜像了常用的 conda 库,以方便科学计算用户使用。

+

Note: 如果您正在从其他镜像源切换到 SJTUG,请检查我们是否同步了你所需要的 repo,以及该 repo 是否支持您使用的平台 (e.g. linux-64)。如果没有,请删除相关配置,并提出新镜像请求。

+

使用说明

+

编辑 ~/.condarc

+
default_channels:
+  - https://mirror.sjtu.edu.cn/anaconda/pkgs/r
+  - https://mirror.sjtu.edu.cn/anaconda/pkgs/main
+custom_channels:
+  conda-forge: https://mirror.sjtu.edu.cn/anaconda/cloud/
+  pytorch: https://mirror.sjtu.edu.cn/anaconda/cloud/
+channels:
+  - defaults
+

custom_channels 中您可以添加下面所列的其他第三方源。我们建议您使用上面的方法配置,而非执行下面的指令。

+

您也可以使用conda config --add channels https://mirror.sjtu.edu.cn/anaconda/{{你所需要的包名}}来将SJTUG源添加作为这个包的上游。目前镜像的包与安装命令包括:

+
    +
  • 官方源: +
      +
    • pkgs/free: conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/free
    • +
    • pkgs/main: conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/main
    • +
    • pkgs/mro: conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/mro
    • +
    • pkgs/msys2: conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/msys2
    • +
    • pkgs/pro: (deprecated) conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/pro
    • +
    • pkgs/r: (empty) conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/r
    • +
    +
  • +
  • 第三方源: +
      +
    • cloud/bioconda: conda config --set custom_channels.bioconda https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/conda-forge: conda config --set custom_channels.conda-forge https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/menpo: conda config --set custom_channels.menpo https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/soumith: conda config --set custom_channels.soumith https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/viscid-hub: conda config --set custom_channels.viscid-hub https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/atztogo: conda config --set custom_channels.atztogo https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/pytorch: conda config --set custom_channels.pytorch https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    • cloud/pytorch-test: conda config --set custom_channels.pytorch-test https://mirror.sjtu.edu.cn/anaconda/cloud/
    • +
    +
  • +
+

此外,在 Conda 4.7 后,官方的 default 源组默认只包含 main 和 r (windows 会包含 msys2) channel,其他官方源仍支持手动添加。但官方建议不再使用 free channel,详见 Why We Removed the “Free” Channel in Conda 4.7

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/anthon/index.html b/post/mirror-help/anthon/index.html new file mode 100644 index 00000000..d41016ce --- /dev/null +++ b/post/mirror-help/anthon/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + anthon · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

anthon

+

+ January 1, 0001 + +
+ LengmoAngel + + +
+ + + + mirror-help + + + +

+
+ +
+

AOSC OS(安同 OS)软件源。AOSC OS 是一个由安同开源社区 [https://aosc.io](https://aosc.io)开发的半滚动 Linux 发行版,对包括 x86-64,aarch64,LoongArch64 等多种处理器架构提供支持。

+

使用方法

+

AOSC OS 内置 apt-gen-list 用于切换社区提供的可用镜像源。不建议直接使用 /etc/apt/sources.list 变更镜像。

+

使用如下指令将本镜像源添加到可用镜像源列表中

+
sudo apt-gen-list add-custom-mirror sjtug https://mirror.sjtu.edu.cn/anthon/
+

随后使用如下启用本镜像源

+
sudo apt-gen-list add-mirror sjtug
+

如果仅使用本镜像源,使用如下指令

+
sudo apt-gen-list set-mirror sjtug
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/archlinux-cn/index.html b/post/mirror-help/archlinux-cn/index.html new file mode 100644 index 00000000..d8b83aa1 --- /dev/null +++ b/post/mirror-help/archlinux-cn/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + archlinux-cn · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

archlinux-cn

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Arch Linux 中文社区仓库 是由 Arch Linux 中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。

+

完整的包信息列表(包名称/架构/维护者/状态)请 点击这里 查看。

+

仓库主地址:http://repo.archlinuxcn.org/

+

使用方法:在 /etc/pacman.conf 文件末尾添加以下两行:

+
[archlinuxcn]
+Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch
+

之后,请执行下面的命令安装 archlinuxcn-keyring 包导入 GPG key。

+
pacman -Sy archlinuxcn-keyring
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/archlinux/index.html b/post/mirror-help/archlinux/index.html new file mode 100644 index 00000000..a8d6294d --- /dev/null +++ b/post/mirror-help/archlinux/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + archlinux · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

archlinux

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Arch Linux 是通用 x86-64 GNU/Linux 发行版。Arch 采用滚动升级模式,尽全力提供最新的稳定版软件。初始安装的 Arch 只是一个基本系统,随后用户可以根据自己的喜好安装需要的软件并配置成符合自己理想的系统。

+

使用方法:编辑 /etc/pacman.d/mirrorlist 文件,添加 Server = https://mirror.sjtu.edu.cn/archlinux/$repo/os/$arch 这一行,同时注释掉其它所有镜像,然后运行 sudo pacman -Syy 更新软件包缓存。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/archlinuxarm/index.html b/post/mirror-help/archlinuxarm/index.html new file mode 100644 index 00000000..c0c1a0ef --- /dev/null +++ b/post/mirror-help/archlinuxarm/index.html @@ -0,0 +1,211 @@ + + + + + + + + + + archlinuxarm · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

archlinuxarm

+

+ January 1, 0001 + +
+ shrubbroom + + +
+ + + + mirror-help + + + +

+
+ +
+

Arch Linux ARM 是在使用 ARM 架构处理器的计算机上运行的 Linux 发行版。它为许多主流的采用 ARM 处理器的硬件提供内核及应用程序支持,同时和 Arch Linux 一样具有提供最新的软件源、避免预安装多余软件包等特点。

+

本仓库包含 Arch Linux ARM 的系统镜像及软件源。

+

系统镜像使用方法:请访问 https://archlinuxarm.org/platforms ,阅读硬件平台对应的安装指引并下载对应的系统镜像。

+

软件源使用方法:在 /etc/pacman.d/mirrorlist 的文件顶端(所有镜像源的最上面)加上:

+
Server = https://mirrors.sjtug.sjtu.edu.cn/archlinuxarm/$arch/$repo
+

之后,请执行下面的命令更新软件包缓存。

+
pacman -Syy
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/armbian/index.html b/post/mirror-help/armbian/index.html new file mode 100644 index 00000000..fc49e58a --- /dev/null +++ b/post/mirror-help/armbian/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + armbian · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

armbian

+

+ January 1, 0001 + +
+ qianbinbin + + +
+ + + + mirror-help + + + +

+
+ +
+

Armbian 是为 ARM 单板机提供的基于 Debian 和 Ubuntu 的操作系统。Armbian 仓库包括专用的 u-boot、内核及各种支持文件。

+

可以使用以下方法更换软件源:

+
    +
  • 运行 armbian-config -> Personal -> Mirrors -> 选择镜像站。
  • +
  • 编辑 /etc/apt/sources.list.d/armbian.list,将 http://apt.armbian.com 替换为 https://mirror.sjtu.edu.cn/armbian/,然后执行 apt update
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/bioconductor/index.html b/post/mirror-help/bioconductor/index.html new file mode 100644 index 00000000..f2136f59 --- /dev/null +++ b/post/mirror-help/bioconductor/index.html @@ -0,0 +1,216 @@ + + + + + + + + + + bioconductor · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

bioconductor

+

+ January 1, 0001 + +
+ MitsuhaMiyamizu + + +
+ + + + mirror-help + + + +

+
+ +
+

Bioconductor 为高通量基因组数据的分析和可视化提供开源工具。Bioconductor多数软件包采用R统计编程语言开发。Bioconductor 每年释出两个版本,并有活跃的用户社区。

+

使用方法:

+

Bioconductor 镜像源配置文件之一是 ~/.Rprofile

+

注:R 的 ~ 在类 Unix 系统下为: $HOME (即 ~ ),在 Windows 下为: %USERPROFILE%\Documents ,具体路径可以在 R 中执行 path.expand("~") 查看。

+

在该文件末尾添加如下语句或在R/RStudio终端下键入:

+
options(BioC_mirror="https://mirror.sjtu.edu.cn/bioconductor")
+

即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。 +命令如下:

+
if (!requireNamespace("BiocManager", quietly = TRUE))
+    install.packages("BiocManager")
+BiocManager::install("$package_name")
+

请访问官方网站获取更多信息。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/blackarch/index.html b/post/mirror-help/blackarch/index.html new file mode 100644 index 00000000..d8ed0169 --- /dev/null +++ b/post/mirror-help/blackarch/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + blackarch · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

blackarch

+

+ January 1, 0001 + +
+ Alampdow + + +
+ + + + mirror-help + + + +

+
+ +
+

BlackArch 是一款基于 ArchLinux 的为渗透测试及安全研究人员开发的发行版,相当于 Arch 版的 Kali。可以当做现有 Arch 系统的非官方用户存储库。

+

使用方法:

+

在现有 Arch 系统中,编辑/etc/pacman.conf,在末尾添加两行

+
[blackarch]
+Server = https://mirror.sjtu.edu.cn/blackarch/$repo/os/$arch
+

由于一些软件依赖32位的库,需要取消掉/etc/pacman.confmultilib的注释,详见https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib

+

之后,请执行下面的命令安装 blackarch-keyring 包导入 GPG key。

+
sudo pacman -Sy blackarch-keyring
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/brew-git/index.html b/post/mirror-help/brew-git/index.html new file mode 100644 index 00000000..45604259 --- /dev/null +++ b/post/mirror-help/brew-git/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + git/brew.git · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

git/brew.git

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

本镜像是 Homebrew 自身的仓库,上游为https://github.com/Homebrew/brew.git。在git相关操作时使用https://mirrors.sjtug.sjtu.edu.cn/git/brew.git替代上述地址即可。

+

SJTUG镜像同时也提供了homebrew-core, homebrew-caskbrew-bottles镜像,欢迎大家使用。

+

使用方法:

+

执行以下语句或加入到~/.bashrc中:

+
export HOMEBREW_BREW_GIT_REMOTE=https://mirrors.sjtug.sjtu.edu.cn/git/brew.git
+export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git
+export HOMEBREW_BOTTLE_DOMAIN=https://mirror.sjtu.edu.cn/homebrew-bottles/bottles
+

另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。

+

执行以下语句或加入到~/.bashrc中:

+
export HOMEBREW_NO_INSTALL_FROM_API=1
+

随后正常使用官方脚本安装即可。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/centos/index.html b/post/mirror-help/centos/index.html new file mode 100644 index 00000000..bcbcf223 --- /dev/null +++ b/post/mirror-help/centos/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + centos · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

centos

+

+ January 1, 0001 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

使用方法:运行下面的指令一键替换并备份。

+
sed -e 's/mirrorlist/#mirrorlist/g' -e 's|#baseurl=http://mirror.centos.org/|baseurl=http://mirror.sjtu.edu.cn/|g' -i.bak /etc/yum.repos.d/<需要替换的文件>
+

最后运行 dnf makecache 生成缓存

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/cran/index.html b/post/mirror-help/cran/index.html new file mode 100644 index 00000000..776d9f7b --- /dev/null +++ b/post/mirror-help/cran/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + cran · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

cran

+

+ July 4, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

使用方法:

+

在安装时指定 repo。

+
install.packages("lattice", repos="https://mirrors.sjtug.sjtu.edu.cn/cran/")
+

.Rprofile 中设置默认 repo。

+
options(repos=structure(c(CRAN="https://mirrors.sjtug.sjtu.edu.cn/cran/")))
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/crates.io/index.html b/post/mirror-help/crates.io/index.html new file mode 100644 index 00000000..5a1cf9d5 --- /dev/null +++ b/post/mirror-help/crates.io/index.html @@ -0,0 +1,220 @@ + + + + + + + + + + crates.io · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

crates.io

+

+ July 9, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

编辑 ~/.cargo/config.toml

+
[source]
+
+[source.mirror]
+registry = "sparse+https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/"
+
+[source.crates-io]
+replace-with = "mirror"
+

若您的 cargo 版本低于 1.68,请使用以下配置

+
[source]
+
+[source.mirror]
+registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/"
+
+[source.crates-io]
+replace-with = "mirror"
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/creates.io.git/index.html b/post/mirror-help/creates.io.git/index.html new file mode 100644 index 00000000..c2b3ea84 --- /dev/null +++ b/post/mirror-help/creates.io.git/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + git/crates.io-index · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

git/crates.io-index

+

+ July 9, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

编辑 ~/.cargo/config

+
[source]
+
+[source.mirror]
+registry = "https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/"
+
+[source.crates-io]
+replace-with = "mirror"
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/dart-packages/index.html b/post/mirror-help/dart-packages/index.html new file mode 100644 index 00000000..894fabe2 --- /dev/null +++ b/post/mirror-help/dart-packages/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + dart-pub · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

dart-pub

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

dart-pub 镜像全量同步了 Dart 语言官方仓库 https://pub.dartlang.org ,可以加速 Dart 包的下载。

+

使用方法:

+

设置环境变量 export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub 即可。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/debian-cd/index.html b/post/mirror-help/debian-cd/index.html new file mode 100644 index 00000000..99a2fe99 --- /dev/null +++ b/post/mirror-help/debian-cd/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + debian-cd · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

debian-cd

+

+ January 1, 0001 + +
+ LengmoAngel + + +
+ + + + mirror-help + + + +

+
+ +
+

Debian 是完全由自由软件组成的类 UNIX 操作系统,其包含的多数软件使用 GNU 通用公共许可协议授权,并由 Debian 计划的参与者组成团队对其进行打包、开发与维护。 Debian 以其坚守 Unix 和自由软件的精神,以及其给予用户的众多选择而闻名。现时 Debian 提供了超过25,000个软件,超过50,000个软件包,并正式支持10个计算机系统结构。

+

本镜像仅提供 Debian 最新稳定版本。

+

一般来说只需在 iso-cd 目录 https://mirror.sjtu.edu.cn/debian-cd/current/amd64/iso-cd/ 寻找无后缀版本即可。当你使用不支持 UEFI 启动的系统时候,请安装 mac 后缀版本。当你寻找教育版时候可以寻找 edu 后缀版本。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/debian-ports/index.html b/post/mirror-help/debian-ports/index.html new file mode 100644 index 00000000..0385c836 --- /dev/null +++ b/post/mirror-help/debian-ports/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + debian-ports · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

debian-ports

+

+ January 1, 0001 + +
+ hmsjy2017 + + +
+ + + + mirror-help + + + +

+
+ +
+

本软件源仅适用于 Debian riscv64。

+

编辑/etc/apt/sources.list,删除所有内容,添加以下内容并保存。

+
deb [arch=riscv64] http://mirror.sjtu.edu.cn/debian-ports unstable main
+deb [arch=riscv64] http://mirror.sjtu.edu.cn/debian-ports unreleased main
+

然后,使用sudo apt update更新软件包索引。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/debian/index.html b/post/mirror-help/debian/index.html new file mode 100644 index 00000000..41ad60d3 --- /dev/null +++ b/post/mirror-help/debian/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + debian · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

debian

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Debian 是完全由自由软件组成的类UNIX操作系统,其包含的多数软件使用GNU通用公共许可协议授权,并由Debian计划的参与者组成团队对其进行打包、开发与维护。Debian以其坚守Unix和自由软件的精神,以及其给予用户的众多选择而闻名。现时Debian提供了超过25,000个软件[9],超过50,000个软件包[10],并正式支持10个计算机系统结构。

+

使用方法:

+
    +
  • 一键替换
  • +
+
sudo sed -i "s|http://deb.debian.org/debian|http://mirror.sjtu.edu.cn/debian|g" /etc/apt/sources.list
+
    +
  • 手动替换
  • +
+

先安装 ca-certificates apt-transport-https 保证第三方https源可以使用。(执行 sudo apt install -y ca-certificates apt-transport-https

+

再打开 /etc/apt/sources.list,将类似于http://deb.debian.org/debian/的地址均替换为https://mirror.sjtu.edu.cn/debian/即可。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/docker-ce/index.html b/post/mirror-help/docker-ce/index.html new file mode 100644 index 00000000..60252a3b --- /dev/null +++ b/post/mirror-help/docker-ce/index.html @@ -0,0 +1,283 @@ + + + + + + + + + + docker-ce · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

docker-ce

+

+ August 21, 2021 + +
+ hmsjy2017 + + +
+ + + + mirror-help + + + +

+
+ +
+

Docker Community Edition 镜像使用帮助

+

注意: 本镜像只提供 Debian/Ubuntu/Fedora/CentOS/RHEL 的 docker 软件包,非 dockerhub

+

Debian/Ubuntu 用户

+

以下内容根据 TUNA文档 修改而来。

+

如果你过去安装过 docker,先删掉:

+
sudo apt-get remove docker docker-engine docker.io
+

首先安装依赖:

+
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
+

根据你的发行版,下面的内容有所不同。你使用的发行版:

+
Debian +信任 Docker 的 GPG 公钥: +
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
+对于 amd64 架构的计算机,添加软件仓库: +
+sudo add-apt-repository \
+   "deb [arch=amd64] https://mirror.sjtu.edu.cn/docker-ce/linux/debian \
+   $(lsb_release -cs) \
+   stable"
+
+如果你用的是树莓派或其它ARM架构计算机,请运行: +
+echo "deb [arch=armhf] https://mirror.sjtu.edu.cn/docker-ce/linux/debian \
+     $(lsb_release -cs) stable" | \
+    sudo tee /etc/apt/sources.list.d/docker.list
+
+最后安装 +
+sudo apt-get update
+sudo apt-get install docker-ce
+
+
+
Ubuntu +信任 Docker 的 GPG 公钥: +
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
+对于 amd64 架构的计算机,添加软件仓库: +
+sudo add-apt-repository \
+   "deb [arch=amd64] https://mirror.sjtu.edu.cn/docker-ce/linux/ubuntu \
+   $(lsb_release -cs) \
+   stable"
+
+如果你用的是树莓派或其它ARM架构计算机,请运行: +
+echo "deb [arch=armhf] https://mirror.sjtu.edu.cn/docker-ce/linux/ubuntu \
+     $(lsb_release -cs) stable" | \
+    sudo tee /etc/apt/sources.list.d/docker.list
+
+最后安装 +
+sudo apt-get update
+sudo apt-get install docker-ce
+
+
+

Fedora/CentOS/RHEL

+

以下内容根据TUNA文档修改而来。

+

如果你之前安装过 docker,请先删掉

+
sudo yum remove docker docker-common docker-selinux docker-engine
+

安装一些依赖

+
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
+

根据你的发行版下载repo文件:

+
CentOS/RHEL +
+wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
+
+
+
Fedora +
+wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/fedora/docker-ce.repo
+
+
+

把软件仓库地址替换为 SJTUG:

+
+sudo sed -i 's+download.docker.com+mirror.sjtu.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo
+
+

最后安装:

+
+sudo yum makecache fast
+sudo yum install docker-ce
+
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/docker-registry/index.html b/post/mirror-help/docker-registry/index.html new file mode 100644 index 00000000..ddead19e --- /dev/null +++ b/post/mirror-help/docker-registry/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + docker-registry · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

docker-registry

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

docker-registry 源是 Docker Hub 的反向代理,可以加速docker pull等需要下载镜像的命令。

+

Docker 使用方法:

+

编辑或新建/etc/docker/daemon.json文件,向其中添加registry-mirrors项,使最终配置类似:

+
{
+  "registry-mirrors": ["https://docker.mirrors.sjtug.sjtu.edu.cn"]
+}
+

Podman 使用方法:

+

新建/etc/containers/registries.conf.d/050-sjtug-docker-mirror.conf文件(或在/etc/containers/registries.conf文件末尾),写入以下内容:

+
unqualified-search-registries = ["docker.io"]
+
+[[registry]]
+location = "docker.io"
+
+[[registry.mirror]]
+location = "docker.mirrors.sjtug.sjtu.edu.cn"
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/dragonflybsd/index.html b/post/mirror-help/dragonflybsd/index.html new file mode 100644 index 00000000..e0f01639 --- /dev/null +++ b/post/mirror-help/dragonflybsd/index.html @@ -0,0 +1,248 @@ + + + + + + + + + + dragonflybsd/dports · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

dragonflybsd/dports

+

+ January 1, 0001 + +
+ liweitianux + + +
+ + + + mirror-help + + + +

+
+ +
+

项目简介

+

DragonFly BSD 隶属于 BSD 系统家族, +是其中相对小众、但富有特色的一个成员,与 FreeBSD、 +OpenBSDNetBSD +组成四大 BSD 操作系统。

+

自 2003 年从 FreeBSD 4.8 衍生而来, +DragonFly BSD 对虚拟内存、虚拟文件系统、网络协议栈等关键内核子系统做了大幅修改, +尽可能地消除了锁和竞争,实现了出色的 SMP 性能。 +项目创始人 Matthew Dillon 自行开发的 HAMMER2 +文件系统是另一个主要特色,该文件系统拥有可媲美 ZFS 的功能和稳定性,但节省内存等资源。 +DragonFly BSD 的其他特色功能还有 vkernel、swapcache、LUKS、TrueCrypt、等等, +详情可参考:主要特性列表

+

DragonFly BSD 的内核简洁小巧,代码整洁,在线手册 (man pages) 清晰,适合学习和研究。 +驱动程序和用户空间工具主要继承自 FreeBSD,同时与 FreeBSD 使用相同的包管理工具 +pkg(8),可利用 FreeBSD 丰富全面的文档资源, +用户体验良好。 +此外,DragonFly BSD 的社区虽小,但很友好。

+

镜像介绍

+

SJTUG 镜像是 DragonFly BSD 在中国内地的首个镜像站点, +依托于华东教育网骨干节点,提供稳定、快速的镜像服务。

+

我们的镜像服务目前提供了如下内容:

+ +

使用方法

+

创建 pkg(8) 仓库配置文件 /usr/local/etc/pkg/repos/sjtug.conf,添加以下内容:

+
# China, Shanghai
+SJTUG: {
+    url:        https://mirror.sjtu.edu.cn/dragonflybsd/dports/${ABI}/LATEST,
+    priority:   10,
+    enabled:    yes
+}
+

然后执行 pkg update -f 更新索引即可开始使用了。

+

注:仓库的优先级 (priority) 默认为 0,此处通过设置 priority: 10 +提高优先级来优先使用 SJTUG 镜像服务。

+

相关链接

+ + +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/elan/index.html b/post/mirror-help/elan/index.html new file mode 100644 index 00000000..31e3ff35 --- /dev/null +++ b/post/mirror-help/elan/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

+

+ January 1, 0001 + + +
+ +

+
+ +
+

glean: Lean 4 镜像适配工具

+

使用上海交通大学的 https://mirror.sjtu.edu.cn 镜像服务,软件源镜像托管在 elan +和 git/lean4-packages 下。

+

请自行修改命令中的版本号,可用版本参见: +http://mirror.sjtu.edu.cn/elan/?mirror_intel_list

+

安装 Elan

+

Elan 是 Lean 的版本管理工具,在 Lake 调用时根据项目 lean-toolchain 文件下载安装 Lean 并切换到对应的版本。

+
glean -install elan -version 3.0.0
+

安装 Lean

+

以下操作会安装 Lean 与 Lean 工具链,包含语言服务器、构建工具等。

+
glean -install lean --version 4.1.0
+

在构建项目前下载依赖

+

每当下载完一个 Lean 项目后,在启动 VSCode 或命令行运行 lake build 前,可以提前通过镜像下载依赖。

+
glean -lake-manifest-path ~/EG/lake-manifest.json
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/emacs-elpa/index.html b/post/mirror-help/emacs-elpa/index.html new file mode 100644 index 00000000..9d97be3a --- /dev/null +++ b/post/mirror-help/emacs-elpa/index.html @@ -0,0 +1,259 @@ + + + + + + + + + + emacs-elpa · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

emacs-elpa

+

+ August 14, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

emacs-elpa 包含了 GNU ELPA, NonGNU ELPA, MELPA, MELPA Stable, Org 这 5 个镜像。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ELPA镜像地址
GNU ELPAhttps://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/
NonGNU ELPAhttps://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/nongnu/
MELPAhttps://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/
MELPA Stablehttps://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/stable-melpa/
Orghttps://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/
+

使用方法

+

根据你的需求,设置 package-archives ,比如用 GNU ELPA 和 MELPA:

+
(setq package-archives '(("gnu" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/")
+                         ("melpa" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/")))
+
+

Spacemacs 用户

+

master 分支

+

添加下面的代码到 .spacemacsdotspacemacs/user-init()

+
(setq configuration-layer--elpa-archives
+    '(("melpa-cn" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/")
+      ("org-cn"   . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/")
+      ("gnu-cn"   . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/")))
+

develop 分支

+

使用 configuration-layer-elpa-archives 代替原来的 configuration-layer--elpa-archives-- 换成 -

+
(setq configuration-layer-elpa-archives
+    '(("melpa-cn" . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/")
+      ("org-cn"   . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/")
+      ("gnu-cn"   . "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/")))
+

Cask 用户

+

Cask 是一个 Emacs Lisp 的项目管理工具。这里还是以 GNU ELPA 和 MELPA 为例,在添加下面的代码到 Cask

+
(source "gnu"   "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/")
+(source "melpa" "https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/")
+

本镜像上游为 https://elpa.emacs-china.org

+

SJTUG 不提供 rsync 镜像。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/fedora-ostree/index.html b/post/mirror-help/fedora-ostree/index.html new file mode 100644 index 00000000..21d3c8b3 --- /dev/null +++ b/post/mirror-help/fedora-ostree/index.html @@ -0,0 +1,214 @@ + + + + + + + + + + fedora-ostree · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

fedora-ostree

+

+ January 4, 2021 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

fedora-ostree 是 Fedora Silverblue (原 Atomic Workstation) 的智能缓存。 +Fedora Silverblue 通过 rpm-ostree 管理整个系统。 +当您第一次请求镜像中的资源时,如果文件没有被镜像服务器缓存,我们会将您重定向回原站, +并在后台进行缓存。目前镜像服务器上已经预先缓存了所有 fedora-ostree 仓库的分支。

+

使用方法:编辑 /etc/ostree/remotes.d/fedora.conf

+
[remote "fedora"]
+url=https://mirror.sjtu.edu.cn/fedora-ostree
+gpg-verify=true
+gpgkeypath=/etc/pki/rpm-gpg/
+# contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/fedora/index.html b/post/mirror-help/fedora/index.html new file mode 100644 index 00000000..9562d159 --- /dev/null +++ b/post/mirror-help/fedora/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + fedora/linux · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

fedora/linux

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Fedora 项目是一个由红帽公司所赞助,以统筹 Fedora Linux 操作系统开发的社区。 +Fedora 项目在建设开源软件社区的同时构建了一个被称为"Fedora"的 GNU/Linux 发行版。

+

使用方法:运行下面的指令一键替换并备份。

+
sed -e 's/^metalink=/#metalink=/g' -e 's|^#baseurl=http://download.example/pub/|baseurl=https://mirror.sjtu.edu.cn/|g' -i.bak /etc/yum.repos.d/<需要替换的文件>
+

最后运行 dnf makecache 生成缓存

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/flathub/index.html b/post/mirror-help/flathub/index.html new file mode 100644 index 00000000..e16733f3 --- /dev/null +++ b/post/mirror-help/flathub/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + flathub · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

flathub

+

+ January 4, 2021 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

Flathub 镜像是 flathub.org 的智能缓存。当您请求镜像中的资源时, +如果文件没有被镜像服务器缓存,我们会将您重定向回原站,并在后台进行缓存。 +目前镜像服务器上已经预先缓存了所有 Flathub 软件的分支。

+

使用方法:

+
sudo flatpak remote-modify flathub --url=https://mirror.sjtu.edu.cn/flathub
+

如果出现错误可尝试:

+
wget https://mirror.sjtu.edu.cn/flathub/flathub.gpg
+sudo flatpak remote-modify --gpg-import=flathub.gpg flathub
+

目前 sel.flathub.org 已经重定向到 SJTUG 镜像站。如果您原先使用该服务器作为 Flathub 上游, +无需做任何设置即可使用。

+

Flathub 中部分软件由于重分发授权问题,需要从官方服务器下载,无法使用镜像站加速。比如 +NVIDIA 驱动、JetBrains 系列软件等。如果您的使用体验不佳,请及时通过 GitHub 或邮件向我们反馈。

+

如果您中断了某次安装,重新下载可能会出现找不到文件的问题。您可以使用 flatpak repair 解决相关的问题。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/flutter_infra/index.html b/post/mirror-help/flutter_infra/index.html new file mode 100644 index 00000000..2008f110 --- /dev/null +++ b/post/mirror-help/flutter_infra/index.html @@ -0,0 +1,242 @@ + + + + + + + + + + flutter_infra · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

flutter_infra

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

欢迎使用 SJTUG 镜像设置 Flutter 开发环境

+

作为国内最早提供 Flutter 的镜像站,我们在近期对镜像站的更新中提高了 Flutter +镜像的稳定性,并解决了部分问题,欢迎大家使用!

+

Flutter 是 Google 开源的 UI 工具包,帮助开发者通过一套代码库高效构建多平台精美应用, +支持移动、Web、桌面和嵌入式平台。

+

Flutter 由 Google 主导,全球的开发者共同协作开发。中国的开发者数量占全球的 20% +以上,也有大量贡献者为 Flutter 的生态提供了很大的帮助和贡献。

+

为了更好帮助国内的开发者、设计师和研究者等使用 Flutter,我们为 Flutter 的使用 +提供了加速访问的服务。您需要将开发设备的如下两个环境变量设置指向 SJTUG 镜像:

+
    +
  • PUB_HOSTED_URL
  • +
  • FLUTTER_STORAGE_BASE_URL
  • +
+

Linux 和 macOS 系统设定 Flutter 镜像

+

执行如下代码:

+
export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub
+export FLUTTER_STORAGE_BASE_URL=https://mirror.sjtu.edu.cn
+

Windows 系统设定 Flutter 镜像

+

右键单击“我的电脑”,单击“属性” ——> “高级”选项卡 ——> “环境变量”

+

在 “用户变量” 或 “系统变量” 中:

+

单击“新建”添加新变量:

+
    +
  • 变量名: PUB_HOSTED_URL
  • +
  • 值: https://mirror.sjtu.edu.cn/dart-pub
  • +
  • 变量名: FLUTTER_STORAGE_BASE_URL
  • +
  • 值: https://mirror.sjtu.edu.cn
  • +
+

点击确定,保存生效。如果这两个变量名已经存在,点击编辑可修改变量值。

+

设置 Flutter SDK 仓库镜像

+

flutter-sdk 仓库下,执行如下指令即可。

+
git remote set-url origin https://git.sjtu.edu.cn/sjtug/flutter-sdk.git
+

download.flutter.io 镜像

+

访问 https://mirror.sjtu.edu.cn/download.flutter.io/ 即可。

+

更多资源

+

感谢 flutter.cn 对 SJTUG 镜像测试的支持。 +更多 Flutter 资源和中文文档, +请访问 Flutter 中文资源网站 (flutter.cn) +和 Dart 中文文档网站 (dart.cn)。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/gcr-io/index.html b/post/mirror-help/gcr-io/index.html new file mode 100644 index 00000000..250c2a6a --- /dev/null +++ b/post/mirror-help/gcr-io/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + gcr.io · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

gcr.io

+

+ October 23, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

该镜像是 gcr.io 反代。将所有需要用到 gcr.io 的地址换成 gcr-io.mirrors.sjtug.sjtu.edu.cn 即可。比如:

+
docker pull gcr-io.mirrors.sjtug.sjtu.edu.cn/google_containers/echoserver:1.4
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ghcup/index.html b/post/mirror-help/ghcup/index.html new file mode 100644 index 00000000..4ec0d34c --- /dev/null +++ b/post/mirror-help/ghcup/index.html @@ -0,0 +1,232 @@ + + + + + + + + + + ghcup · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ghcup

+

+ March 30, 2021 + +
+ lightquantum + + +
+ + + + mirror-help + + + +

+
+ +
+

Ghcup 是一种用于安装 Haskell 的工具,它使得用户可以轻易地在 GNU/Linux、macOS 和 FreeBSD 上安装特定版本的 ghc,并从零开始搭建好一个全新的 Haskell 开发环境(包括 cabal 与 HLS 支持)。

+

使用说明

+

创建 ~/.ghcup/config.yaml 并输入以下内容

+
url-source:
+    OwnSource: "https://mirror.sjtu.edu.cn/ghcup/yaml/ghcup/data/ghcup-0.0.6.yaml"
+

如果您尚未安装 ghcup,请在完成以上步骤后,于终端中执行以下指令(请不要以 root 用户执行),随后跟随屏幕上的指引完成安装。

+
    +
  • 如果您运行的是 Linux, macOS (Intel), FreeBSD 或 WSL,请执行
  • +
+
curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | sh
+
    +
  • 如果您运行的是 macOS (Apple 芯片) 请执行
  • +
+
curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | arch -x86_64 /bin/bash
+

故障排除

+
    +
  1. ghcup 出现形如 [ Error ] JSON decoding failed with: AesonException 的错误
  2. +
+

这可能是由于本机 ghcup 版本与配置文件版本不匹配造成。 +ghcup 于 0.1.15.1 版本前使用 0.0.4 版本的配置文件,此版本及之后的版本使用 0.0.5+ 版本的配置文件。 +请尝试将 config.yaml 中的 ghcup-0.0.6.yaml 改为 ghcup-0.0.4.yaml (抑或反之)后重试。

+

请注意,ghcup 上游倾向于仅更新最新版本配置文件中的内容,当版本发生变化后请及时更新配置文件版本。

+
    +
  1. 通过 ghcup 安装软件包时出现 Error: Download failed ... 错误
  2. +
+

这一错误可能是由于您的 ghcup 版本过老,使用的配置文件已经长久未更新,其中包含的软件包版本过旧所致。我们将尽力保留旧版本的软件包,但当存储空间不足时,可能随时删除旧文件。本镜像站仅保证同步最新版本配置文件中包含的软件包。

+

当出现上述现象时,请首先尝试更新 ghcup 的版本,并根据 故障排除 1 的指示修改配置文件。若 ghcup 已无法更新,可以尝试删除 ~/.ghcup 整个文件夹(这一操作将删除 ghcup 以及所有通过 ghcup 安装的软件),并根据 使用说明 重新安装最新版本的 ghcup。

+

若完成以上步骤后问题仍未解决,请至 此处 向我们反馈 BUG。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/google-fonts/index.html b/post/mirror-help/google-fonts/index.html new file mode 100644 index 00000000..431c6520 --- /dev/null +++ b/post/mirror-help/google-fonts/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + google-fonts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

google-fonts

+

+ January 1, 0001 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

本镜像提供了 Google Fonts 的反向代理。

+

使用方法

+
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
+

改为

+
<link href="https://google-fonts.mirrors.sjtug.sjtu.edu.cn/css?family=Roboto" rel="stylesheet">
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/guix/index.html b/post/mirror-help/guix/index.html new file mode 100644 index 00000000..09b80255 --- /dev/null +++ b/post/mirror-help/guix/index.html @@ -0,0 +1,239 @@ + + + + + + + + + + guix · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

guix

+

+ January 1, 0001 + +
+ pengmeiyu + + +
+ + + + mirror-help + + + +

+
+ +
+

GNU/Guix是隶属于GNU项目的自由软件发行版。Guix可以作为独立的操作系统发行版安装在计算机上,可以作为软件包管理器安装在别的Linux发行版上。 +它的核心是一个函数式软件包管理器,支持事务性的升级、回滚操作。用户可以通过 +Guile语言编写配置文件管理操作系统的服务或者管理用户安装的软件。

+

Git 镜像

+

Git 镜像的地址为 https://mirror.sjtu.edu.cn/git/guix.git 。修改 ~/.config/guix/channels.scm 文件即可在 guix pull 时使用。

+
(list (channel
+       (inherit (car %default-channels))
+       (url "https://mirror.sjtu.edu.cn/git/guix.git")))
+

Substitute 镜像

+

镜像地址为 https://mirror.sjtu.edu.cn/guix/。 +镜像实现方式为智能缓存,在镜像站用户首次访问某个 nar 或 narinfo 时,它会被永久缓存在镜像上; +之后的访问将直接从镜像服务器返回数据。

+
    +
  • guix命令支持使用 --substitute-urls 参数为单个命令的执行临时覆盖substitute服务器,例如:
  • +
+
guix package -i <package> --substitute-urls="https://mirror.sjtu.edu.cn/guix/"
+
    +
  • 如果您使用 Guix 管理整个操作系统,请修改操作系统配置文件 ,替换 +substitute-urls 参数。例如:
  • +
+
(operating-system
+  (services (modify-services %desktop-services
+              (guix-service-type
+               config => (guix-configuration
+                          (inherit config)
+                          (substitute-urls '("https://mirror.sjtu.edu.cn/guix/"
+                                             "https://ci.guix.gnu.org"))))))
+  ...
+  )
+
    +
  • 如果您在别的发行版上使用 Guix 包管理器,请修改 guix-daemon 的 +--substitute-urls 参数。比如修改 guix-daemon.serviceExecStart 为:
  • +
+
ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --substitute-urls="https://mirror.sjtu.edu.cn/guix/"
+

本文档的编写参考了 https://guix.org.cn/wiki/mirror/

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/homebrew-bottles/index.html b/post/mirror-help/homebrew-bottles/index.html new file mode 100644 index 00000000..919aadb4 --- /dev/null +++ b/post/mirror-help/homebrew-bottles/index.html @@ -0,0 +1,211 @@ + + + + + + + + + + homebrew-bottles · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

homebrew-bottles

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

homebrew-bottles.git镜像了预编译的 Homebrew 软件包

+

SJTUG镜像同时也提供了homebrew-corehomebrew-cask镜像,欢迎大家使用。

+

若首次安装 homebrew, 请参阅 brew.git 的说明。

+

使用方法:

+

执行以下语句或加入到~/.bashrc中:

+
export HOMEBREW_BOTTLE_DOMAIN=https://mirror.sjtu.edu.cn/homebrew-bottles/bottles
+

SJTUG 镜像现已支持 ghcr.io 的 bottles 同步。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/homebrew-cask/index.html b/post/mirror-help/homebrew-cask/index.html new file mode 100644 index 00000000..d8c9836a --- /dev/null +++ b/post/mirror-help/homebrew-cask/index.html @@ -0,0 +1,214 @@ + + + + + + + + + + git/homebrew-cask.git · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

git/homebrew-cask.git

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

homebrew-cask.git镜像了Homebrew Cask的描述文件,主要包括了较大的二进制文件与macOS应用

+

SJTUG镜像同时也提供了homebrew-corebrew-bottles镜像,欢迎大家使用。

+

若首次安装 homebrew, 请参阅 brew.git 的说明。

+

使用方法:

+
brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-cask.git
+

然后执行:

+
brew update
+

另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。

+

执行以下语句或加入到~/.bashrc中:

+
export HOMEBREW_NO_INSTALL_FROM_API=1
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/homebrew-core/index.html b/post/mirror-help/homebrew-core/index.html new file mode 100644 index 00000000..a894d0c9 --- /dev/null +++ b/post/mirror-help/homebrew-core/index.html @@ -0,0 +1,216 @@ + + + + + + + + + + git/homebrew-core.git · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

git/homebrew-core.git

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

homebrew-core.git镜像了Homebrew官方的软件包描述文件

+

SJTUG镜像同时也提供了homebrew-caskbrew-bottles镜像,欢迎大家使用。

+

若首次安装 homebrew, 请参阅 brew.git 的说明。

+

使用方法:

+

执行以下语句或加入到~/.bashrc中:

+
export HOMEBREW_CORE_GIT_REMOTE=https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git
+

然后执行:

+
brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git
+brew update
+

另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。

+

执行以下语句或加入到~/.bashrc中:

+
export HOMEBREW_NO_INSTALL_FROM_API=1
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/immortalwrt/index.html b/post/mirror-help/immortalwrt/index.html new file mode 100644 index 00000000..d3188a46 --- /dev/null +++ b/post/mirror-help/immortalwrt/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + immortalwrt · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

immortalwrt

+

+ January 1, 0001 + +
+ 1715173329 + + +
+ + + + mirror-help + + + +

+
+ +
+

ImmortalWrt 是 OpenWrt 的一个第三方分支,主要针对国人用户开发,提供更多的本地化软件包和设备支持。

+

使用方法: +修改 /etc/opkg/distfeeds.conf 文件,将源地址 downloads.immortalwrt.org / mirrors.vsean.net/openwrt 修改为 +mirror.sjtu.edu.cn/immortalwrt,然后运行 opkg update 刷新软件包列表。

+

您也可以登录 LuCI 后台,进入 系统 -> 软件包 页面,点击 配置 opkg 并按上述说明完成对源地址的更改。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/julia-releases/index.html b/post/mirror-help/julia-releases/index.html new file mode 100644 index 00000000..b6f972bb --- /dev/null +++ b/post/mirror-help/julia-releases/index.html @@ -0,0 +1,232 @@ + + + + + + + + + + julia-releases · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

julia-releases

+

+ August 5, 2020 + +
+ johnnychen94 + + +
+ + + + mirror-help + + + +

+
+ +
+

Julia 二进制安装程序

+

Julia 是一个全新的以科学计算为核心的通用编程语言,本镜像为其二进制发行程序。关于 Julia 下各种工具包的安装,请使用 julia 镜像。

+

这里仅镜像 JuliaLang Downloads 中提供的稳定发行版以及 rc 版本。每日构建的测试版 (nightlies) 以及 +Juno/Julia Pro等 IDE 版本不包括在内。

+

尽管一些包管理工具(例如 apt, pacman, conda, choco) 中提供有 Julia,但是这些工具或多或少都存在一些由二进制 +依赖导致的问题,因此官方推荐的方式是根据自己的使用平台下载相应的二进制程序,然后通过解压的方式进行手动安装。

+

Julia 一键安装

+

对于习惯命令行的用户而言,jill.py 是一个社区维护的全平台下一键安装 +Julia 的命令行工具。

+

安装/更新 jillpip install jill --user -U (需要 Python 3.6 或更新的版本)

+
    +
  • 安装 Julia:jill install [VERSION] [--upstream UPSTREAM] [--confirm] +
      +
    • jill install:最新的 x.y.z 版本
    • +
    • jill install --confirm:无需交互确认直接安装
    • +
    • jill install --upstream SJTUG:从本镜像站下载并安装
    • +
    • jill install 1.5:安装最新的 1.5.z 版本
    • +
    +
  • +
  • 查询现存的上游镜像:jill upstream
  • +
  • 帮助文档:jill [COMMAND] --help +
      +
    • jill --help:查询存在的 jill 命令
    • +
    • jill install --help:查询 install 命令的使用方式
    • +
    +
  • +
+

利用 jill 安装完成后即可通过在命令行执行 julia/julia-1/julia-1.5 来启动不同版本的 Julia.

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/julia/index.html b/post/mirror-help/julia/index.html new file mode 100644 index 00000000..de43f6b6 --- /dev/null +++ b/post/mirror-help/julia/index.html @@ -0,0 +1,273 @@ + + + + + + + + + + julia · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

julia

+

+ August 5, 2020 + +
+ johnnychen94 + + +
+ + + + mirror-help + + + +

+
+ +
+

SJTUG 目前提供了 Julia 的官方包注册表 General 镜像来加速 Julia 包的安装。

+

关于 Julia 的安装,请使用 julia-releases 镜像。

+

注:本镜像的使用需要 Julia v1.4.0 或更新的版本。

+

使用方式

+

只需要设置环境变量 JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia 即可切换镜像。若成功切换镜像,则能通过 versioninfo() 查询到相关信息,例如:

+
julia> versioninfo()
+Julia Version 1.5.0
+Commit 96786e22cc (2020-08-01 23:44 UTC)
+Platform Info:
+  OS: macOS (x86_64-apple-darwin18.7.0)
+  CPU: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
+  WORD_SIZE: 64
+  LIBM: libopenlibm
+  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
+Environment:
+  JULIA_PKG_SERVER = https://mirrors.sjtug.sjtu.edu.cn/julia
+

若不设置该环境变量则默认使用官方服务器 pkg.julialang.org 作为上游。本镜像站是其国内服务器的数据上游之一。

+

临时使用

+

不同系统和命令行下设置环境变量的方式各不相同,在命令行下可以通过以下方式来临时修改环境变量

+
    +
  • Linux Bash: export JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia
  • +
  • Windows Powershell: $env:JULIA_PKG_SERVER = 'https://mirrors.sjtug.sjtu.edu.cn/julia'
  • +
+

也可以利用 JuliaCN 社区维护的中文本地化工具包 JuliaZH 来进行切换:

+
using JuliaZH # 在 using 时会自动切换到国内的镜像站
+JuliaZH.set_mirror("SJTUG") # 也可以选择手动切换到 BFSU 镜像
+JuliaZH.mirrors # 查询记录的上游信息
+

永久使用

+

不同系统和命令行下永久设定环境变量的方式也不相同,例如 Linux Bash 下可以通过修改 ~/.bashrc 文件实现该目的:

+
# ~/.bashrc
+export JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia
+

此外,这里再提供一种针对 Julia 的全平台通用的方式:$JULIA_DEPOT_PATH/config/startup.jl +( 默认为 ~/.julia/config/startup.jl ) 文件定义了每次启动 Julia 时都会执行的命令,编辑该文件,添加以下内容即可:

+
# ~/.julia/config/startup.jl
+ENV["JULIA_PKG_SERVER"] = "https://mirrors.sjtug.sjtu.edu.cn/julia"
+

也可以选择使用 JuliaZH 来一键修改/创建 startup.jl 文件:

+
julia> JuliaZH.generate_startup("SJTUG")
+┌ Info: 添加 PkgServer
+│   服务器地址 = "https://mirrors.sjtug.sjtu.edu.cn/julia"
+└   配置文件 = "/root/.julia/config/startup.jl"
+

若要临时禁止,可以通过 julia --startup-file=no 来取消执行 startup.jl 文件。

+

常见问题

+

加快 Conda.jl 相关操作的速度

+

Conda.jl 的加速分为两部分:

+
    +
  • conda 的安装:如果系统中没有找到 conda 的话,Conda.jl 会下载并安装一份 miniconda。如果这一步下载非常缓慢的话,你可以提前从 BFSU 镜像站下载并安装 anaconda,然后通过设置环境变量 CONDA_JL_HOME=$HOME/anaconda3 来指定 Conda.jl 所使用的conda,这样就避免重复下载 miniconda. ($HOME/anaconda3是 anaconda3 的默认安装位置,你可能需要根据具体情况进行调整。)
  • +
  • conda add 等操作的加速:这个只需要配置 anaconda 镜像源即可,即修改 ~/.condarc 文件。具体的配置可以查看镜像站中 anaconda 镜像的使用说明。
  • +
+

为什么有些包的下载还是很慢?

+

有两类数据不会被镜像:

+
    +
  • deps/build.jl 文件中硬编码的下载地址,例如 GR.
  • +
  • Artifacts.toml 中没有给出 download 项的资源, 例如 TestImages.
  • +
+

在安装包含这两类数据的包时,其数据依然是从原始地址进行下载,因此若网络不稳定则可能会在 build 阶段报错。

+

为什么注册表还是从原地址下载?

+

Julia v1.4.0 之前的版本采用的是 git clone 的方式拉取注册表。为了保持兼容性,如果现有的注册表是一个完整的 git 仓库的话, +那么即使设置了 PkgServer 作为上游镜像也依然会通过 git 来进行更新,换句话说,不会通过镜像站来下载注册表数据。

+

以默认注册表 General 为例,只需要手动将其重置到镜像站即可:

+
    +
  1. 删除当前注册表:(@v1.4) pkg> registry rm General
  2. +
  3. 从镜像站重新下载数据:(@v1.4) pkg> registry add General
  4. +
+

为什么有些包还是从原地址下载?

+

镜像站只镜像注册表中记录的包,因此如果某些包是通过指定 URL 的方式来安装的话,那么该包的更新不会从镜像站进行下载。 +这常见于那些还未注册的包及其版本,例如:

+
]add Flux#master
+]add https://github.com/FluxML/Flux.jl.git
+Pkg.add(PackageSpec(url="https://github.com/FluxML/Flux.jl.git"))
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/kali/index.html b/post/mirror-help/kali/index.html new file mode 100644 index 00000000..5a1f7bc3 --- /dev/null +++ b/post/mirror-help/kali/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + kali · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

kali

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Kali Linux 是基于Debian的Linux发行版,设计用于数字鉴识和渗透测试。由 Offensive Security Ltd 维护和资助。

+

使用方法:

+

编辑/etc/apt/sources.list,在头部添加:

+
deb https://mirrors.sjtug.sjtu.edu.cn/kali kali-rolling main non-free contrib
+deb-src https://mirrors.sjtug.sjtu.edu.cn/kali kali-rolling main non-free contrib
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/leopardsh/index.html b/post/mirror-help/leopardsh/index.html new file mode 100644 index 00000000..908aeadc --- /dev/null +++ b/post/mirror-help/leopardsh/index.html @@ -0,0 +1,226 @@ + + + + + + + + + + leopardsh · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

leopardsh

+

+ January 1, 0001 + +
+ zombie203619 + + +
+ + + + mirror-help + + + +

+
+ +
+

leopard.sh / tiger.sh 是一个 PPC Mac OS X 10.4-10.5 上的包管理器,提供了许多常用软件包,节省了 PowerPC Mac 漫长的编译时间

+

使用说明

+

Mac OS X Tiger:

+

下载 tiger.sh,并运行安装

+
curl -O http://leopard.sh/tigersh/tiger.sh
+chmod +x ./tiger.sh
+./tiger.sh
+

安装完成后,脚本会自己移动到/usr/local/bin/tiger.sh,对其进行编辑:

+
TIGERSH_MIRROR=${TIGERSH_MIRROR:-https://mirror.sjtu.edu.cn/leopardsh}
+

并在文件开头添加:

+
export TIGERSH_MIRROR_NO_HTTP=1
+export TIGERSH_MIRROR_NO_HEAD=1
+

Mac OS X Leopard:

+

下载 leopard.sh,并运行安装

+
curl -O http://leopard.sh/leopardsh/leopard.sh
+chmod +x ./leopard.sh
+./leopard.sh
+

安装完成后,脚本会自己移动到/usr/local/bin/leopard.sh,对其进行编辑:

+
LEOPARDSH_MIRROR=${LEOPARDSH_MIRROR:-https://mirror.sjtu.edu.cn/leopardsh}
+

并在文件开头添加:

+
export LEOPARDSH_MIRROR_NO_HTTP=1
+export LEOPARDSH_MIRROR_NO_HEAD=1
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/linuxliteos/index.html b/post/mirror-help/linuxliteos/index.html new file mode 100644 index 00000000..7cff1c69 --- /dev/null +++ b/post/mirror-help/linuxliteos/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + linuxliteos · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

linuxliteos

+

+ January 1, 0001 + +
+ hmsjy2017 + + +
+ + + + mirror-help + + + +

+
+ +
+

Linux Lite 是一个基于 Ubuntu 长期支持版本(LTS)的 Linux 发行版,搭载 Xfce 桌面环境。Linux Lite 的目的是将 Windows 用户引入 Linux,对新手比较友好。其旨在提供一套完整的应用程序来帮助用户满足用户日常的计算需求,这包括完整的办公套件、媒体播放器和其他基本的日常软件。

+

使用方式: 在终端输入sudo nano /etc/apt/sources.list,删除原有内容,用以下内容代替。

+
deb https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/ emerald main
+

然后

+

sudo apt update

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/maven-central/index.html b/post/mirror-help/maven-central/index.html new file mode 100644 index 00000000..3d9b84cd --- /dev/null +++ b/post/mirror-help/maven-central/index.html @@ -0,0 +1,216 @@ + + + + + + + + + + maven-central · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

maven-central

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Apache Maven仓库存放了可用于Maven的大量软件包(特别是Java软件)。目前本镜像为 http://repo.maven.apache.org/maven2/ 的反向代理,能够加速安装。

+

使用方法:

+

修改Maven根目录下的conf/setting.xml,增加一节<mirror />,具体如下:

+
<mirrors>
+    <!-- Other mirrors... -->
+    <mirror>
+        <id>sjtugmaven</id>
+        <name>sjtug maven</name>
+        <url>https://mirrors.sjtug.sjtu.edu.cn/maven-central/</url>
+        <mirrorOf>central</mirrorOf>
+    </mirror>
+</mirrors>
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/mongodb/index.html b/post/mirror-help/mongodb/index.html new file mode 100644 index 00000000..66f02a36 --- /dev/null +++ b/post/mirror-help/mongodb/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + mongodb · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

mongodb

+

+ August 1, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

mongodb 源是 repo.mongodb.org 的全量同步。

+

使用说明

+

请参照官方教程配置并安装 https://docs.mongodb.com/manual/administration/install-on-linux/。 +在安装过程中,把 https://repo.mongodb.org/ 替换为 https://mirrors.sjtug.sjtu.edu.cn/mongodb/。比如在 Ubuntu focal 中使用时,可以执行以下指令。

+
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
+echo "deb [ arch=amd64,arm64 ] https://mirrors.sjtug.sjtu.edu.cn/mongodb/apt/ubuntu/ focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/msys2/index.html b/post/mirror-help/msys2/index.html new file mode 100644 index 00000000..efc9ef0a --- /dev/null +++ b/post/mirror-help/msys2/index.html @@ -0,0 +1,220 @@ + + + + + + + + + + msys2 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

msys2

+

+ January 1, 0001 + +
+ ricky136973 + + +
+ + + + mirror-help + + + +

+
+ +
+

收录架构

+
    +
  • MINGW: i686, x86_64
  • +
  • MSYS: i686, x86_64
  • +
+

获取基本组件包

+

请访问该镜像目录下的distrib/目录(x86_64i686),找到名为msys2-<架构>-<日期>.exe的文件(如msys2-x86_64-20141113.exe),下载安装即可。

+

pacman的配置

+

编辑/etc/pacman.d/mirrorlist.mingw32,在文件开头添加:

+
Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686
+

编辑/etc/pacman.d/mirrorlist.mingw64,在文件开头添加:

+
Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/x86_64
+

编辑/etc/pacman.d/mirrorlist.msys,在文件开头添加:

+
Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/msys/$arch
+

然后执行pacman -Sy刷新软件包数据即可。

+

注:本Help参考自UTSC镜像清华镜像

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/mx-isos/index.html b/post/mirror-help/mx-isos/index.html new file mode 100644 index 00000000..476d2eaa --- /dev/null +++ b/post/mirror-help/mx-isos/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + mx-isos · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

mx-isos

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

MX Linux 是一个基于Debian 稳定分支的面向桌面的Linux发行,它是antiX 及早先的MEPIS 社区合作的产物。它采用Xfce 作为缺省桌面,是一个轻量级操作系统。

+

本Repo镜像了MX Linux和AntiX的安装镜像。具体信息可以参见 https://mxlinux.org/wiki/system/iso-download-mirrors

+

本站另有mx-packages镜像,包括了MX Linux与AntiX的软件包,欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/mx-packages/index.html b/post/mirror-help/mx-packages/index.html new file mode 100644 index 00000000..9021f31b --- /dev/null +++ b/post/mirror-help/mx-packages/index.html @@ -0,0 +1,221 @@ + + + + + + + + + + mx-packages · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

mx-packages

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

MX Linux 是一个基于Debian 稳定分支的面向桌面的Linux发行,它是antiX 及早先的MEPIS 社区合作的产物。它采用Xfce 作为缺省桌面,是一个轻量级操作系统。

+

本Repo镜像了MX Linux和AntiX的软件包。

+

使用方法:

+
    +
  • +

    (推荐)打开MX Repo Manager,选择SJTUG mirror

    +
  • +
  • +

    (手动): +打开 /etc/apt/sources.list,将

    +
  • +
+
deb http://mxrepo.com/mx/repo/ stretch non-free main
+deb http://mxrepo.com/mx/testrepo/ mx7 test
+

替换成

+
deb http://mirrors.sjtug.sjtu.edu.cn/mx-packages/mx/repo stretch main non-free
+deb http://mirrors.sjtug.sjtu.edu.cn/mx-packages/mx/testrepo test
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/nix-channels/index.html b/post/mirror-help/nix-channels/index.html new file mode 100644 index 00000000..2467c568 --- /dev/null +++ b/post/mirror-help/nix-channels/index.html @@ -0,0 +1,222 @@ + + + + + + + + + + nix-channels/store · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

nix-channels/store

+

+ January 1, 0001 + +
+ c4droid + + +
+ + + + mirror-help + + + +

+
+ +
+

Nix 是一个支持 Linux 和 macOS 的函数式包管理器,具有原子更新、依赖隔离、构建尽可能可复现等特点。

+

Nixpkgs 是 Nix 包管理器对应的软件发行版,使用 Nix 函数式语言编写,除软件包外提供用于软件定制、构建、开发环境配置的工具。

+

使用方法:

+

单独安装的 Nix:编辑配置文件(系统配置位于 /etc/nix/nix.conf,用户配置位于 ~/.config/nix/nix.conf):

+
substituters = https://mirror.sjtu.edu.cn/nix-channels/store https://cache.nixos.org
+

单独安装的 Nix 在更改完配置文件之后需要重启 nix-daemon 才能应用配置。

+

NixOS 与 nix-darwin:编辑配置文件(一般来说,NixOS 配置位于 /etc/nixos/configuration.nix,nix-darwin 配置位于 $HOME/.nixpkgs/darwin-configuration.nix,如果你手动指定了 NIX_PATH 或是使用 Flakes 管理系统,请根据具体情况编辑对应的文件):

+

对于 NixOS 21.11(及之前的版本)与 nix-darwin:

+
{ config, lib, pkgs, ... }:
+{
+  nix.binaryCaches = [ "https://mirror.sjtu.edu.cn/nix-channels/store" ];
+}
+

对于 NixOS 22.05(及之后的版本):

+
{ config, lib, pkgs, ... }:
+{
+  nix.settings.substituters = [ "https://mirror.sjtu.edu.cn/nix-channels/store" ];
+}
+

NixOS 与 nix-darwin 在更改完配置之后需要 switch 到新配置后生效。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/nodejs-release/index.html b/post/mirror-help/nodejs-release/index.html new file mode 100644 index 00000000..bac64f1b --- /dev/null +++ b/post/mirror-help/nodejs-release/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + nodejs-release · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

nodejs-release

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

本链接反代了 https://nodejs.org/dist/ 。可以在此手动下载Nodejs的安装包,也可以配合Nodejs环境使用:

+
    +
  • nexport NODE_MIRROR=https://mirrors.sjtug.sjtu.edu.cn/nodejs-release/
  • +
  • nvmexport NVM_NODEJS_ORG_MIRROR=https://mirrors.sjtug.sjtu.edu.cn/nodejs-release
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/npm-registry/index.html b/post/mirror-help/npm-registry/index.html new file mode 100644 index 00000000..582aa8ab --- /dev/null +++ b/post/mirror-help/npm-registry/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + npm-registry · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

npm-registry

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

npm-registry 源是 NodeJS 的官方包管理 npm 的仓库的反向代理,可以加速npm install等需要下载的命令。

+

使用方法:

+
    +
  • 短期使用: 在npm命令后加上--registry=https://mirrors.sjtug.sjtu.edu.cn/npm-registry的参数,即可使用SJTUG源。
  • +
  • 长期使用: +
      +
    • Xnix: 打开$HOME/.npmrc,添加以下内容:
    • +
    +
    registry=https://mirrors.sjtug.sjtu.edu.cn/npm-registry
    +

    即可大幅提升下载速度。

    +
      +
    • Windows: 编辑%USERPROFILE%\.npmrc,同样加入以上内容即可使用SJTUG镜像源。
    • +
    +
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ohmyzsh/index.html b/post/mirror-help/ohmyzsh/index.html new file mode 100644 index 00000000..05870b65 --- /dev/null +++ b/post/mirror-help/ohmyzsh/index.html @@ -0,0 +1,231 @@ + + + + + + + + + + git/ohmyzsh.git · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

git/ohmyzsh.git

+

+ January 1, 0001 + +
+ AlexaraWu + + +
+ + + + mirror-help + + + +

+
+ +
+

Oh My Zsh 是一个由社区驱动的开源框架,用于管理 zsh 的配置。

+

首次安装 Oh My Zsh

+

首先,需要确保系统中安装了 zsh 和 git,然后在终端运行以下命令其中之一:

+ + + + + + + + + + + + + + + + + + + + + +
方法命令
curlREPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c "$(curl -fsSL https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)"
wgetREPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c "$(wget -O- https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)"
fetchREPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c "$(fetch -o - https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)"
+

替换现有仓库上游

+
git -C $ZSH remote set-url origin https://git.sjtu.edu.cn/sjtug/ohmyzsh.git
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/opam-git/index.html b/post/mirror-help/opam-git/index.html new file mode 100644 index 00000000..f1b28d25 --- /dev/null +++ b/post/mirror-help/opam-git/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + git/opam-repository.git · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

git/opam-repository.git

+

+ October 13, 2020 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

opam 是 OCaml 的包管理器。SJTUG 提供 opam 的反代服务。

+

首次使用 opam,可以使用 SJTUG 镜像源初始化 opam。

+
opam init default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git
+

使用下面的指令,可以将默认源替换为 SJTUG 镜像。

+
opam repo set-url default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git --all --set-default
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/openeuler/index.html b/post/mirror-help/openeuler/index.html new file mode 100644 index 00000000..c355b9b8 --- /dev/null +++ b/post/mirror-help/openeuler/index.html @@ -0,0 +1,242 @@ + + + + + + + + + + openEuler · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

openEuler

+

+ January 1, 0001 + +
+ zhang-jian-jun + + +
+ + + + mirror-help + + + +

+
+ +
+

openEuler 是一个开源、免费的 Linux 发行版,将通过开放的社区形式与全球的开发者共同构建一个开放、 +多元和架构包容的软件生态体系。

+

同时,openEuler 也是一个创新的平台,鼓励任何人在该平台上提出新想法、开拓新思路、实践新方案。

+

配置方法

+

openEuler 源包含多个版本,假定您需要使用 openEuler-20.09 版本,在 yum 源目录(/etc/yum.repos.d/)下新增 openEuler.repo 文件, +注意文件中的 openEuler-20.09 路径:

+
[OS]
+name=OS
+baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/OS/$basearch/
+enabled=1
+gpgcheck=1
+gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/OS/$basearch/RPM-GPG-KEY-openEuler
+[everything]
+name=everything
+baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/everything/$basearch/
+enabled=1
+gpgcheck=1
+gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/everything/$basearch/RPM-GPG-KEY-openEuler
+[EPOL]
+name=EPOL
+baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/EPOL/$basearch/
+enabled=1
+gpgcheck=1
+gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/EPOL/$basearch/RPM-GPG-KEY-openEuler
+[debuginfo]
+name=debuginfo
+baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/debuginfo/$basearch/
+enabled=1
+gpgcheck=1
+gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/debuginfo/$basearch/RPM-GPG-KEY-openEuler
+[source]
+name=source
+baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/source/
+enabled=1
+gpgcheck=1 
+gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/source/RPM-GPG-KEY-openEuler
+

正常执行 yum updateyum install 即可。如果您在使用的过程中遇到任何问题,可以直接联系 openEuler +社区 admin@openeuler.io,也可以通过 GitHub 向 SJTUG 反馈 bug。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/packagist/index.html b/post/mirror-help/packagist/index.html new file mode 100644 index 00000000..73eb5e79 --- /dev/null +++ b/post/mirror-help/packagist/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + packagist · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

packagist

+

+ January 1, 0001 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

Packagist 是 PHP 包管理软件 Composer 的源。本镜像仅包含所有包的 metadata,并非全量同步镜像。

+

使用方法

+

全局设置

+
composer config -g repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn
+

或者仅对一个项目设置

+
composer config repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/parrot/index.html b/post/mirror-help/parrot/index.html new file mode 100644 index 00000000..9fa742b5 --- /dev/null +++ b/post/mirror-help/parrot/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + parrot · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

parrot

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Parrot Security OS是一个基于Debian的Linux发行版,专注于计算机安全。它专为渗透测试,漏洞评估和缓解,计算机取证和匿名Web浏览而设计。

+

使用方法

+

修改etc/apt/sources.list.d/parrot.list的以下内容:

+
#stable repository
+deb https://mirrors.sjtug.sjtu.edu.cn/parrot/ parrot main contrib non-free
+#deb-src https://mirrors.sjtug.sjtu.edu.cn/parrot/ parrot main contrib non-free
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/pop-os/index.html b/post/mirror-help/pop-os/index.html new file mode 100644 index 00000000..62f6a4f7 --- /dev/null +++ b/post/mirror-help/pop-os/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + pop-os · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

pop-os

+

+ June 8, 2023 + +
+ xiaozhu + + +
+ + + + mirror-help + + + +

+
+ +
+

PopOS 是 system76 公司基于 ubuntu 开发的衍生版,具有称为 COSMIC 的定制 GNOME桌面环境,内置大量的库和开发工具。

+

使用方法:

+
sed -i 's@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/pop-os/@g' /etc/apt/sources.list.d/pop-os-apps.sources
+sed -i 's@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/pop-os/@g' /etc/apt/sources.list.d/pop-os-release.sources
+sed -i 's@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/@g' /etc/apt/sources.list.d/system.sources
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/putty/index.html b/post/mirror-help/putty/index.html new file mode 100644 index 00000000..f9688840 --- /dev/null +++ b/post/mirror-help/putty/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + putty · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

putty

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

PuTTY是一个支持Telnet、SSH、rlogin、纯TCP以及串行端口连接软件。

+

使用方法:直接打开点击Download

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/pypi-packages/index.html b/post/mirror-help/pypi-packages/index.html new file mode 100644 index 00000000..89e0d580 --- /dev/null +++ b/post/mirror-help/pypi-packages/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + pypi-packages · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

pypi-packages

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

2019年10月10日起,由于 PyPI 占用过多空间,我们将 PyPI 改为了反代。PyPI 源的服务质量可能有所下降。

+

2020年12月7日起,我们通过智能缓存全量同步了 PyPI。欢迎继续使用。

+

PyPI 是 Python 官方的包仓库,可以通过 pip, easy_install 等方式从 PyPI 安装 numpy, tensorflow 等常用包。

+

执行指令

+
pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple
+

或者创建或编辑 ~/.config/pip/pip.conf 文件,加入或修改 index-url 相关段落为:

+
[global]
+index-url = https://mirror.sjtu.edu.cn/pypi/web/simple
+format = columns
+

临时使用:

+
pip install -i https://mirror.sjtu.edu.cn/pypi/web/simple numpy
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/pypi/index.html b/post/mirror-help/pypi/index.html new file mode 100644 index 00000000..7b6f3d71 --- /dev/null +++ b/post/mirror-help/pypi/index.html @@ -0,0 +1,215 @@ + + + + + + + + + + pypi/web/simple · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

pypi/web/simple

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

2019年10月10日起,由于 PyPI 占用过多空间,我们将 PyPI 改为了反代。PyPI 源的服务质量可能有所下降。

+

2020年12月7日起,我们通过智能缓存全量同步了 PyPI。欢迎继续使用。

+

PyPI 是 Python 官方的包仓库,可以通过 pip, easy_install 等方式从 PyPI 安装 numpy, tensorflow 等常用包。

+

执行指令

+
pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple
+

或者创建或编辑 ~/.config/pip/pip.conf 文件,加入或修改 index-url 相关段落为:

+
[global]
+index-url = https://mirror.sjtu.edu.cn/pypi/web/simple
+format = columns
+

临时使用:

+
pip install -i https://mirror.sjtu.edu.cn/pypi/web/simple numpy
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/pytorch-wheels/index.html b/post/mirror-help/pytorch-wheels/index.html new file mode 100644 index 00000000..83bf3aef --- /dev/null +++ b/post/mirror-help/pytorch-wheels/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + pytorch-wheels · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

pytorch-wheels

+

+ January 1, 0001 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

pytorch-wheels 是 PyTorch pip 源的镜像。直接将 PyTorch 安装指引 +中的 https://download.pytorch.org/whl 替换为 https://mirror.sjtu.edu.cn/pytorch-wheels 即可。

+
pip install torch===1.7.1 torchvision===0.8.2 torchaudio===0.7.2 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/qt/index.html b/post/mirror-help/qt/index.html new file mode 100644 index 00000000..49050639 --- /dev/null +++ b/post/mirror-help/qt/index.html @@ -0,0 +1,213 @@ + + + + + + + + + + qt · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

qt

+

+ February 22, 2021 + +
+ skyzh + + +
+ + + + mirror-help + + + +

+
+ +
+

通常来说,Qt 在线安装器会自动选择最近的镜像,因此无需做特殊设置即可使用 SJTUG Qt 镜像。

+

你可以通过下面的方法手动指定 Qt 镜像。

+
    +
  • 使用离线安装器安装:在 Offline Installers 页面中找到需要下载的版本,并将链接中的 +http://download.qt.io 替换为 https://mirrors.sjtug.sjtu.edu.cn/qt
  • +
  • 使用在线安装器安装:参考 Qt Wiki, +在命令行中给安装器提供 --mirror https://mirrors.sjtug.sjtu.edu.cn/qt 的参数。比如在 macOS 上:
  • +
+
./qt-unified-macOS-x86_64-4.0.1-1-online.app/Contents/MacOS/qt-unified-macOS-x86_64-4.0.1-1-online --mirror https://mirrors.sjtug.sjtu.edu.cn/qt
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/raspberry-pi-os-images/index.html b/post/mirror-help/raspberry-pi-os-images/index.html new file mode 100644 index 00000000..0976da75 --- /dev/null +++ b/post/mirror-help/raspberry-pi-os-images/index.html @@ -0,0 +1,311 @@ + + + + + + + + + + raspberry-pi-os-images · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

raspberry-pi-os-images

+

+ January 1, 0001 + +
+ danyang685 + + +
+ + + + mirror-help + + + +

+
+ +
+

主仓库地址: http://downloads.raspberrypi.org/

+

使用方法

+

根据需要的版本进入以下包含 Raspberry Pi OS 系统镜像的目录,选择.zip文件下载即可。推荐使用 balenaEtcher 将镜像写入 SD 卡

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Raspberry Pi OS 版本存储目录
精简版 Raspberry Pi OS 系统raspios_lite_armhf
常规版 Raspberry Pi OS 系统raspios_armhf
完整版 Raspberry Pi OS 系统raspios_full_armhf
精简版 Raspberry Pi OS 64位系统raspios_lite_arm64
常规版 Raspberry Pi OS 64位系统raspios_arm64
+

备注

+
    +
  • 暂无 Raspberry Pi OS 64位完整版系统
  • +
  • Raspberry Pi OS 是 Raspbian 的后继者,二者名称不同,但功能和界面相同。首个 Raspberry Pi OS 系统发行于 2020年5月27日
  • +
  • 2012年7月15日-2020年2月14日期间发行的旧版 Raspbian 系统镜像与 Raspberry Pi OS 位于不同目录,各版本分别位于:raspbian_literaspbianraspbian_full
  • +
+

Raspberry Pi OS 常用设置

+
    +
  • +

    无头初始化设置

    +
      +
    • +

      启用 SSH:在 SD 卡 boot 分区中创建名为 ssh (不应包括任何扩展名或其他字符)的空白文件

      +
    • +
    • +

      预设 WiFi 信息:在 SD 卡 boot 分区中创建名为 wpa_supplicant.conf 的文本文件,按如下格式填写 YOUR_WiFi_NAMEYOUR_WiFi_PASSWORD ,推荐设置为本机 WiFi 热点或拥有管理员权限的无线路由器 WiFi ,以便查找树莓派的 IP 地址

      +
      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      +update_config=1
      +country=CN
      +
      +network={
      +	ssid="YOUR_WiFi_NAME"
      +	psk="YOUR_WiFi_PASSWORD"
      +}
      +
    • +
    • +

      远程连接:插卡启动树莓派,在 WiFi 热点中查询 IP 分配情况,确认树莓派的 IP 地址,使用 SSH 进行远程连接。树莓派的默认 SSH 端口为 22,用户名为 pi ,默认密码为 raspberry

      +
    • +
    +
  • +
  • +

    命令行下的设置

    +
      +
    • 在终端输入 sudo raspi-config 命令进行基本设置。可将时区设置为 Asia/Shanghai ,将默认区域更改为 en_US.UTF-8 (英文)或 zh_CN.UTF-8 (中文);连接USB键盘时,可将键盘布局修改为美式键盘(Generic 104-key PC -> Other -> English (US) -> English (US));同时还可启用 VNC 以进行远程桌面连接。
    • +
    +
  • +
  • +

    图形界面下的设置

    +
      +
    • 首次进入桌面时,根据提示进行鼠标操作设置即可
    • +
    +
  • +
  • +

    apt 软件源修改

    +
      +
    • +

      Raspberry Pi OS 系统镜像内预置的 apt 软件源在国内访问缓慢,可将 apt 软件源更改为 SJTUG 镜像源

      +
        +
      • /etc/apt/sources.list 文件中的 raspbian 存储库由 http://raspbian.raspberrypi.org/raspbian/ 更改为 https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/ ,对于64位 Raspberry Pi OS ,将 http://deb.debian.org/debian/ 更改为 https://mirrors.sjtug.sjtu.edu.cn/debian/ ,将 http://deb.debian.org/debian-security/ 更改为 https://mirrors.sjtug.sjtu.edu.cn/debian-security/
      • +
      • /etc/apt/sources.list.d/raspi.list 文件中的 raspberrypi 存储库由 http://archive.raspberrypi.org/debian/ 更改为 https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/
      • +
      +
    • +
    • +

      可输入以下命令完成 apt 软件源设置(截至 2021-05-28 版仍然适用)

      +
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
      +sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak
      +sudo sed -i "s|http://raspbian.raspberrypi.org/raspbian/|https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/|g" /etc/apt/sources.list
      +sudo sed -i "s|http://deb.debian.org/debian|https://mirrors.sjtug.sjtu.edu.cn/debian|g" /etc/apt/sources.list
      +sudo sed -i "s|http://archive.raspberrypi.org/debian/|https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/|g" /etc/apt/sources.list.d/raspi.list
      +sudo apt update
      +
    • +
    +
  • +
  • +

    添加 Raspbian 非官方软件源 Raspbian Addons(可选)

    +
    wget -qO- https://mirror.sjtu.edu.cn/raspbian-addons/KEY.gpg | sudo apt-key add -
    +echo "deb https://mirror.sjtu.edu.cn/raspbian-addons/debian precise main" | sudo tee /etc/apt/sources.list.d/raspbian-addons.list
    +sudo apt update
    +
  • +
  • +

    软件包更新

    +
    sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
    +
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/raspberrypi/index.html b/post/mirror-help/raspberrypi/index.html new file mode 100644 index 00000000..e6ff2e48 --- /dev/null +++ b/post/mirror-help/raspberrypi/index.html @@ -0,0 +1,207 @@ + + + + + + + + + + raspberrypi · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

raspberrypi

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

raspberrypi是树莓派基金会提供的软件源,包括 ui 相关程序及部分由树莓派基金会为树莓派编写的软件。

+

使用方法

+

/etc/apt/sources.list.d/raspi.list中的http://archive.raspberrypi.org/debian/更换成https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/raspbian-addons/index.html b/post/mirror-help/raspbian-addons/index.html new file mode 100644 index 00000000..04c1270b --- /dev/null +++ b/post/mirror-help/raspbian-addons/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + raspbian-addons · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

raspbian-addons

+

+ January 1, 0001 + +
+ hmsjy2017 + + +
+ + + + mirror-help + + + +

+
+ +
+

Raspbian Addons 是 Raspbian 非官方软件源,含有许多来自 GitHub 的开源软件,可作为对 Raspbian(Debian) 官方仓库的一个补充。

+
    +
  • 项目主页:https://raspbian-addons.org
  • +
  • 官方文档:https://docs.raspbian-addons.org
  • +
  • GitHub 主页:https://github.com/raspbian-addons
  • +
+

支持架构:armhf、arm64

+

使用方法

+

信任仓库的 GPG 公钥

+
wget -qO- https://mirror.sjtu.edu.cn/raspbian-addons/KEY.gpg | sudo apt-key add -
+

添加该仓库

+
echo "deb https://mirror.sjtu.edu.cn/raspbian-addons/debian precise main" | sudo tee /etc/apt/sources.list.d/raspbian-addons.list
+

更新软件包缓存

+
sudo apt update
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/raspbian/index.html b/post/mirror-help/raspbian/index.html new file mode 100644 index 00000000..085df8ac --- /dev/null +++ b/post/mirror-help/raspbian/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + raspbian · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

raspbian

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Raspberry Pi OS 是为树莓派设计,基于 Debian 的操作系统。本镜像提供了 Raspberry Pi OS 的官方软件源。

+

使用方法

+

更换软件源:

+

编辑/etc/apt/sources.list,将所有的debdeb-src之后的网址替换成https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/rocky/index.html b/post/mirror-help/rocky/index.html new file mode 100644 index 00000000..7fa1757f --- /dev/null +++ b/post/mirror-help/rocky/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + rocky · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

rocky

+

+ January 1, 0001 + +
+ berlin2123 + + +
+ + + + mirror-help + + + +

+
+ +
+

使用方法:运行下面的指令一键替换并备份。

+
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
+    -e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.sjtug.sjtu.edu.cn/rocky|g' \
+    -i.bak \
+    /etc/yum.repos.d/Rocky-*.repo
+

最后运行 dnf makecache 生成缓存

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ros/index.html b/post/mirror-help/ros/index.html new file mode 100644 index 00000000..152880d7 --- /dev/null +++ b/post/mirror-help/ros/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + ros · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ros

+

+ January 1, 0001 + +
+ wdwang + + +
+ + + + mirror-help + + + +

+
+ +
+

使用方式:

+

可使用gedit等文本编辑器修改/etc/apt/sources.list.d/ros-latest.list。修改后使用sudo apt update更新软件源。

+

Ubuntu 18.04 (ROS Melodic)

+
deb https://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu bionic main
+

Ubuntu 20.04 (ROS Noetic)

+
deb https://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu focal main
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/rust-static/index.html b/post/mirror-help/rust-static/index.html new file mode 100644 index 00000000..586efc92 --- /dev/null +++ b/post/mirror-help/rust-static/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + rust-static · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

rust-static

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

rust-static储存了rust的工具链及rustup本身的镜像。

+

使用方法:安装rustup,将以下环境变量加入~/.bashrc或类似文件中:

+
export RUSTUP_DIST_SERVER=https://mirror.sjtu.edu.cn/rust-static
+export RUSTUP_UPDATE_ROOT=https://mirror.sjtu.edu.cn/rust-static/rustup
+
+
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ubuntu-cd/index.html b/post/mirror-help/ubuntu-cd/index.html new file mode 100644 index 00000000..2272941e --- /dev/null +++ b/post/mirror-help/ubuntu-cd/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + ubuntu-cd · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ubuntu-cd

+

+ January 1, 0001 + +
+ LengmoAngel + + +
+ + + + mirror-help + + + +

+
+ +
+

Ubuntu 是一个基于 Debian 的 Linux 发行版。 Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。 Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。

+

本镜像主要收录还在生命周期内 x86 和 arm 架构的镜像,包括开发版,不包括超过 End of Standard Support 后进入 ESM 的镜像。

+

您可以通过 https://wiki.ubuntu.com/Releases 查看现在还在生命周期内的镜像。

+

更多衍生发行版和其他架构非桌面版本请至 https://mirror.sjtu.edu.cn/ubuntu-cdimage/ 查看,或者在 https://mirror.sjtu.edu.cn/docs/ubuntu-cdimage 获取该镜像使用帮助。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ubuntu-cdimage/index.html b/post/mirror-help/ubuntu-cdimage/index.html new file mode 100644 index 00000000..c6a379d1 --- /dev/null +++ b/post/mirror-help/ubuntu-cdimage/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + ubuntu-cdimage · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ubuntu-cdimage

+

+ January 1, 0001 + +
+ LengmoAngel + + +
+ + + + mirror-help + + + +

+
+ +
+

Ubuntu 是一个基于 Debian 的 Linux 发行版。 Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。 Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。

+

本镜像提供现在维护版本的每日构建版本、 Ubuntu 原版的 server 版本和 Ubuntu 衍生版本,提供这些版本的多个架构支持。

+

Ubuntu 衍生版现在包括 Kubuntu(KDE) 、 Xubuntu(Xfce) 、 Ubuntu Budgie 、 Ubuntu Studio 、 Lubuntu(LXDE) 、 Ubuntu Kylin (优麒麟)、Ubuntu MATE 、Ubuntu Budgie(Budgie),可以进入相关目录下载衍生版的镜像。

+

你可以查看 https://wiki.ubuntu.com/UbuntuFlavors 现在所支持的 Ubuntu 衍生版本和已经不受到支持的 Ubuntu 衍生版本。

+

如果你正在寻找原版的桌面版本,你可以在 https://mirror.sjtu.edu.cn/ubuntu-cd/ 获取, +也可以在这查看使用帮助 https://mirror.sjtu.edu.cn/docs/ubuntu-cd

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ubuntu-cloud-images/index.html b/post/mirror-help/ubuntu-cloud-images/index.html new file mode 100644 index 00000000..9d591171 --- /dev/null +++ b/post/mirror-help/ubuntu-cloud-images/index.html @@ -0,0 +1,208 @@ + + + + + + + + + + ubuntu-cloud-images · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ubuntu-cloud-images

+

+ January 1, 0001 + +
+ LengmoAngel + + +
+ + + + mirror-help + + + +

+
+ +
+

本镜像为 OpenStack, LXD 等公有云使用的 Ubuntu 镜像,收录官方的云 Ubuntu 镜像,由 Canonical 定制,提供 Ubuntu 认证镜像,可在 OpenStack, LXD 等公有云上运行。

+

本镜像包含 KVM, Hyper-V, Xen 等虚拟结构的官方定制镜像。

+

使用方法

+

可以使用 https://mirror.sjtu.edu.cn/ubuntu-cloud-images/locator/ 查找公有云使用的镜像。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ubuntu-ports/index.html b/post/mirror-help/ubuntu-ports/index.html new file mode 100644 index 00000000..b28ac483 --- /dev/null +++ b/post/mirror-help/ubuntu-ports/index.html @@ -0,0 +1,243 @@ + + + + + + + + + + ubuntu-ports · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ubuntu-ports

+

+ January 1, 0001 + +
+ wdwang + + +
+ + + + mirror-help + + + +

+
+ +
+

使用方式:

+

可使用gedit等文本编辑器修改/etc/apt/sources.list。修改后使用sudo apt update更新软件源。

+

Ubuntu 18.04

+
deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse
+
+# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse
+

Ubuntu 20.04

+
deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse
+
+# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse
+

Ubuntu 22.04

+
deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse
+
+# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse
+

其中deb-src为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/ubuntu/index.html b/post/mirror-help/ubuntu/index.html new file mode 100644 index 00000000..ccdb9214 --- /dev/null +++ b/post/mirror-help/ubuntu/index.html @@ -0,0 +1,248 @@ + + + + + + + + + + ubuntu · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ubuntu

+

+ January 1, 0001 + +
+ htfy96 + + +
+ + + + mirror-help + + + +

+
+ +
+

Ubuntu是一个基于Debian的Linux发行版,包含了常用的大量软件包。Ubuntu的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。Ubuntu目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。

+

SJTUG镜像源可以加速软件包的安装。

+

使用方式:

+

使用sudo nano /etc/apt/sources.list打开镜像源列表文件。将类似于http://cn.archive.ubuntu.com/ubuntuhttp://cn.archive.ubuntu.com/ubuntu的地址改成https://mirror.sjtu.edu.cn/ubuntu,之后按Ctrl-O 回车保存,按Ctrl-X退出。最后执行sudo apt update即可。

+

镜像站一天同步一次 Ubuntu 镜像。为了取得最新的安全更新,我们不建议您将 security.ubuntu.com 换成镜像源。

+

您也可使用sudo sed -i 's/http:\/\/cn.archive.ubuntu.com/https:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list指令直接批量修改。

+

以下为修改后的镜像源列表文件的示例。可使用gedit等文本编辑器修改/etc/apt/sources.list。修改后使用sudo apt update更新软件源。

+

Ubuntu 18.04

+
deb https://mirror.sjtu.edu.cn/ubuntu/ bionic main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
+
+# deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
+

Ubuntu 20.04

+
deb https://mirror.sjtu.edu.cn/ubuntu/ focal main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ focal-security main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-security main restricted universe multiverse
+
+# deb https://mirror.sjtu.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
+

Ubuntu 22.04

+
deb https://mirror.sjtu.edu.cn/ubuntu/ jammy main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
+deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
+
+# deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
+# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
+

其中deb-src为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-help/voidlinux/index.html b/post/mirror-help/voidlinux/index.html new file mode 100644 index 00000000..55ddd9ee --- /dev/null +++ b/post/mirror-help/voidlinux/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + voidlinux · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

voidlinux

+

+ January 1, 0001 + +
+ ixnij + + +
+ + + + mirror-help + + + +

+
+ +
+

Void linux 是基于 Linux 内核独立开发的通用操作系统。其特色在于一份二进制/源代码混合式包管理系统,这使得用户能快速安装、更新、移除软件,或者是借助 XBPS 源代码集合从源码直接生成软件。该发行的其他特性包括对 Raspberry Pi 单板计算机(armv6 和 armv7)的支持,每日更新的滚动式开发模式,可以选择 glibc 和 musl 作为 C 库,以及名为 runit 的原生 BSD 风格 init 系统。

+

使用方法:

+
mkdir -p /etc/xbps.d
+cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
+sed -i 's|https://alpha.de.repo.voidlinux.org|https://mirror.sjtu.edu.cn/voidlinux|g' /etc/xbps.d/*-repository-*.conf
+

之后可用 xbps-query -L 检查是否正确替换。

+

运行 xbps-install -Su 刷新镜像并更新系统。

+

请前往官方教程获取更多信息。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2016-03-17-established/index.html b/post/mirror-news/2016-03-17-established/index.html new file mode 100644 index 00000000..1b5dbcd7 --- /dev/null +++ b/post/mirror-news/2016-03-17-established/index.html @@ -0,0 +1,204 @@ + + + + + + + + + + SJTUG Demo镜像源成立 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG Demo镜像源成立

+

+ March 17, 2016 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2016-04-07-arch-repo/index.html b/post/mirror-news/2016-04-07-arch-repo/index.html new file mode 100644 index 00000000..410ccbb4 --- /dev/null +++ b/post/mirror-news/2016-04-07-arch-repo/index.html @@ -0,0 +1,204 @@ + + + + + + + + + + 喜迎校庆 SJTUG Mirrors加入Arch Linux镜像源 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

喜迎校庆 SJTUG Mirrors加入Arch Linux镜像源

+

+ April 7, 2016 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-03-04-v2-beta/index.html b/post/mirror-news/2018-03-04-v2-beta/index.html new file mode 100644 index 00000000..5b8720b0 --- /dev/null +++ b/post/mirror-news/2018-03-04-v2-beta/index.html @@ -0,0 +1,204 @@ + + + + + + + + + + 镜像源v2 Beta版上线! · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像源v2 Beta版上线!

+

+ March 4, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-05-07-domain-update/index.html b/post/mirror-news/2018-05-07-domain-update/index.html new file mode 100644 index 00000000..381a3b7d --- /dev/null +++ b/post/mirror-news/2018-05-07-domain-update/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像源域名更换为mirrors.sjtug.sjtu.edu.cn · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像源域名更换为mirrors.sjtug.sjtu.edu.cn

+

+ May 7, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

欢迎大家之后使用新域名访问

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-05-17-gnu-ctan-repo/index.html b/post/mirror-news/2018-05-17-gnu-ctan-repo/index.html new file mode 100644 index 00000000..b69188f6 --- /dev/null +++ b/post/mirror-news/2018-05-17-gnu-ctan-repo/index.html @@ -0,0 +1,209 @@ + + + + + + + + + + SJTUG 镜像源加入 GNU、CTAN 官方镜像源列表 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 镜像源加入 GNU、CTAN 官方镜像源列表

+

+ May 17, 2018 + +
+ Evensgn + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站 v2 正式上线后,现已加入 GNU、CTAN 官方镜像源列表:

+ + +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-05-29-maintain-complete/index.html b/post/mirror-news/2018-05-29-maintain-complete/index.html new file mode 100644 index 00000000..20a7b5bf --- /dev/null +++ b/post/mirror-news/2018-05-29-maintain-complete/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像源维护完成 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像源维护完成

+

+ May 29, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 镜像源在今天晚上 11:00 ~ 11:21 按计划进行了例行维护,在维护期间服务暂时不可用,目前已经恢复正常。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-05-29-maintain/index.html b/post/mirror-news/2018-05-29-maintain/index.html new file mode 100644 index 00000000..0d1291a0 --- /dev/null +++ b/post/mirror-news/2018-05-29-maintain/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站将在05/29 晚11:00 UTC+8维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将在05/29 晚11:00 UTC+8维护

+

+ May 29, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站 将在2018年5月29日晚11:00 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。维护时间据估计不会超过30分钟。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-06-04-ros-failure/index.html b/post/mirror-news/2018-06-04-ros-failure/index.html new file mode 100644 index 00000000..16d12789 --- /dev/null +++ b/post/mirror-news/2018-06-04-ros-failure/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + ROS源上游故障 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

ROS源上游故障

+

+ June 4, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

今天中午12:00左右,ROS上游唯一的Rsync源出现故障无法进行同步,大部分国内镜像站都会受到影响。已经同步的包仍然可以正常下载,但12:00以后的更新将无法反馈到用户。目前我们在密切观察这一现象,若短时间内rsync源无法恢复,我们将会尝试切换到apt-cache源。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-06-15-raspbian-homebrew/index.html b/post/mirror-news/2018-06-15-raspbian-homebrew/index.html new file mode 100644 index 00000000..3e95473f --- /dev/null +++ b/post/mirror-news/2018-06-15-raspbian-homebrew/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + 新增homebrew与raspbian/raspberrypi镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增homebrew与raspbian/raspberrypi镜像

+

+ June 15, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

新增了MacOS的homebrew包管理器与适用于树莓派的raspbian/raspberrypi仓库的镜像。

+

欢迎大家查看git/homebrew-{core/cask}.githomebrew-bottlesraspbian/raspberrypi了解如何使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-11-20-maintain/index.html b/post/mirror-news/2018-11-20-maintain/index.html new file mode 100644 index 00000000..6a11285a --- /dev/null +++ b/post/mirror-news/2018-11-20-maintain/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站将在 11/22 凌晨3时 UTC+8维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将在 11/22 凌晨3时 UTC+8维护

+

+ November 20, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站 将在2018年11月22日 凌晨3时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:1小时。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2018-11-22-outage/index.html b/post/mirror-news/2018-11-22-outage/index.html new file mode 100644 index 00000000..d0427476 --- /dev/null +++ b/post/mirror-news/2018-11-22-outage/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站11/22 6:31开始服务暂时不可用 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站11/22 6:31开始服务暂时不可用

+

+ November 22, 2018 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

镜像站在11/22早6:31开始,服务暂时不可用,目前我们正在调查原因。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2019-01-04-outage/index.html b/post/mirror-news/2019-01-04-outage/index.html new file mode 100644 index 00000000..2f971e30 --- /dev/null +++ b/post/mirror-news/2019-01-04-outage/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站已于01/05恢复正常 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站已于01/05恢复正常

+

+ January 4, 2019 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

由于网页服务器异常crash,镜像站于1月4日14时到5日3时期间无法正常访问。目前已经修复,欢迎大家继续使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2019-03-06-tls-1.3/index.html b/post/mirror-news/2019-03-06-tls-1.3/index.html new file mode 100644 index 00000000..d059809b --- /dev/null +++ b/post/mirror-news/2019-03-06-tls-1.3/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站已支持TLS v1.3访问 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站已支持TLS v1.3访问

+

+ March 6, 2019 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

镜像站现已正式支持TLS 1.3访问。使用 curl >= 7.52.0 的软件会自动采用TLS 1.3以降低访问延时。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2019-06-19-maintain/index.html b/post/mirror-news/2019-06-19-maintain/index.html new file mode 100644 index 00000000..f6569174 --- /dev/null +++ b/post/mirror-news/2019-06-19-maintain/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站将于21日凌晨2点维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于21日凌晨2点维护

+

+ June 19, 2019 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站 将在 2019年6月21日 凌晨2时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:2小时。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2019-10-09-remove-pypi/index.html b/post/mirror-news/2019-10-09-remove-pypi/index.html new file mode 100644 index 00000000..96eedbc9 --- /dev/null +++ b/post/mirror-news/2019-10-09-remove-pypi/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + Pypi镜像源改为反代 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Pypi镜像源改为反代

+

+ October 9, 2019 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

由于PyPI镜像占用空间过大,经过权衡我们决定放弃PyPI的全量镜像。出于兼容性考虑,https://mirrors.sjtug.sjtu.edu.cn/pypi/web 现在反代 https://pypi.org (与原有URL相同,已有用户不必进行更改)。有需要的用户可以迁移到其他镜像或继续使用反代服务。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2019-10-10-data-leak/index.html b/post/mirror-news/2019-10-10-data-leak/index.html new file mode 100644 index 00000000..52f7367f --- /dev/null +++ b/post/mirror-news/2019-10-10-data-leak/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + 关于19年10月软件源日志泄漏的通告 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

关于19年10月软件源日志泄漏的通告

+

+ October 10, 2019 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

发生了什么

+

由于镜像状态页面的Access Token未被合理限权,未授权外部用户可以查看软件源的所有日志。

+

范围

+

2018年4月3日2019年10月10日的日志,其中可能会对用户造成影响的内容包括:用户的IP、访问时间与路径

+

目前采取的措施

+

目前已经此漏洞已被以下措施修复:

+
    +
  • 注销了之前未被限权的Access Token
  • +
  • 更换了日志账户的Account Token
  • +
  • 在完成日志权限模型之前,暂时停止日志上传
  • +
  • 更换了泄漏的代理后端的IP,并换用了随机性更强的域名
  • +
+

之后将会更加审慎处理相关信息的接口,保障数据安全。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-04-18-maintain/index.html b/post/mirror-news/2020-04-18-maintain/index.html new file mode 100644 index 00000000..62c03553 --- /dev/null +++ b/post/mirror-news/2020-04-18-maintain/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 镜像站将于4月20日凌晨2点维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于4月20日凌晨2点维护

+

+ April 18, 2020 + +
+ htfy96 + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站 将在 2020年4月20日 凌晨2时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:2小时。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-08-05-new-mirrors/index.html b/post/mirror-news/2020-08-05-new-mirrors/index.html new file mode 100644 index 00000000..d5282e33 --- /dev/null +++ b/post/mirror-news/2020-08-05-new-mirrors/index.html @@ -0,0 +1,225 @@ + + + + + + + + + + 新增 archlinuxarm, julia, mongodb, Qt 镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 archlinuxarm, julia, mongodb, Qt 镜像

+

+ August 5, 2020 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 镜像源近期迎来了一大批更新。

+
    +
  • 改变了 archlinux 镜像的同步方式,实时性更强。
  • +
  • 新增 archlinuxarm 源。
  • +
  • 在 anaconda 中新增了 PyTorch 源。
  • +
  • 新增 julia 源。该镜像源将成为中国大陆境内官方 Pkg Server 的上游之一。
  • +
  • 新增 mongodb 源。
  • +
  • 新增 Qt 源。我们近期在联系 Qt,希望将镜像加入官方镜像列表中。
  • +
+

欢迎大家体验!

+

2019-2020 年我们还新增/修复了下面这些镜像:

+
    +
  • 增强了 anaconda 同步的稳定性,修复了部分源 404 的问题。
  • +
  • 修复了 CRAN 的同步问题。
  • +
  • 修复了 crates.io 的重定向问题。
  • +
  • 修复了 dart-package 的重定向问题。
  • +
  • pypi 改为反代。
  • +
  • 修复了 maven 的访问问题。
  • +
  • 新增了 google-fonts 反代。
  • +
  • 新增了 packagist 元数据。
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-09-28-new-mirrors/index.html b/post/mirror-news/2020-09-28-new-mirrors/index.html new file mode 100644 index 00000000..458ee523 --- /dev/null +++ b/post/mirror-news/2020-09-28-new-mirrors/index.html @@ -0,0 +1,214 @@ + + + + + + + + + + 新增 emacs-elpa 与 msys2 镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 emacs-elpa 与 msys2 镜像

+

+ September 28, 2020 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 镜像在最近两个月中新增了下面两个镜像。

+
    +
  • emacs-elpa (包含 GNU ELPA, MELPA, MELPA Stable, Marmalade, Org, Sunrise Commander ELPA, user42 ELPA),上游 emacs-china。
  • +
  • msys2
  • +
+

九月中旬,镜像站的反向代理服务出现了一些稳定性问题。我们更换了反向代理方式,提高了 crates.io 等镜像的稳定性。

+

在 @johnnychen94 的帮助下,镜像站解决了 julia 镜像缺失文件的问题。

+

Qt 镜像已加入官方源。在使用官方安装器进行安装时,国内用户会自动使用 SJTUG 镜像站下载文件。

+

Ubuntu, Debian 等 apt 源禁用了 https 自动跳转,现在可以直接使用 http 协议访问。

+

欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-12-07-announcing-new-arch/index.html b/post/mirror-news/2020-12-07-announcing-new-arch/index.html new file mode 100644 index 00000000..5d89259d --- /dev/null +++ b/post/mirror-news/2020-12-07-announcing-new-arch/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + SJTUG 镜像源智能缓存正式上线 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

SJTUG 镜像源智能缓存正式上线

+

+ December 7, 2020 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 镜像在近期进行了一次更新。我们开发了智能缓存工具 mirror-intel, +并将部分反向代理软件源移植到了智能缓存系统上。

+

智能缓存的后端是由上海交通大学网络信息中心提供的对象存储服务。

+

当您访问智能缓存软件源时,服务器会先检测文件是否在对象存储中。如果存在,请求会直接被重定向到 https://s3.jcloud.sjtu.edu.cn 。 +否则,请求会被重定向到上游;与此同时,智能缓存会将文件同步到对象存储中。

+

目前通过智能缓存提供服务的软件源镜像包括:

+
    +
  • rust-static (rustup 镜像源)。上游为 https://static.rust-lang.org 。近三个月的工具链均已缓存。
  • +
  • crates.io (cargo 包管理器镜像源)。上游为 https://static.crates.io 。所有包都已缓存。
  • +
  • homebrew-bottles。上游为清华大学开源软件镜像站 (TUNA)。所有包都已缓存。
  • +
  • pypi-packages。上游为清华大学开源软件镜像站 (TUNA)。正在同步中。
  • +
  • flathub, fedora-ostree, fedora-iot 均使用官方 ostree 上游。所有分支都已缓存。ostree 镜像还在测试阶段,正式版会在近几个月内发布。
  • +
+

欢迎大家的使用~

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-12-08-add-pypi/index.html b/post/mirror-news/2020-12-08-add-pypi/index.html new file mode 100644 index 00000000..8ac5e07b --- /dev/null +++ b/post/mirror-news/2020-12-08-add-pypi/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + PyPI 全量同步镜像源重新上线 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

PyPI 全量同步镜像源重新上线

+

+ December 10, 2020 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

继 SJTUG 镜像源智能缓存上线后,我们从清华大学开源软件镜像站 (TUNA) 全量同步了 PyPI 软件源。感谢上海交通大学网络信息中心和 TUNA 的支持。欢迎大家继续使用 PyPI 镜像源。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-12-21-release-guix/index.html b/post/mirror-news/2020-12-21-release-guix/index.html new file mode 100644 index 00000000..64d757ee --- /dev/null +++ b/post/mirror-news/2020-12-21-release-guix/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + Guix 镜像源正式上线 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Guix 镜像源正式上线

+

+ December 21, 2020 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

在 Guix 中文社区的大力支持下,我们上线了 Guix 镜像源。Guix 镜像源的实现方式是智能缓存。当镜像站用户第一次请求某个资源时,它会被永久缓存在镜像站服务器上。

+

Guix 镜像源分为 git 镜像和 substitute 镜像,请参考帮助文档进行配置。欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2020-12-25-fix-flutter/index.html b/post/mirror-news/2020-12-25-fix-flutter/index.html new file mode 100644 index 00000000..c546ce52 --- /dev/null +++ b/post/mirror-news/2020-12-25-fix-flutter/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + Dart 与 Flutter 镜像源已全量同步 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

Dart 与 Flutter 镜像源已全量同步

+

+ December 25, 2020 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

在 Flutter 中文社区的大力支持下,我们修复了 Dart 与 Flutter 镜像访问不稳定的问题。请参考帮助文档进行配置。欢迎大家继续使用 SJTUG 镜像源。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-01-02-add-github-release-freecad/index.html b/post/mirror-news/2021-01-02-add-github-release-freecad/index.html new file mode 100644 index 00000000..1b1e90f3 --- /dev/null +++ b/post/mirror-news/2021-01-02-add-github-release-freecad/index.html @@ -0,0 +1,206 @@ + + + + + + + + + + 新增 FreeCAD 镜像与 GitHub Release 智能缓存 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 FreeCAD 镜像与 GitHub Release 智能缓存

+

+ January 2, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

FreeCAD 镜像可以在 这里 访问,我们已经全量同步了近 3 个版本。

+

目前 GitHub Release 智能缓存只开放了 FreeCAD 项目的缓存。您可以在 mirror-requests 中通过 issue 的方式请求添加新的 GitHub Release 镜像。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-01-04-siyuan-available/index.html b/post/mirror-news/2021-01-04-siyuan-available/index.html new file mode 100644 index 00000000..3059bac5 --- /dev/null +++ b/post/mirror-news/2021-01-04-siyuan-available/index.html @@ -0,0 +1,241 @@ + + + + + + + + + + 新增 apache, DragonFlyBSD 等镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 apache, DragonFlyBSD 等镜像

+

+ January 4, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 的新服务器“思源 (Siyuan)”服务器已经在 https://mirror.sjtu.edu.cn 上线。 +该服务器兼容原 ftp.sjtu.edu.cn 服务器提供的服务,并在此基础上增加了许多软件源镜像。 +原先的 ftp.sjtu.edu.cn 将在近几个月内解析至 SJTUG 思源镜像服务器。

+

新服务器兼容以下 18 个 ftp.sjtu.edu.cn 上的软件源镜像。

+
    +
  • centos
  • +
  • debian
  • +
  • debian-cd
  • +
  • debian-security
  • +
  • deepin
  • +
  • deepin-cd
  • +
  • fedora/linux
  • +
  • fedora/epel
  • +
  • fedora-secondary
  • +
  • linuxmint
  • +
  • linuxmint-cd
  • +
  • mageia
  • +
  • opensuse
  • +
  • openvz
  • +
  • remi
  • +
  • scientific
  • +
  • ubuntu
  • +
  • ubuntu-cd
  • +
+

新服务器新增了以下 8 个镜像。

+
    +
  • apache
  • +
  • docker-ce
  • +
  • ubuntu-cdimage
  • +
  • ubuntu-ports
  • +
  • openwrt
  • +
  • rpmfusion
  • +
  • dragonflybsd/dports
  • +
  • dragonflybsd/iso-images
  • +
+

与此同时,我们也上线了大量常用 git 仓库镜像。

+

欢迎大家继续使用 SJTUG 镜像站。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-02-10-maintain/index.html b/post/mirror-news/2021-02-10-maintain/index.html new file mode 100644 index 00000000..16af63af --- /dev/null +++ b/post/mirror-news/2021-02-10-maintain/index.html @@ -0,0 +1,221 @@ + + + + + + + + + + 镜像站将于2月17日上午8时维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于2月17日上午8时维护

+

+ February 10, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站致远镜像服务器将于 2021年2月17日 上午8时 UTC+8 起进行服务器架构升级,届时服务将会出现短时间的不可用,希望大家予以谅解。

+

本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。

+

本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:

+
    +
  • 将 ftp.sjtu.edu.cn 的反向代理源更改为思源镜像服务器的对应镜像。
  • +
  • 解决部分目录重定向到错误路径导致 404 的问题。
  • +
  • 停止提供 nodejs-release, maven-central, npm-registry, google-fonts 服务,相关服务会重定向到上游。 +技术详情可以参阅 Zhiyuan Migration Project
  • +
+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 维护前 24 小时停止 rsync 服务,使得上游不再将用户重定向到本镜像站。
  • +
  • Web 服务器重启将在 5 分钟内完成。在此期间,所有软件源均不可用。
  • +
  • 同步服务重启将在 30 分钟内完成。在此期间,前端将无法显示同步状态。
  • +
  • 涉及到子域名的服务(如 Docker 反代、anaconda)可能无法立即正常提供服务,在 1 小时内可以恢复。
  • +
+

在新年来临之际,我谨代表 SJTUG 镜像站维护人员,祝大家在即将到来的一年里,阖家欢乐,万事如意。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-03-06-new-mirrors/index.html b/post/mirror-news/2021-03-06-new-mirrors/index.html new file mode 100644 index 00000000..dcca1944 --- /dev/null +++ b/post/mirror-news/2021-03-06-new-mirrors/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + 新增 Bioconductor, openEuler, Void Linux, Wireshark 镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 Bioconductor, openEuler, Void Linux, Wireshark 镜像

+

+ March 6, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

近期,SJTUG 的镜像同步工具 mirror-clone 添加了 Rsync 支持。 +在此基础上,我们增加了 Bioconductor, Void Linux 和 Wireshark 镜像。这三个镜像都存储在 SJTU 对象存储服务上。 +从这些软件源下载软件时,您会被自动重定向到 SJTU 对象存储服务。

+

我们还增加了 openEuler 镜像,存储在思源 (mirror.sjtu.edu.cn) 服务器上。

+

您可以参阅镜像站首页的帮助文档,配置相关软件使用 SJTUG 镜像。

+

与此同时,由于致远服务器压力过大,我们将部分软件源迁移到了其他存储中。您可以调整相关软件的设置,以取得最好的使用体验。

+
    +
  • manjaro 迁移到了思源服务器。
  • +
  • archlinux 迁移到了思源服务器。
  • +
  • ctan 迁移到了思源服务器。
  • +
  • anaconda 迁移到了 SJTU 对象存储服务。
  • +
+

欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-03-23-new-mirrors/index.html b/post/mirror-news/2021-03-23-new-mirrors/index.html new file mode 100644 index 00000000..e3ffa460 --- /dev/null +++ b/post/mirror-news/2021-03-23-new-mirrors/index.html @@ -0,0 +1,218 @@ + + + + + + + + + + 新增 conda-forge/osx-arm64, GIMP, MacPorts, VSCodium 镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 conda-forge/osx-arm64, GIMP, MacPorts, VSCodium 镜像

+

+ March 23, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像在本月添加了一批新的镜像源。

+ +

与此同时,我们也做了一些功能上的更新:

+
    +
  • 存储在 SJTU S3 上的软件源现在可以浏览所有文件了。 PR#212
  • +
  • Flutter 切换到了新上游。 PR#209
  • +
  • openSUSE 添加到了官方源。 PR#215
  • +
+

欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-05-25-new-mirrors/index.html b/post/mirror-news/2021-05-25-new-mirrors/index.html new file mode 100644 index 00000000..14fd3835 --- /dev/null +++ b/post/mirror-news/2021-05-25-new-mirrors/index.html @@ -0,0 +1,220 @@ + + + + + + + + + + 新增 AlmaLinux, Armbian, Fedora development, ghcup, Linux kernel, Rocky Linux 镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 AlmaLinux, Armbian, Fedora development, ghcup, Linux kernel, Rocky Linux 镜像

+

+ May 25, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像在近期添加了一批新的镜像源。

+
    +
  • 添加 ghcup 镜像。PR#225
  • +
  • 添加 Armbian 和 AlmaLinux 镜像 PR#227
  • +
  • 添加 Linux kernel 镜像 PR#228
  • +
  • 添加了 Fedora development 镜像 PR#236 PR#238
  • +
  • 添加了 Rocky Linux 镜像 PR#246
  • +
+

与此同时,我们也做了一些功能上的更新:

+
    +
  • Homebrew 支持从 ghcr.io 同步。 PR#245
  • +
  • Rsync 的磁盘限制大大减小,可以为下游提供文件同步服务了。 PR#240
  • +
  • git 源切换到了 git.sjtu.edu.cn 提供服务,用户体验更好。 PR#249
  • +
  • Caddy Web Server 升级到了 2.4.0。 PR#248
  • +
+

欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-08-26-new-mirrors/index.html b/post/mirror-news/2021-08-26-new-mirrors/index.html new file mode 100644 index 00000000..2694207d --- /dev/null +++ b/post/mirror-news/2021-08-26-new-mirrors/index.html @@ -0,0 +1,221 @@ + + + + + + + + + + 新增 DGL, Fedora Rawhide, OpenBSD, Raspbian Addons, Ubuntu Kylin, Ubuntu Cloud Images, Zorinos ISOs 镜像 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

新增 DGL, Fedora Rawhide, OpenBSD, Raspbian Addons, Ubuntu Kylin, Ubuntu Cloud Images, Zorinos ISOs 镜像

+

+ August 26, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像在近期添加了一批新的镜像源。

+
    +
  • 添加 Raspbian Addons 镜像。PR#261
  • +
  • 添加 Fedora Rawhide 镜像 PR#264
  • +
  • 添加 DGL (anaconda/cloud/dglteam) 镜像 PR#268
  • +
  • 添加 OpenBSD 镜像 PR#269
  • +
  • 添加 Ubuntu Kylin 镜像 PR#270
  • +
  • 添加 Zorinos ISOs 镜像 PR#271
  • +
  • 添加 Ubuntu Cloud Images 镜像 PR#275
  • +
+

与此同时,我们也做了一些功能上的更新:

+
    +
  • 修复了 ghcup 的同步。 PR#274
  • +
  • Caddy Web Server 升级到了 2.4.3。 PR#271
  • +
  • Zhiyuan 镜像服务器 (mirrors.sjtug) 支持 IPv6。
  • +
+

欢迎大家使用。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-09-26-maintain/index.html b/post/mirror-news/2021-09-26-maintain/index.html new file mode 100644 index 00000000..663d2918 --- /dev/null +++ b/post/mirror-news/2021-09-26-maintain/index.html @@ -0,0 +1,221 @@ + + + + + + + + + + 镜像站将于10月6-7日上午8时维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于10月6-7日上午8时维护

+

+ September 26, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站的两台服务器将分别于 2021年10月6日 上午8时 UTC+8 和 2021年10月7日 上午8时 UTC+8 起进行服务器架构升级,届时服务将会出现短时间的不可用,希望大家予以谅解。

+

本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 和 mirror.sjtu.edu.cn 上存储的所有软件源。

+

本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:

+
    +
  • 将致远镜像服务器的操作系统从 Fedora 31 升级到 Fedora 33。
  • +
  • 将思源镜像服务器的操作系统从 Debian 10 升级到 Debian 11。
  • +
+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2021年10月6日 上午8时起,我们将首先维护思源镜像站 (mirror.sjtu.edu.cn)。Debian 系统升级将在 30 分钟内完成,期间可能会出现服务中断的情况。
  • +
  • 之后将进行机器重启,思源镜像站的所有服务可能会出现 5 分钟左右的中断。如出现兼容性问题,可能会中断更长时间。
  • +
  • 2021年10月7日 上午4时起,我们将维护致远镜像站 (mirrors.sjtug.sjtu.edu.cn)。Fedora 系统升级将在 2 小时内完成,期间将停止服务。
  • +
  • 2021年10月7日 上午8时起,我们将更新配置。Fedora 系统配置将在 30 分钟内完成,期间可能会出现服务中断的情况。
  • +
+

感谢您对 SJTUG 镜像站的关注。

+

更新:致远镜像站将升级到 Fedora 33 而非 Fedora 34。

+

更新:致远镜像站将会在 4 时起停机更新,而非 8 时。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-10-04-cert/index.html b/post/mirror-news/2021-10-04-cert/index.html new file mode 100644 index 00000000..c969b4a7 --- /dev/null +++ b/post/mirror-news/2021-10-04-cert/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + 关于近期 HTTPS 证书问题的相关提示 (已更新证书) · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

关于近期 HTTPS 证书问题的相关提示 (已更新证书)

+

+ October 4, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像使用 Let’s Encrypt 签发的 HTTPS 证书提供服务。2021 年 9 月 30 日晚上 10 时,用于交叉签名根证书的 DST Root CA X3 过期。因此,在老版本系统中,您可能会碰到错误的“证书过期”提示。

+

如果您在更新软件包时遇到困难,可以参考对应软件源的帮助文档,先将软件源设置成 HTTP 协议访问;而后参考 TUNA 的解决方案 更新您的系统,从而从 SJTUG 镜像站获取最新的软件更新。

+
    +
  • 10月12日0时更新:mirrors.sjtug.sjtu.edu.cn 已经去掉了 DST Root CA X3,证书链仅保留 ISRG Root X1。
  • +
  • 10月12日0时更新:mirror.sjtu.edu.cn 已经去掉了 DST Root CA X3,证书链仅保留 ISRG Root X1。
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-10-07-outage/index.html b/post/mirror-news/2021-10-07-outage/index.html new file mode 100644 index 00000000..d3e7876a --- /dev/null +++ b/post/mirror-news/2021-10-07-outage/index.html @@ -0,0 +1,210 @@ + + + + + + + + + + 镜像站10月7日9时起服务不可用 (已恢复) · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站10月7日9时起服务不可用 (已恢复)

+

+ October 7, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

由于 mirrors.sjtug.sjtu.edu.cn 升级时出现问题,镜像站服务目前处于不完全可用状态。我们正在调查服务器升级失败的原因,并尝试重启服务器。

+
    +
  • 上午11时更新:初步确定服务器无法启动的原因是意外将三年前的 grub 配置覆盖了最新配置,导致无法正常进入系统。正在尝试重新生成 grub 引导配置。
  • +
  • 下午3时更新:我们已经进入 Fedora recovery mode 进行修复工作。
  • +
  • 8日上午9时更新:服务已经恢复。我们还将做一些维护工作,期间可能有服务中断。
  • +
+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2021-11-05-maintain/index.html b/post/mirror-news/2021-11-05-maintain/index.html new file mode 100644 index 00000000..10adef96 --- /dev/null +++ b/post/mirror-news/2021-11-05-maintain/index.html @@ -0,0 +1,216 @@ + + + + + + + + + + 镜像站将于11月14日周日上午4时维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于11月14日周日上午4时维护

+

+ November 5, 2021 + +
+ skyzh + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2021年11月14日周日 上午4时 UTC+8 进行系统升级。在此期间服务会中断大约半小时。

+

本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。

+

本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:

+
    +
  • 将致远镜像服务器的操作系统从 Fedora 33 升级到 Fedora 35。
  • +
+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2021年11月12日 (周五) 上午8时:我们将升级服务器上的软件包,并进行重启,为周日的升级做准备。期间服务可能会中断 5 分钟。
  • +
  • 2021年11月14日 (周日) 上午4时:服务器将重启进行系统升级,在此期间服务会中断大约半小时。
  • +
+

感谢您对 SJTUG 镜像站的关注。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2022-06-02-maintain/index.html b/post/mirror-news/2022-06-02-maintain/index.html new file mode 100644 index 00000000..15fe10b1 --- /dev/null +++ b/post/mirror-news/2022-06-02-maintain/index.html @@ -0,0 +1,211 @@ + + + + + + + + + + 镜像站于6月2日至6月6日公网服务不可用 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站于6月2日至6月6日公网服务不可用

+

+ June 2, 2022 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

接上海交通大学网络信息中心通知,由于上游校园主干网络维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。

+

本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。

+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2022年6月2日 (周四) 至 2022年6月6日(周一):上游校园主干网络维护
  • +
+

感谢您对 SJTUG 镜像站的关注。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2022-10-16-maintain/index.html b/post/mirror-news/2022-10-16-maintain/index.html new file mode 100644 index 00000000..cf8bdb20 --- /dev/null +++ b/post/mirror-news/2022-10-16-maintain/index.html @@ -0,0 +1,211 @@ + + + + + + + + + + 镜像站于10月16日至10月24日公网服务不可用 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站于10月16日至10月24日公网服务不可用

+

+ October 16, 2022 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

接上海交通大学网络信息中心通知,由于上游校园主干网络维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。

+

本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。

+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2022年10月16日 (周日) 至 2022年10月24日(周一):上游校园主干网络维护
  • +
+

感谢您对 SJTUG 镜像站的关注。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2023-02-17-maintain/index.html b/post/mirror-news/2023-02-17-maintain/index.html new file mode 100644 index 00000000..79598d29 --- /dev/null +++ b/post/mirror-news/2023-02-17-maintain/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + 镜像站将于2月17日上午8时45分维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于2月17日上午8时45分维护

+

+ February 15, 2023 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2023年2月17日周五 上午8时45分 UTC+8 进行硬件检修。在此期间服务会中断大约一小时。

+

本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。与此同时,思源服务器 (mirror.sjtu.edu.cn) 上的软件源将不受影响。

+

本次维护将会对服务器上的硬件进行维护,以提供更好的使用体验。

+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2023年2月17日 (周五) 上午8时45分:我们将使致远服务器离线并进行硬件维护,在此期间服务会中断约一小时。
  • +
+

感谢您对 SJTUG 镜像站的关注。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2023-02-23-maintain/index.html b/post/mirror-news/2023-02-23-maintain/index.html new file mode 100644 index 00000000..b24074df --- /dev/null +++ b/post/mirror-news/2023-02-23-maintain/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + 镜像站将于2月22日下午4时及2月23日上午8时15分维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于2月22日下午4时及2月23日上午8时15分维护

+

+ February 20, 2023 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2023年2月22日周三 至 2023年2月23日周四 UTC+8 部分时段进行服务器架构升级,停机窗口详见下文。届时服务将会出现短时间的不可用,希望大家予以谅解。

+

本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。

+

本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:

+
    +
  • 将致远镜像服务器的操作系统从 Fedora 35 升级到 Fedora 37。
  • +
+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2023年2月22日 下午4时起,我们将对致远镜像站进行初期升级。初期升级将在 30 分钟内完成,期间可能会出现服务中断的情况。
  • +
  • 2023年2月23日 上午4时起,我们将对致远镜像站进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。
  • +
  • 2023年2月23日 上午8时15分起,我们将更新配置。系统配置将在 1 小时内完成,期间可能会出现服务中断的情况。
  • +
+

感谢您对 SJTUG 镜像站的关注。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2023-06-03-maintain/index.html b/post/mirror-news/2023-06-03-maintain/index.html new file mode 100644 index 00000000..9617b429 --- /dev/null +++ b/post/mirror-news/2023-06-03-maintain/index.html @@ -0,0 +1,212 @@ + + + + + + + + + + 镜像站自6月3日起公网服务不可用 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站自6月3日起公网服务不可用

+

+ June 3, 2023 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

由于上游校园主干网络临时维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。

+

本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。

+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2023年6月3日 (周六) 至 2023年6月5日(周一):上游校园主干网络维护
  • +
+

感谢您对 SJTUG 镜像站的关注。

+

2023年6月3日 19:00 更新:不可用时间窗口更新

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2023-09-19-maintain/index.html b/post/mirror-news/2023-09-19-maintain/index.html new file mode 100644 index 00000000..ec744886 --- /dev/null +++ b/post/mirror-news/2023-09-19-maintain/index.html @@ -0,0 +1,217 @@ + + + + + + + + + + 镜像站将于9月19-20日上午4时维护 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

镜像站将于9月19-20日上午4时维护

+

+ September 12, 2023 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

SJTUG 软件源镜像站的两台服务器将分别于 2023年9月19日周二 上午4时 UTC+8 及 2023年9月20日周三 上午4时 UTC+8 进行服务器架构升级,停机窗口详见下文。届时服务将会出现短时间的不可用,希望大家予以谅解。

+

本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 和 mirror.sjtu.edu.cn 上存储的所有软件源。

+

本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:

+
    +
  • 将致远镜像服务器的操作系统从 Fedora 37 升级到 Fedora 38。
  • +
  • 将思源镜像服务器的操作系统从 Debian 11 升级到 Debian 12。
  • +
+

本次维护的服务不可用时间窗口预计如下。

+
    +
  • 2023年9月19日 上午4时起,我们将对致远镜像站 (mirrors.sjtug.sjtu.edu.cn) 进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。
  • +
  • 2023年9月20日 上午4时起,我们将对思源镜像站 (mirror.sjtu.edu.cn) 进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。
  • +
+

感谢您对 SJTUG 镜像站的关注。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/mirror-news/2023-11-03-outage/index.html b/post/mirror-news/2023-11-03-outage/index.html new file mode 100644 index 00000000..e9bc10b9 --- /dev/null +++ b/post/mirror-news/2023-11-03-outage/index.html @@ -0,0 +1,205 @@ + + + + + + + + + + 思源镜像站 11/03 服务异常中断 · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+
+
+

思源镜像站 11/03 服务异常中断

+

+ November 2, 2023 + +
+ lightquantum + + +
+ + + + mirror-news + + + +

+
+ +
+

由于上游交大云服务故障,思源镜像站 (mirror.sjtu.edu.cn) 于 11/03 1:12 至 05:07 服务中断,总故障时间 3 小时 55 分钟。在此过程中,致远镜像站 (mirrors.sjtug.sjtu.edu.cn) 的部分存储服务也受到影响导致无法访问。现在本站所有服务已经恢复正常。

+ +
+
+ + +
+ + +comments powered by Disqus + + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/1/index.html b/post/page/1/index.html new file mode 100644 index 00000000..8e0772c8 --- /dev/null +++ b/post/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/post/ \ No newline at end of file diff --git a/post/page/10/index.html b/post/page/10/index.html new file mode 100644 index 00000000..8a477552 --- /dev/null +++ b/post/page/10/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/11/index.html b/post/page/11/index.html new file mode 100644 index 00000000..936e0c22 --- /dev/null +++ b/post/page/11/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/12/index.html b/post/page/12/index.html new file mode 100644 index 00000000..f22b38c0 --- /dev/null +++ b/post/page/12/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/13/index.html b/post/page/13/index.html new file mode 100644 index 00000000..30e255a2 --- /dev/null +++ b/post/page/13/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/14/index.html b/post/page/14/index.html new file mode 100644 index 00000000..cf06bfa4 --- /dev/null +++ b/post/page/14/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/15/index.html b/post/page/15/index.html new file mode 100644 index 00000000..6fde0129 --- /dev/null +++ b/post/page/15/index.html @@ -0,0 +1,131 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/2/index.html b/post/page/2/index.html new file mode 100644 index 00000000..e15f2319 --- /dev/null +++ b/post/page/2/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/3/index.html b/post/page/3/index.html new file mode 100644 index 00000000..e6eef4ff --- /dev/null +++ b/post/page/3/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/4/index.html b/post/page/4/index.html new file mode 100644 index 00000000..9c7b9711 --- /dev/null +++ b/post/page/4/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/5/index.html b/post/page/5/index.html new file mode 100644 index 00000000..de54b9aa --- /dev/null +++ b/post/page/5/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/6/index.html b/post/page/6/index.html new file mode 100644 index 00000000..15b3131e --- /dev/null +++ b/post/page/6/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/7/index.html b/post/page/7/index.html new file mode 100644 index 00000000..aaef3d9a --- /dev/null +++ b/post/page/7/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/8/index.html b/post/page/8/index.html new file mode 100644 index 00000000..c897cd88 --- /dev/null +++ b/post/page/8/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/post/page/9/index.html b/post/page/9/index.html new file mode 100644 index 00000000..0d119fc2 --- /dev/null +++ b/post/page/9/index.html @@ -0,0 +1,233 @@ + + + + + + + + + + Posts · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 00000000..1ef6fcfc --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,435 @@ + + + + https://sjtug.org/post/creating-a-new-theme/ + 2014-09-28T00:00:00+00:00 + + https://sjtug.org/post/migrate-from-jekyll/ + 2014-03-10T00:00:00+00:00 + + https://sjtug.org/tags/mirror-news/ + 2023-11-02T12:08:00-07:00 + + https://sjtug.org/post/ + 2023-11-02T12:08:00-07:00 + + https://sjtug.org/ + 2023-11-02T12:08:00-07:00 + + https://sjtug.org/tags/ + 2023-11-02T12:08:00-07:00 + + https://sjtug.org/post/mirror-news/2023-11-03-outage/ + 2023-11-02T12:08:00-07:00 + + https://sjtug.org/post/mirror-news/2023-09-19-maintain/ + 2023-09-12T17:30:00-07:00 + + https://sjtug.org/tags/news/ + 2023-06-19T21:00:00+08:00 + + https://sjtug.org/tags/sharing/ + 2023-06-19T21:00:00+08:00 + + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + 2023-06-19T21:00:00+08:00 + + https://sjtug.org/tags/mirror-help/ + 2023-06-08T18:27:00+08:00 + + https://sjtug.org/post/mirror-help/pop-os/ + 2023-06-08T18:27:00+08:00 + + https://sjtug.org/post/mirror-news/2023-06-03-maintain/ + 2023-06-03T16:00:00+08:00 + + https://sjtug.org/post/mirror-news/2023-02-23-maintain/ + 2023-02-20T09:30:00+08:00 + + https://sjtug.org/post/mirror-news/2023-02-17-maintain/ + 2023-02-15T17:00:00+08:00 + + https://sjtug.org/post/mirror-news/2022-10-16-maintain/ + 2022-10-16T00:00:00+08:00 + + https://sjtug.org/post/mirror-news/2022-06-02-maintain/ + 2022-06-02T21:30:00+08:00 + + https://sjtug.org/post/2021-11-20-rust-sharing/ + 2021-11-20T20:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-11-05-maintain/ + 2021-11-05T13:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-10-07-outage/ + 2021-10-07T09:45:00+08:00 + + https://sjtug.org/post/mirror-news/2021-10-04-cert/ + 2021-10-04T00:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-09-26-maintain/ + 2021-09-26T13:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-08-26-new-mirrors/ + 2021-08-26T15:00:00+08:00 + + https://sjtug.org/post/mirror-help/docker-ce/ + 2021-08-21T00:33:00+08:00 + + https://sjtug.org/post/mirror-news/2021-05-25-new-mirrors/ + 2021-05-25T14:00:00+08:00 + + https://sjtug.org/post/mirror-help/alpine/ + 2021-04-17T17:44:00+08:00 + + https://sjtug.org/post/mirror-help/ghcup/ + 2021-03-30T23:50:00+08:00 + + https://sjtug.org/post/mirror-news/2021-03-23-new-mirrors/ + 2021-03-23T14:00:00+08:00 + + https://sjtug.org/post/2021-03-09-welcome/ + 2021-03-09T23:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-03-06-new-mirrors/ + 2021-03-06T18:40:00+08:00 + + https://sjtug.org/post/mirror-help/qt/ + 2021-02-22T11:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-02-10-maintain/ + 2021-02-10T13:00:00+08:00 + + https://sjtug.org/post/mirror-help/fedora-ostree/ + 2021-01-04T22:00:00+08:00 + + https://sjtug.org/post/mirror-help/flathub/ + 2021-01-04T22:00:00+08:00 + + https://sjtug.org/post/mirror-news/2021-01-04-siyuan-available/ + 2021-01-04T16:30:00+08:00 + + https://sjtug.org/post/mirror-news/2021-01-02-add-github-release-freecad/ + 2021-01-02T09:55:00+08:00 + + https://sjtug.org/post/mirror-news/2020-12-25-fix-flutter/ + 2020-12-25T13:15:00+08:00 + + https://sjtug.org/post/mirror-news/2020-12-21-release-guix/ + 2020-12-21T15:30:00+08:00 + + https://sjtug.org/post/mirror-news/2020-12-08-add-pypi/ + 2020-12-10T13:30:00+08:00 + + https://sjtug.org/post/mirror-news/2020-12-07-announcing-new-arch/ + 2020-12-07T12:00:00+08:00 + + https://sjtug.org/post/mirror-help/gcr-io/ + 2020-10-23T10:00:00+08:00 + + https://sjtug.org/post/mirror-help/opam-git/ + 2020-10-13T19:00:00+08:00 + + https://sjtug.org/post/mirror-news/2020-09-28-new-mirrors/ + 2020-09-28T14:00:00+08:00 + + https://sjtug.org/post/mirror-help/emacs-elpa/ + 2020-08-14T14:55:00+08:00 + + https://sjtug.org/post/mirror-news/2020-08-05-new-mirrors/ + 2020-08-05T18:00:00+08:00 + + https://sjtug.org/post/mirror-help/julia/ + 2020-08-05T12:00:00+08:00 + + https://sjtug.org/post/mirror-help/julia-releases/ + 2020-08-05T12:00:00+08:00 + + https://sjtug.org/post/mirror-help/mongodb/ + 2020-08-01T23:30:00+08:00 + + https://sjtug.org/post/mirror-help/crates.io/ + 2020-07-09T01:00:00+08:00 + + https://sjtug.org/post/mirror-help/creates.io.git/ + 2020-07-09T01:00:00+08:00 + + https://sjtug.org/post/mirror-help/cran/ + 2020-07-04T15:33:04+08:00 + + https://sjtug.org/post/mirror-news/2020-04-18-maintain/ + 2020-04-18T19:00:00-04:00 + + https://sjtug.org/post/mirror-news/2019-10-10-data-leak/ + 2019-10-10T19:37:00-07:00 + + https://sjtug.org/post/mirror-news/2019-10-09-remove-pypi/ + 2019-10-09T22:23:00-07:00 + + https://sjtug.org/post/2019-09-18-build-system/ + 2019-09-12T16:00:00+08:00 + + https://sjtug.org/post/mirror-news/2019-06-19-maintain/ + 2019-06-19T13:51:00-07:00 + + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + 2019-04-01T19:00:00+08:00 + + https://sjtug.org/post/mirror-news/2019-03-06-tls-1.3/ + 2019-03-06T20:00:00-08:00 + + https://sjtug.org/post/mirror-news/2019-01-04-outage/ + 2019-01-04T20:30:00-08:00 + + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + 2018-12-08T19:00:00+08:00 + + https://sjtug.org/post/mirror-news/2018-11-22-outage/ + 2018-11-22T05:55:00+08:00 + + https://sjtug.org/post/mirror-news/2018-11-20-maintain/ + 2018-11-20T11:55:00+08:00 + + https://sjtug.org/post/mirror-news/2018-06-15-raspbian-homebrew/ + 2018-06-15T15:00:00+08:00 + + https://sjtug.org/post/2018-06-06-summer-class/ + 2018-06-06T19:35:00+08:00 + + https://sjtug.org/tags/summer_school/ + 2018-06-06T19:35:00+08:00 + + https://sjtug.org/post/mirror-news/2018-06-04-ros-failure/ + 2018-06-04T19:40:00+08:00 + + https://sjtug.org/post/mirror-news/2018-05-29-maintain-complete/ + 2018-05-29T23:30:00+08:00 + + https://sjtug.org/post/mirror-news/2018-05-29-maintain/ + 2018-05-29T11:55:00+08:00 + + https://sjtug.org/post/mirror-news/2018-05-17-gnu-ctan-repo/ + 2018-05-17T21:40:00+08:00 + + https://sjtug.org/post/2018-05-12-cooperative-training/ + 2018-05-08T19:00:00+08:00 + + https://sjtug.org/post/mirror-news/2018-05-07-domain-update/ + 2018-05-07T15:00:00+08:00 + + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + 2018-04-14T19:00:00+08:00 + + https://sjtug.org/post/2018-03-31-concatenative-programming/ + 2018-03-26T21:00:00+08:00 + + https://sjtug.org/post/2018-03-10-intro/ + 2018-03-10T21:00:00+08:00 + + https://sjtug.org/post/mirror-news/2018-03-04-v2-beta/ + 2018-03-04T22:00:00+08:00 + + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + 2017-11-02T22:00:00+08:00 + + https://sjtug.org/post/2017-10-28-performance-measurement/ + 2017-10-28T19:00:00+08:00 + + https://sjtug.org/post/2017-06-25-summer-class-schedule/ + 2017-06-25T21:57:00+08:00 + + https://sjtug.org/post/2017-06-24-summer-class-portal/ + 2017-06-24T20:29:00+08:00 + + https://sjtug.org/post/2017-06-12-summer-class/ + 2017-06-24T21:20:00+08:00 + + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + 2017-03-09T22:11:40+08:00 + + https://sjtug.org/tags/dining/ + 2017-02-21T19:41:47+08:00 + + https://sjtug.org/post/2017-02-21-hotpot/ + 2017-02-21T19:41:47+08:00 + + https://sjtug.org/tags/guide/ + 2017-01-15T23:12:56+08:00 + + https://sjtug.org/post/2017-01-15-writing-guide/ + 2017-01-15T23:12:56+08:00 + + https://sjtug.org/tags/announcement/ + 2017-01-14T20:55:00+08:00 + + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + 2017-01-14T20:55:00+08:00 + + https://sjtug.org/post/2017-01-08-halvm/ + 2017-01-08T20:55:00+08:00 + + https://sjtug.org/contacts/ + 2016-11-27T15:26:37+08:00 + + https://sjtug.org/about/ + 2016-11-27T15:12:37+08:00 + + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + 2016-11-12T23:40:00+08:00 + + https://sjtug.org/post/2016-10-29-physical-engine/ + 2016-10-29T23:45:00+08:00 + + https://sjtug.org/post/2016-10-16-c11-memory-model/ + 2016-10-16T22:45:00+08:00 + + https://sjtug.org/post/2016-10-04-dependent-type/ + 2016-10-04T22:55:00+08:00 + + https://sjtug.org/post/mirror-news/2016-04-07-arch-repo/ + 2016-04-07T22:00:00+08:00 + + https://sjtug.org/post/mirror-news/2016-03-17-established/ + 2016-03-17T22:00:00+08:00 + + https://sjtug.org/about/ + 2015-06-20T14:02:37+02:00 + + https://sjtug.org/post/goisforlovers/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/tags/development/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/post/hugoisforlovers/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/tags/go/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/tags/golang/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/tags/hugo/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/tags/templates/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/tags/themes/ + 2014-04-02T00:00:00+00:00 + + https://sjtug.org/post/mirror-help/elan/ + + https://sjtug.org/post/mirror-help/anaconda/ + + https://sjtug.org/post/mirror-help/anthon/ + + https://sjtug.org/post/mirror-help/archlinux/ + + https://sjtug.org/post/mirror-help/archlinux-cn/ + + https://sjtug.org/post/mirror-help/archlinuxarm/ + + https://sjtug.org/post/mirror-help/armbian/ + + https://sjtug.org/post/mirror-help/bioconductor/ + + https://sjtug.org/post/mirror-help/blackarch/ + + https://sjtug.org/post/mirror-help/centos/ + + https://sjtug.org/post/mirror-help/dart-packages/ + + https://sjtug.org/post/mirror-help/debian/ + + https://sjtug.org/post/mirror-help/debian-cd/ + + https://sjtug.org/post/mirror-help/debian-ports/ + + https://sjtug.org/post/mirror-help/docker-registry/ + + https://sjtug.org/post/mirror-help/dragonflybsd/ + + https://sjtug.org/post/mirror-help/fedora/ + + https://sjtug.org/post/mirror-help/flutter_infra/ + + https://sjtug.org/post/mirror-help/brew-git/ + + https://sjtug.org/post/mirror-help/homebrew-cask/ + + https://sjtug.org/post/mirror-help/homebrew-core/ + + https://sjtug.org/post/mirror-help/ohmyzsh/ + + https://sjtug.org/post/mirror-help/google-fonts/ + + https://sjtug.org/post/mirror-help/guix/ + + https://sjtug.org/post/mirror-help/homebrew-bottles/ + + https://sjtug.org/post/mirror-help/immortalwrt/ + + https://sjtug.org/post/mirror-help/kali/ + + https://sjtug.org/post/mirror-help/leopardsh/ + + https://sjtug.org/post/mirror-help/linuxliteos/ + + https://sjtug.org/post/mirror-help/maven-central/ + + https://sjtug.org/post/mirror-help/msys2/ + + https://sjtug.org/post/mirror-help/mx-isos/ + + https://sjtug.org/post/mirror-help/mx-packages/ + + https://sjtug.org/post/mirror-help/nix-channels/ + + https://sjtug.org/post/mirror-help/nodejs-release/ + + https://sjtug.org/post/mirror-help/npm-registry/ + + https://sjtug.org/post/mirror-help/openeuler/ + + https://sjtug.org/post/mirror-help/packagist/ + + https://sjtug.org/post/mirror-help/parrot/ + + https://sjtug.org/post/mirror-help/putty/ + + https://sjtug.org/post/mirror-help/pypi-packages/ + + https://sjtug.org/post/mirror-help/pypi/ + + https://sjtug.org/post/mirror-help/pytorch-wheels/ + + https://sjtug.org/post/mirror-help/raspberry-pi-os-images/ + + https://sjtug.org/post/mirror-help/raspberrypi/ + + https://sjtug.org/post/mirror-help/raspbian/ + + https://sjtug.org/post/mirror-help/raspbian-addons/ + + https://sjtug.org/post/mirror-help/rocky/ + + https://sjtug.org/post/mirror-help/ros/ + + https://sjtug.org/post/mirror-help/rust-static/ + + https://sjtug.org/post/mirror-help/ubuntu/ + + https://sjtug.org/post/mirror-help/ubuntu-cd/ + + https://sjtug.org/post/mirror-help/ubuntu-cdimage/ + + https://sjtug.org/post/mirror-help/ubuntu-cloud-images/ + + https://sjtug.org/post/mirror-help/ubuntu-ports/ + + https://sjtug.org/post/mirror-help/voidlinux/ + + diff --git a/tags/announcement/index.html b/tags/announcement/index.html new file mode 100644 index 00000000..fc435c44 --- /dev/null +++ b/tags/announcement/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + announcement · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/announcement/index.xml b/tags/announcement/index.xml new file mode 100644 index 00000000..c57f59ac --- /dev/null +++ b/tags/announcement/index.xml @@ -0,0 +1,25 @@ + + + announcement on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/announcement/ + Recent content in announcement on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Sat, 14 Jan 2017 20:55:00 +0800 + + + + + + SJTUG新版首页上线 + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + Sat, 14 Jan 2017 20:55:00 +0800 + + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + <p>我们的首页已经更新到基于Hugo的版本,希望能给大家带来更好的阅读体验。</p> +<p>接下来这里将会加入例行分享的报道及一些技术文章,欢迎大家订阅。</p> + + + + + \ No newline at end of file diff --git a/tags/announcement/page/1/index.html b/tags/announcement/page/1/index.html new file mode 100644 index 00000000..86403101 --- /dev/null +++ b/tags/announcement/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/announcement/ \ No newline at end of file diff --git a/tags/development/index.html b/tags/development/index.html new file mode 100644 index 00000000..6e702b0e --- /dev/null +++ b/tags/development/index.html @@ -0,0 +1,134 @@ + + + + + + + + + + development · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/development/index.xml b/tags/development/index.xml new file mode 100644 index 00000000..4084681a --- /dev/null +++ b/tags/development/index.xml @@ -0,0 +1,319 @@ + + + development on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/development/ + Recent content in development on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 02 Apr 2014 00:00:00 +0000 + + + + + + (Hu)go Template Primer + https://sjtug.org/post/goisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/goisforlovers/ + <p>Hugo uses the excellent <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.</p> +<p>This document is a brief primer on using go templates. The <a href="http://golang.org/pkg/html/template/">go docs</a> +provide more details.</p> +<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2> +<p>Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.</p> +<p>A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the <a href="http://golang.org/pkg/html/template/">go docs</a>.</p> +<h2 id="basic-syntax">Basic Syntax</h2> +<p>Go lang templates are html files with the addition of variables and +functions.</p> +<p><strong>Go variables and functions are accessible within {{ }}</strong></p> +<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p> +<pre><code>{{ foo }} +</code></pre> +<p><strong>Parameters are separated using spaces</strong></p> +<p>Calling the add function with input of 1, 2:</p> +<pre><code>{{ add 1 2 }} +</code></pre> +<p><strong>Methods and fields are accessed via dot notation</strong></p> +<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p> +<pre><code>{{ .Params.bar }} +</code></pre> +<p><strong>Parentheses can be used to group items together</strong></p> +<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }} +</code></pre> +<h2 id="variables">Variables</h2> +<p>Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +<a href="https://sjtug.org/layout/variables">variables</a> page.</p> +<p>A variable is accessed by referencing the variable name.</p> +<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt; +</code></pre> +<p>Variables can also be defined and referenced.</p> +<pre><code>{{ $address := &quot;123 Main St.&quot;}} +{{ $address }} +</code></pre> +<h2 id="functions">Functions</h2> +<p>Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. <a href="https://sjtug.org/layout/functions">Hugo template +functions</a> provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ add 1 2 }} +</code></pre> +<h2 id="includes">Includes</h2> +<p>When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ template &quot;chrome/header.html&quot; . }} +</code></pre> +<h2 id="logic">Logic</h2> +<p>Go templates provide the most basic iteration and conditional logic.</p> +<h3 id="iteration">Iteration</h3> +<p>Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.</p> +<p><strong>Example 1: Using Context</strong></p> +<pre><code>{{ range array }} + {{ . }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring value variable name</strong></p> +<pre><code>{{range $element := array}} + {{ $element }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring key and value variable name</strong></p> +<pre><code>{{range $index, $element := array}} + {{ $index }} + {{ $element }} +{{ end }} +</code></pre> +<h3 id="conditionals">Conditionals</h3> +<p>If, else, with, or, &amp; and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p> +<p>Go Templates treat the following values as false:</p> +<ul> +<li>false</li> +<li>0</li> +<li>any array, slice, map, or string of length zero</li> +</ul> +<p><strong>Example 1: If</strong></p> +<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 2: If -&gt; Else</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{else}} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<p><strong>Example 3: And &amp; Or</strong></p> +<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +</code></pre> +<p><strong>Example 4: With</strong></p> +<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent.</p> +<p>The first example above could be simplified as:</p> +<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 5: If -&gt; Else If</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{ else if isset .Params &quot;caption&quot; }} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<h2 id="pipes">Pipes</h2> +<p>One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the +input of the following pipe.</p> +<p>Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.</p> +<p>A few simple examples should help convey how to use the pipe.</p> +<p><strong>Example 1 :</strong></p> +<pre><code>{{ if eq 1 1 }} Same {{ end }} +</code></pre> +<p>is the same as</p> +<pre><code>{{ eq 1 1 | if }} Same {{ end }} +</code></pre> +<p>It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.</p> +<p><strong>Example 2 :</strong></p> +<pre><code>{{ index .Params &quot;disqus_url&quot; | html }} +</code></pre> +<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p> +<p><strong>Example 3 :</strong></p> +<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +Stuff Here +{{ end }} +</code></pre> +<p>Could be rewritten as</p> +<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }} +Stuff Here +{{ end }} +</code></pre> +<h2 id="context-aka-the-dot">Context (aka. the dot)</h2> +<p>The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.</p> +<p><strong>Example:</strong></p> +<pre><code> {{ $title := .Site.Title }} + {{ range .Params.tags }} + &lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt; + {{ end }} +</code></pre> +<p>Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.</p> +<h1 id="hugo-parameters">Hugo Parameters</h1> +<p>Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.</p> +<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2> +<p>In each piece of content you can provide variables to be used by the +templates. This happens in the <a href="https://sjtug.org/content/front-matter">front matter</a>.</p> +<p>An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.</p> +<p>Here is the example front matter:</p> +<pre><code>--- +title: &quot;Permalinks&quot; +date: &quot;2013-11-18&quot; +aliases: + - &quot;/doc/permalinks/&quot; +groups: [&quot;extras&quot;] +groups_weight: 30 +notoc: true +--- +</code></pre><p>Here is the corresponding code inside of the template:</p> +<pre><code> {{ if not .Params.notoc }} + &lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt; + {{ .TableOfContents }} + &lt;/div&gt; + {{ end }} +</code></pre> +<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2> +<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site +parameters, which are values which will be available to you in chrome.</p> +<p>For instance, you might declare:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">params</span>: + <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span> + <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">&#34;spf13&#34;</span> + <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span> +</code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only +provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.</p> +<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt; +&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt; +&lt;/footer&gt;{{end}} +</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent:</p> +<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt; +&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt; +&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot; + alt=&quot;Twitter&quot;&gt;&lt;/a&gt; +&lt;/span&gt;{{end}} +</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do +so, such as in this example:</p> +<pre><code>&lt;nav class=&quot;recent&quot;&gt; + &lt;h1&gt;Recent Posts&lt;/h1&gt; + &lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} + &lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt; + {{end}}&lt;/ul&gt; +&lt;/nav&gt; +</code></pre> + + + + Getting Started with Hugo + https://sjtug.org/post/hugoisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/hugoisforlovers/ + <h2 id="step-1-install-hugo">Step 1. Install Hugo</h2> +<p>Goto <a href="https://github.com/spf13/hugo/releases">hugo releases</a> and download the +appropriate version for your os and architecture.</p> +<p>Save it somewhere specific as we will be using it in the next step.</p> +<p>More complete instructions are available at <a href="https://sjtug.org/overview/installing/">installing hugo</a></p> +<h2 id="step-2-build-the-docs">Step 2. Build the Docs</h2> +<p>Hugo has its own example site which happens to also be the documentation site +you are reading right now.</p> +<p>Follow the following steps:</p> +<ol> +<li>Clone the <a href="http://github.com/spf13/hugo">hugo repository</a></li> +<li>Go into the repo</li> +<li>Run hugo in server mode and build the docs</li> +<li>Open your browser to http://localhost:1313</li> +</ol> +<p>Corresponding pseudo commands:</p> +<pre><code>git clone https://github.com/spf13/hugo +cd hugo +/path/to/where/you/installed/hugo server --source=./docs +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Press ctrl+c to stop +</code></pre> +<p>Once you&rsquo;ve gotten here, follow along the rest of this page on your local build.</p> +<h2 id="step-3-change-the-docs-site">Step 3. Change the docs site</h2> +<p>Stop the Hugo process by hitting ctrl+c.</p> +<p>Now we are going to run hugo again, but this time with hugo in watch mode.</p> +<pre><code>/path/to/hugo/from/step/1/hugo server --source=./docs --watch +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Watching for changes in /Users/spf13/Code/hugo/docs/content +&gt; Press ctrl+c to stop +</code></pre> +<p>Open your <a href="http://vim.spf13.com">favorite editor</a> and change one of the source +content pages. How about changing this very file to <em>fix the typo</em>. How about changing this very file to <em>fix the typo</em>.</p> +<p>Content files are found in <code>docs/content/</code>. Unless otherwise specified, files +are located at the same relative location as the url, in our case +<code>docs/content/overview/quickstart.md</code>.</p> +<p>Change and save this file.. Notice what happened in your terminal.</p> +<pre><code>&gt; Change detected, rebuilding site + +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 26 ms +</code></pre> +<p>Refresh the browser and observe that the typo is now fixed.</p> +<p>Notice how quick that was. Try to refresh the site before it&rsquo;s finished building.. I double dare you. +Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.</p> +<h2 id="step-4-have-fun">Step 4. Have fun</h2> +<p>The best way to learn something is to play with it.</p> + + + + + \ No newline at end of file diff --git a/tags/development/page/1/index.html b/tags/development/page/1/index.html new file mode 100644 index 00000000..65e49fa6 --- /dev/null +++ b/tags/development/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/development/ \ No newline at end of file diff --git a/tags/dining/index.html b/tags/dining/index.html new file mode 100644 index 00000000..50fa20cb --- /dev/null +++ b/tags/dining/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + dining · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/dining/index.xml b/tags/dining/index.xml new file mode 100644 index 00000000..29b6334e --- /dev/null +++ b/tags/dining/index.xml @@ -0,0 +1,25 @@ + + + dining on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/dining/ + Recent content in dining on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Tue, 21 Feb 2017 19:41:47 +0800 + + + + + + SJTUG开学聚餐 + https://sjtug.org/post/2017-02-21-hotpot/ + Tue, 21 Feb 2017 19:41:47 +0800 + + https://sjtug.org/post/2017-02-21-hotpot/ + <p>又到了开学聚餐的时间啦!这次聚餐还是定在欧尚部落情,在本周六(25日)晚5:30GMT+8于拖鞋门前旗杆下集合。欢迎各位过来吃锅!</p> +<p>如果时间安排不合适,可以填写<a href="https://goo.gl/forms/tXNbYezH0pOeAHe83">这个表单</a>。如果时间冲突的同学多的话可能会进行调整</p> + + + + + \ No newline at end of file diff --git a/tags/dining/page/1/index.html b/tags/dining/page/1/index.html new file mode 100644 index 00000000..81f6769f --- /dev/null +++ b/tags/dining/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/dining/ \ No newline at end of file diff --git a/tags/go/index.html b/tags/go/index.html new file mode 100644 index 00000000..388ca38b --- /dev/null +++ b/tags/go/index.html @@ -0,0 +1,134 @@ + + + + + + + + + + go · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/go/index.xml b/tags/go/index.xml new file mode 100644 index 00000000..2cb5b352 --- /dev/null +++ b/tags/go/index.xml @@ -0,0 +1,319 @@ + + + go on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/go/ + Recent content in go on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 02 Apr 2014 00:00:00 +0000 + + + + + + (Hu)go Template Primer + https://sjtug.org/post/goisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/goisforlovers/ + <p>Hugo uses the excellent <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.</p> +<p>This document is a brief primer on using go templates. The <a href="http://golang.org/pkg/html/template/">go docs</a> +provide more details.</p> +<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2> +<p>Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.</p> +<p>A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the <a href="http://golang.org/pkg/html/template/">go docs</a>.</p> +<h2 id="basic-syntax">Basic Syntax</h2> +<p>Go lang templates are html files with the addition of variables and +functions.</p> +<p><strong>Go variables and functions are accessible within {{ }}</strong></p> +<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p> +<pre><code>{{ foo }} +</code></pre> +<p><strong>Parameters are separated using spaces</strong></p> +<p>Calling the add function with input of 1, 2:</p> +<pre><code>{{ add 1 2 }} +</code></pre> +<p><strong>Methods and fields are accessed via dot notation</strong></p> +<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p> +<pre><code>{{ .Params.bar }} +</code></pre> +<p><strong>Parentheses can be used to group items together</strong></p> +<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }} +</code></pre> +<h2 id="variables">Variables</h2> +<p>Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +<a href="https://sjtug.org/layout/variables">variables</a> page.</p> +<p>A variable is accessed by referencing the variable name.</p> +<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt; +</code></pre> +<p>Variables can also be defined and referenced.</p> +<pre><code>{{ $address := &quot;123 Main St.&quot;}} +{{ $address }} +</code></pre> +<h2 id="functions">Functions</h2> +<p>Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. <a href="https://sjtug.org/layout/functions">Hugo template +functions</a> provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ add 1 2 }} +</code></pre> +<h2 id="includes">Includes</h2> +<p>When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ template &quot;chrome/header.html&quot; . }} +</code></pre> +<h2 id="logic">Logic</h2> +<p>Go templates provide the most basic iteration and conditional logic.</p> +<h3 id="iteration">Iteration</h3> +<p>Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.</p> +<p><strong>Example 1: Using Context</strong></p> +<pre><code>{{ range array }} + {{ . }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring value variable name</strong></p> +<pre><code>{{range $element := array}} + {{ $element }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring key and value variable name</strong></p> +<pre><code>{{range $index, $element := array}} + {{ $index }} + {{ $element }} +{{ end }} +</code></pre> +<h3 id="conditionals">Conditionals</h3> +<p>If, else, with, or, &amp; and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p> +<p>Go Templates treat the following values as false:</p> +<ul> +<li>false</li> +<li>0</li> +<li>any array, slice, map, or string of length zero</li> +</ul> +<p><strong>Example 1: If</strong></p> +<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 2: If -&gt; Else</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{else}} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<p><strong>Example 3: And &amp; Or</strong></p> +<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +</code></pre> +<p><strong>Example 4: With</strong></p> +<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent.</p> +<p>The first example above could be simplified as:</p> +<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 5: If -&gt; Else If</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{ else if isset .Params &quot;caption&quot; }} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<h2 id="pipes">Pipes</h2> +<p>One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the +input of the following pipe.</p> +<p>Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.</p> +<p>A few simple examples should help convey how to use the pipe.</p> +<p><strong>Example 1 :</strong></p> +<pre><code>{{ if eq 1 1 }} Same {{ end }} +</code></pre> +<p>is the same as</p> +<pre><code>{{ eq 1 1 | if }} Same {{ end }} +</code></pre> +<p>It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.</p> +<p><strong>Example 2 :</strong></p> +<pre><code>{{ index .Params &quot;disqus_url&quot; | html }} +</code></pre> +<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p> +<p><strong>Example 3 :</strong></p> +<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +Stuff Here +{{ end }} +</code></pre> +<p>Could be rewritten as</p> +<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }} +Stuff Here +{{ end }} +</code></pre> +<h2 id="context-aka-the-dot">Context (aka. the dot)</h2> +<p>The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.</p> +<p><strong>Example:</strong></p> +<pre><code> {{ $title := .Site.Title }} + {{ range .Params.tags }} + &lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt; + {{ end }} +</code></pre> +<p>Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.</p> +<h1 id="hugo-parameters">Hugo Parameters</h1> +<p>Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.</p> +<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2> +<p>In each piece of content you can provide variables to be used by the +templates. This happens in the <a href="https://sjtug.org/content/front-matter">front matter</a>.</p> +<p>An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.</p> +<p>Here is the example front matter:</p> +<pre><code>--- +title: &quot;Permalinks&quot; +date: &quot;2013-11-18&quot; +aliases: + - &quot;/doc/permalinks/&quot; +groups: [&quot;extras&quot;] +groups_weight: 30 +notoc: true +--- +</code></pre><p>Here is the corresponding code inside of the template:</p> +<pre><code> {{ if not .Params.notoc }} + &lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt; + {{ .TableOfContents }} + &lt;/div&gt; + {{ end }} +</code></pre> +<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2> +<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site +parameters, which are values which will be available to you in chrome.</p> +<p>For instance, you might declare:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">params</span>: + <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span> + <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">&#34;spf13&#34;</span> + <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span> +</code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only +provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.</p> +<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt; +&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt; +&lt;/footer&gt;{{end}} +</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent:</p> +<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt; +&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt; +&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot; + alt=&quot;Twitter&quot;&gt;&lt;/a&gt; +&lt;/span&gt;{{end}} +</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do +so, such as in this example:</p> +<pre><code>&lt;nav class=&quot;recent&quot;&gt; + &lt;h1&gt;Recent Posts&lt;/h1&gt; + &lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} + &lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt; + {{end}}&lt;/ul&gt; +&lt;/nav&gt; +</code></pre> + + + + Getting Started with Hugo + https://sjtug.org/post/hugoisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/hugoisforlovers/ + <h2 id="step-1-install-hugo">Step 1. Install Hugo</h2> +<p>Goto <a href="https://github.com/spf13/hugo/releases">hugo releases</a> and download the +appropriate version for your os and architecture.</p> +<p>Save it somewhere specific as we will be using it in the next step.</p> +<p>More complete instructions are available at <a href="https://sjtug.org/overview/installing/">installing hugo</a></p> +<h2 id="step-2-build-the-docs">Step 2. Build the Docs</h2> +<p>Hugo has its own example site which happens to also be the documentation site +you are reading right now.</p> +<p>Follow the following steps:</p> +<ol> +<li>Clone the <a href="http://github.com/spf13/hugo">hugo repository</a></li> +<li>Go into the repo</li> +<li>Run hugo in server mode and build the docs</li> +<li>Open your browser to http://localhost:1313</li> +</ol> +<p>Corresponding pseudo commands:</p> +<pre><code>git clone https://github.com/spf13/hugo +cd hugo +/path/to/where/you/installed/hugo server --source=./docs +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Press ctrl+c to stop +</code></pre> +<p>Once you&rsquo;ve gotten here, follow along the rest of this page on your local build.</p> +<h2 id="step-3-change-the-docs-site">Step 3. Change the docs site</h2> +<p>Stop the Hugo process by hitting ctrl+c.</p> +<p>Now we are going to run hugo again, but this time with hugo in watch mode.</p> +<pre><code>/path/to/hugo/from/step/1/hugo server --source=./docs --watch +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Watching for changes in /Users/spf13/Code/hugo/docs/content +&gt; Press ctrl+c to stop +</code></pre> +<p>Open your <a href="http://vim.spf13.com">favorite editor</a> and change one of the source +content pages. How about changing this very file to <em>fix the typo</em>. How about changing this very file to <em>fix the typo</em>.</p> +<p>Content files are found in <code>docs/content/</code>. Unless otherwise specified, files +are located at the same relative location as the url, in our case +<code>docs/content/overview/quickstart.md</code>.</p> +<p>Change and save this file.. Notice what happened in your terminal.</p> +<pre><code>&gt; Change detected, rebuilding site + +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 26 ms +</code></pre> +<p>Refresh the browser and observe that the typo is now fixed.</p> +<p>Notice how quick that was. Try to refresh the site before it&rsquo;s finished building.. I double dare you. +Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.</p> +<h2 id="step-4-have-fun">Step 4. Have fun</h2> +<p>The best way to learn something is to play with it.</p> + + + + + \ No newline at end of file diff --git a/tags/go/page/1/index.html b/tags/go/page/1/index.html new file mode 100644 index 00000000..1d3f8929 --- /dev/null +++ b/tags/go/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/go/ \ No newline at end of file diff --git a/tags/golang/index.html b/tags/golang/index.html new file mode 100644 index 00000000..a7868d85 --- /dev/null +++ b/tags/golang/index.html @@ -0,0 +1,134 @@ + + + + + + + + + + golang · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/golang/index.xml b/tags/golang/index.xml new file mode 100644 index 00000000..41d54d0a --- /dev/null +++ b/tags/golang/index.xml @@ -0,0 +1,319 @@ + + + golang on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/golang/ + Recent content in golang on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 02 Apr 2014 00:00:00 +0000 + + + + + + (Hu)go Template Primer + https://sjtug.org/post/goisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/goisforlovers/ + <p>Hugo uses the excellent <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.</p> +<p>This document is a brief primer on using go templates. The <a href="http://golang.org/pkg/html/template/">go docs</a> +provide more details.</p> +<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2> +<p>Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.</p> +<p>A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the <a href="http://golang.org/pkg/html/template/">go docs</a>.</p> +<h2 id="basic-syntax">Basic Syntax</h2> +<p>Go lang templates are html files with the addition of variables and +functions.</p> +<p><strong>Go variables and functions are accessible within {{ }}</strong></p> +<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p> +<pre><code>{{ foo }} +</code></pre> +<p><strong>Parameters are separated using spaces</strong></p> +<p>Calling the add function with input of 1, 2:</p> +<pre><code>{{ add 1 2 }} +</code></pre> +<p><strong>Methods and fields are accessed via dot notation</strong></p> +<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p> +<pre><code>{{ .Params.bar }} +</code></pre> +<p><strong>Parentheses can be used to group items together</strong></p> +<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }} +</code></pre> +<h2 id="variables">Variables</h2> +<p>Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +<a href="https://sjtug.org/layout/variables">variables</a> page.</p> +<p>A variable is accessed by referencing the variable name.</p> +<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt; +</code></pre> +<p>Variables can also be defined and referenced.</p> +<pre><code>{{ $address := &quot;123 Main St.&quot;}} +{{ $address }} +</code></pre> +<h2 id="functions">Functions</h2> +<p>Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. <a href="https://sjtug.org/layout/functions">Hugo template +functions</a> provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ add 1 2 }} +</code></pre> +<h2 id="includes">Includes</h2> +<p>When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ template &quot;chrome/header.html&quot; . }} +</code></pre> +<h2 id="logic">Logic</h2> +<p>Go templates provide the most basic iteration and conditional logic.</p> +<h3 id="iteration">Iteration</h3> +<p>Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.</p> +<p><strong>Example 1: Using Context</strong></p> +<pre><code>{{ range array }} + {{ . }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring value variable name</strong></p> +<pre><code>{{range $element := array}} + {{ $element }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring key and value variable name</strong></p> +<pre><code>{{range $index, $element := array}} + {{ $index }} + {{ $element }} +{{ end }} +</code></pre> +<h3 id="conditionals">Conditionals</h3> +<p>If, else, with, or, &amp; and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p> +<p>Go Templates treat the following values as false:</p> +<ul> +<li>false</li> +<li>0</li> +<li>any array, slice, map, or string of length zero</li> +</ul> +<p><strong>Example 1: If</strong></p> +<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 2: If -&gt; Else</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{else}} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<p><strong>Example 3: And &amp; Or</strong></p> +<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +</code></pre> +<p><strong>Example 4: With</strong></p> +<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent.</p> +<p>The first example above could be simplified as:</p> +<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 5: If -&gt; Else If</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{ else if isset .Params &quot;caption&quot; }} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<h2 id="pipes">Pipes</h2> +<p>One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the +input of the following pipe.</p> +<p>Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.</p> +<p>A few simple examples should help convey how to use the pipe.</p> +<p><strong>Example 1 :</strong></p> +<pre><code>{{ if eq 1 1 }} Same {{ end }} +</code></pre> +<p>is the same as</p> +<pre><code>{{ eq 1 1 | if }} Same {{ end }} +</code></pre> +<p>It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.</p> +<p><strong>Example 2 :</strong></p> +<pre><code>{{ index .Params &quot;disqus_url&quot; | html }} +</code></pre> +<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p> +<p><strong>Example 3 :</strong></p> +<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +Stuff Here +{{ end }} +</code></pre> +<p>Could be rewritten as</p> +<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }} +Stuff Here +{{ end }} +</code></pre> +<h2 id="context-aka-the-dot">Context (aka. the dot)</h2> +<p>The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.</p> +<p><strong>Example:</strong></p> +<pre><code> {{ $title := .Site.Title }} + {{ range .Params.tags }} + &lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt; + {{ end }} +</code></pre> +<p>Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.</p> +<h1 id="hugo-parameters">Hugo Parameters</h1> +<p>Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.</p> +<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2> +<p>In each piece of content you can provide variables to be used by the +templates. This happens in the <a href="https://sjtug.org/content/front-matter">front matter</a>.</p> +<p>An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.</p> +<p>Here is the example front matter:</p> +<pre><code>--- +title: &quot;Permalinks&quot; +date: &quot;2013-11-18&quot; +aliases: + - &quot;/doc/permalinks/&quot; +groups: [&quot;extras&quot;] +groups_weight: 30 +notoc: true +--- +</code></pre><p>Here is the corresponding code inside of the template:</p> +<pre><code> {{ if not .Params.notoc }} + &lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt; + {{ .TableOfContents }} + &lt;/div&gt; + {{ end }} +</code></pre> +<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2> +<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site +parameters, which are values which will be available to you in chrome.</p> +<p>For instance, you might declare:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">params</span>: + <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span> + <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">&#34;spf13&#34;</span> + <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span> +</code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only +provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.</p> +<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt; +&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt; +&lt;/footer&gt;{{end}} +</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent:</p> +<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt; +&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt; +&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot; + alt=&quot;Twitter&quot;&gt;&lt;/a&gt; +&lt;/span&gt;{{end}} +</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do +so, such as in this example:</p> +<pre><code>&lt;nav class=&quot;recent&quot;&gt; + &lt;h1&gt;Recent Posts&lt;/h1&gt; + &lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} + &lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt; + {{end}}&lt;/ul&gt; +&lt;/nav&gt; +</code></pre> + + + + Getting Started with Hugo + https://sjtug.org/post/hugoisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/hugoisforlovers/ + <h2 id="step-1-install-hugo">Step 1. Install Hugo</h2> +<p>Goto <a href="https://github.com/spf13/hugo/releases">hugo releases</a> and download the +appropriate version for your os and architecture.</p> +<p>Save it somewhere specific as we will be using it in the next step.</p> +<p>More complete instructions are available at <a href="https://sjtug.org/overview/installing/">installing hugo</a></p> +<h2 id="step-2-build-the-docs">Step 2. Build the Docs</h2> +<p>Hugo has its own example site which happens to also be the documentation site +you are reading right now.</p> +<p>Follow the following steps:</p> +<ol> +<li>Clone the <a href="http://github.com/spf13/hugo">hugo repository</a></li> +<li>Go into the repo</li> +<li>Run hugo in server mode and build the docs</li> +<li>Open your browser to http://localhost:1313</li> +</ol> +<p>Corresponding pseudo commands:</p> +<pre><code>git clone https://github.com/spf13/hugo +cd hugo +/path/to/where/you/installed/hugo server --source=./docs +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Press ctrl+c to stop +</code></pre> +<p>Once you&rsquo;ve gotten here, follow along the rest of this page on your local build.</p> +<h2 id="step-3-change-the-docs-site">Step 3. Change the docs site</h2> +<p>Stop the Hugo process by hitting ctrl+c.</p> +<p>Now we are going to run hugo again, but this time with hugo in watch mode.</p> +<pre><code>/path/to/hugo/from/step/1/hugo server --source=./docs --watch +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Watching for changes in /Users/spf13/Code/hugo/docs/content +&gt; Press ctrl+c to stop +</code></pre> +<p>Open your <a href="http://vim.spf13.com">favorite editor</a> and change one of the source +content pages. How about changing this very file to <em>fix the typo</em>. How about changing this very file to <em>fix the typo</em>.</p> +<p>Content files are found in <code>docs/content/</code>. Unless otherwise specified, files +are located at the same relative location as the url, in our case +<code>docs/content/overview/quickstart.md</code>.</p> +<p>Change and save this file.. Notice what happened in your terminal.</p> +<pre><code>&gt; Change detected, rebuilding site + +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 26 ms +</code></pre> +<p>Refresh the browser and observe that the typo is now fixed.</p> +<p>Notice how quick that was. Try to refresh the site before it&rsquo;s finished building.. I double dare you. +Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.</p> +<h2 id="step-4-have-fun">Step 4. Have fun</h2> +<p>The best way to learn something is to play with it.</p> + + + + + \ No newline at end of file diff --git a/tags/golang/page/1/index.html b/tags/golang/page/1/index.html new file mode 100644 index 00000000..76bf8b56 --- /dev/null +++ b/tags/golang/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/golang/ \ No newline at end of file diff --git a/tags/guide/index.html b/tags/guide/index.html new file mode 100644 index 00000000..ba5f33d9 --- /dev/null +++ b/tags/guide/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + guide · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/guide/index.xml b/tags/guide/index.xml new file mode 100644 index 00000000..ca5f74ea --- /dev/null +++ b/tags/guide/index.xml @@ -0,0 +1,43 @@ + + + guide on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/guide/ + Recent content in guide on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Sun, 15 Jan 2017 23:12:56 +0800 + + + + + + sjtug.org写作指南 + https://sjtug.org/post/2017-01-15-writing-guide/ + Sun, 15 Jan 2017 23:12:56 +0800 + + https://sjtug.org/post/2017-01-15-writing-guide/ + <p>这里介绍了一下发布新文章的步骤</p> +<h2 id="安装hugo-或直接新建文章">安装Hugo, 或直接新建文章</h2> +<p>安装<code>hugo</code>然后<code>hugo new post/YYYY-MM-DD-article-title.md</code>;或直接新建<code>content/post/YYYY-MM-DD-article-title.md</code>,手动指定<code>date</code></p> +<p>软件源新闻放在<code>content/post/mirror-news</code>下面,带上<code>mirror-news</code>的tag。</p> +<p>软件源帮助放在<code>content/post/mirror-help</code>下面,带上<code>mirror-help</code>的tag,title设定成和name相同(注意大小写)。</p> +<h2 id="front-matters">Front matters</h2> +<p>头部<code>+++</code>的front matters部分,可以指定的部分有:</p> +<ul> +<li><code>title = &quot;article title&quot;</code> 必填</li> +<li><code>author = &quot;htfy96&quot;</code> 必填</li> +<li><code>tags = [&quot;tag1&quot;, &quot;tag2&quot;]</code> 建议填写,只有包含<code>news</code> tag的文章才会在首页显示,其它常用tag包括<code>announcement</code>, <code>guide</code>, <code>sharing</code>等</li> +<li><code>activity_time = &quot;2017-01-08T15:00:00+08:00&quot;</code>,格式同date,当有<code>sharing</code>标签时建议填写,代表活动开始时间</li> +<li><code>activity_place = &quot;Main Library&quot;</code>,同上,代表活动地点</li> +<li><code>draft = true</code>,当不想立即发布时才填写,默认情况<code>false</code>不用填写</li> +</ul> +<h2 id="测试并提交">测试并提交</h2> +<ul> +<li>使用<code>hugo server</code>看看最终效果是否理想</li> +<li>提交到 <a href="https://github.com/sjtug/portal">https://github.com/sjtug/portal</a> ,主页会自动生成到sjtug.org</li> +</ul> + + + + + \ No newline at end of file diff --git a/tags/guide/page/1/index.html b/tags/guide/page/1/index.html new file mode 100644 index 00000000..46a9a9ff --- /dev/null +++ b/tags/guide/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/guide/ \ No newline at end of file diff --git a/tags/hugo/index.html b/tags/hugo/index.html new file mode 100644 index 00000000..192702f3 --- /dev/null +++ b/tags/hugo/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + hugo · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/hugo/index.xml b/tags/hugo/index.xml new file mode 100644 index 00000000..2e89c563 --- /dev/null +++ b/tags/hugo/index.xml @@ -0,0 +1,77 @@ + + + hugo on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/hugo/ + Recent content in hugo on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 02 Apr 2014 00:00:00 +0000 + + + + + + Getting Started with Hugo + https://sjtug.org/post/hugoisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/hugoisforlovers/ + <h2 id="step-1-install-hugo">Step 1. Install Hugo</h2> +<p>Goto <a href="https://github.com/spf13/hugo/releases">hugo releases</a> and download the +appropriate version for your os and architecture.</p> +<p>Save it somewhere specific as we will be using it in the next step.</p> +<p>More complete instructions are available at <a href="https://sjtug.org/overview/installing/">installing hugo</a></p> +<h2 id="step-2-build-the-docs">Step 2. Build the Docs</h2> +<p>Hugo has its own example site which happens to also be the documentation site +you are reading right now.</p> +<p>Follow the following steps:</p> +<ol> +<li>Clone the <a href="http://github.com/spf13/hugo">hugo repository</a></li> +<li>Go into the repo</li> +<li>Run hugo in server mode and build the docs</li> +<li>Open your browser to http://localhost:1313</li> +</ol> +<p>Corresponding pseudo commands:</p> +<pre><code>git clone https://github.com/spf13/hugo +cd hugo +/path/to/where/you/installed/hugo server --source=./docs +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Press ctrl+c to stop +</code></pre> +<p>Once you&rsquo;ve gotten here, follow along the rest of this page on your local build.</p> +<h2 id="step-3-change-the-docs-site">Step 3. Change the docs site</h2> +<p>Stop the Hugo process by hitting ctrl+c.</p> +<p>Now we are going to run hugo again, but this time with hugo in watch mode.</p> +<pre><code>/path/to/hugo/from/step/1/hugo server --source=./docs --watch +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 27 ms +&gt; Web Server is available at http://localhost:1313 +&gt; Watching for changes in /Users/spf13/Code/hugo/docs/content +&gt; Press ctrl+c to stop +</code></pre> +<p>Open your <a href="http://vim.spf13.com">favorite editor</a> and change one of the source +content pages. How about changing this very file to <em>fix the typo</em>. How about changing this very file to <em>fix the typo</em>.</p> +<p>Content files are found in <code>docs/content/</code>. Unless otherwise specified, files +are located at the same relative location as the url, in our case +<code>docs/content/overview/quickstart.md</code>.</p> +<p>Change and save this file.. Notice what happened in your terminal.</p> +<pre><code>&gt; Change detected, rebuilding site + +&gt; 29 pages created +&gt; 0 tags index created +&gt; in 26 ms +</code></pre> +<p>Refresh the browser and observe that the typo is now fixed.</p> +<p>Notice how quick that was. Try to refresh the site before it&rsquo;s finished building.. I double dare you. +Having nearly instant feedback enables you to have your creativity flow without waiting for long builds.</p> +<h2 id="step-4-have-fun">Step 4. Have fun</h2> +<p>The best way to learn something is to play with it.</p> + + + + + \ No newline at end of file diff --git a/tags/hugo/page/1/index.html b/tags/hugo/page/1/index.html new file mode 100644 index 00000000..da6c1c1f --- /dev/null +++ b/tags/hugo/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/hugo/ \ No newline at end of file diff --git a/tags/index.html b/tags/index.html new file mode 100644 index 00000000..c8da8d55 --- /dev/null +++ b/tags/index.html @@ -0,0 +1,239 @@ + + + + + + + + + + Tags · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/index.xml b/tags/index.xml new file mode 100644 index 00000000..2103ad60 --- /dev/null +++ b/tags/index.xml @@ -0,0 +1,140 @@ + + + Tags on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/ + Recent content in Tags on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Thu, 02 Nov 2023 12:08:00 -0700 + + + + + + mirror-news + https://sjtug.org/tags/mirror-news/ + Thu, 02 Nov 2023 12:08:00 -0700 + + https://sjtug.org/tags/mirror-news/ + + + + + news + https://sjtug.org/tags/news/ + Mon, 19 Jun 2023 21:00:00 +0800 + + https://sjtug.org/tags/news/ + + + + + sharing + https://sjtug.org/tags/sharing/ + Mon, 19 Jun 2023 21:00:00 +0800 + + https://sjtug.org/tags/sharing/ + + + + + mirror-help + https://sjtug.org/tags/mirror-help/ + Thu, 08 Jun 2023 18:27:00 +0800 + + https://sjtug.org/tags/mirror-help/ + + + + + summer_school + https://sjtug.org/tags/summer_school/ + Wed, 06 Jun 2018 19:35:00 +0800 + + https://sjtug.org/tags/summer_school/ + + + + + dining + https://sjtug.org/tags/dining/ + Tue, 21 Feb 2017 19:41:47 +0800 + + https://sjtug.org/tags/dining/ + + + + + guide + https://sjtug.org/tags/guide/ + Sun, 15 Jan 2017 23:12:56 +0800 + + https://sjtug.org/tags/guide/ + + + + + announcement + https://sjtug.org/tags/announcement/ + Sat, 14 Jan 2017 20:55:00 +0800 + + https://sjtug.org/tags/announcement/ + + + + + development + https://sjtug.org/tags/development/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/tags/development/ + + + + + go + https://sjtug.org/tags/go/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/tags/go/ + + + + + golang + https://sjtug.org/tags/golang/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/tags/golang/ + + + + + hugo + https://sjtug.org/tags/hugo/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/tags/hugo/ + + + + + templates + https://sjtug.org/tags/templates/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/tags/templates/ + + + + + themes + https://sjtug.org/tags/themes/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/tags/themes/ + + + + + \ No newline at end of file diff --git a/tags/mirror-help/index.html b/tags/mirror-help/index.html new file mode 100644 index 00000000..996cca0b --- /dev/null +++ b/tags/mirror-help/index.html @@ -0,0 +1,239 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/index.xml b/tags/mirror-help/index.xml new file mode 100644 index 00000000..aaabd81d --- /dev/null +++ b/tags/mirror-help/index.xml @@ -0,0 +1,1769 @@ + + + mirror-help on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/mirror-help/ + Recent content in mirror-help on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Thu, 08 Jun 2023 18:27:00 +0800 + + + + + + pop-os + https://sjtug.org/post/mirror-help/pop-os/ + Thu, 08 Jun 2023 18:27:00 +0800 + + https://sjtug.org/post/mirror-help/pop-os/ + <p>PopOS 是 system76 公司基于 ubuntu 开发的衍生版,具有称为 COSMIC 的定制 GNOME桌面环境,内置大量的库和开发工具。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#e6db74">&#39;s@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/pop-os/@g&#39;</span> /etc/apt/sources.list.d/pop-os-apps.sources +sed -i <span style="color:#e6db74">&#39;s@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/pop-os/@g&#39;</span> /etc/apt/sources.list.d/pop-os-release.sources +sed -i <span style="color:#e6db74">&#39;s@http://apt.pop-os.org/@https://mirror.sjtu.edu.cn/@g&#39;</span> /etc/apt/sources.list.d/system.sources +</code></pre></div> + + + + docker-ce + https://sjtug.org/post/mirror-help/docker-ce/ + Sat, 21 Aug 2021 00:33:00 +0800 + + https://sjtug.org/post/mirror-help/docker-ce/ + <h1 id="docker-community-edition-镜像使用帮助">Docker Community Edition 镜像使用帮助</h1> +<p><strong>注意: 本镜像只提供 Debian/Ubuntu/Fedora/CentOS/RHEL 的 docker 软件包,非 dockerhub</strong></p> +<h2 id="debianubuntu-用户">Debian/Ubuntu 用户</h2> +<p>以下内容根据 <a href="https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/">TUNA文档</a> 修改而来。</p> +<p>如果你过去安装过 docker,先删掉:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo apt-get remove docker docker-engine docker.io +</code></pre></div><p>首先安装依赖:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common +</code></pre></div><p>根据你的发行版,下面的内容有所不同。你使用的发行版:</p> +<details><summary>Debian</summary> +信任 Docker 的 GPG 公钥: +<pre>curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -</pre> +对于 amd64 架构的计算机,添加软件仓库: +<pre> +sudo add-apt-repository \ + "deb [arch=amd64] https://mirror.sjtu.edu.cn/docker-ce/linux/debian \ + $(lsb_release -cs) \ + stable" +</pre> +如果你用的是树莓派或其它ARM架构计算机,请运行: +<pre> +echo "deb [arch=armhf] https://mirror.sjtu.edu.cn/docker-ce/linux/debian \ + $(lsb_release -cs) stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list +</pre> +最后安装 +<pre> +sudo apt-get update +sudo apt-get install docker-ce +</pre> +</details> +<details><summary>Ubuntu</summary> +信任 Docker 的 GPG 公钥: +<pre>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</pre> +对于 amd64 架构的计算机,添加软件仓库: +<pre> +sudo add-apt-repository \ + "deb [arch=amd64] https://mirror.sjtu.edu.cn/docker-ce/linux/ubuntu \ + $(lsb_release -cs) \ + stable" +</pre> +如果你用的是树莓派或其它ARM架构计算机,请运行: +<pre> +echo "deb [arch=armhf] https://mirror.sjtu.edu.cn/docker-ce/linux/ubuntu \ + $(lsb_release -cs) stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list +</pre> +最后安装 +<pre> +sudo apt-get update +sudo apt-get install docker-ce +</pre> +</details> +<h2 id="fedoracentosrhel">Fedora/CentOS/RHEL</h2> +<p>以下内容根据<a href="https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/">TUNA文档</a>修改而来。</p> +<p>如果你之前安装过 docker,请先删掉</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo yum remove docker docker-common docker-selinux docker-engine +</code></pre></div><p>安装一些依赖</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo yum install -y yum-utils device-mapper-persistent-data lvm2 +</code></pre></div><p>根据你的发行版下载repo文件:</p> +<details><summary>CentOS/RHEL</summary> +<pre> +wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo +</pre> +</details> +<details><summary>Fedora</summary> +<pre> +wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/fedora/docker-ce.repo +</pre> +</details> +<p>把软件仓库地址替换为 SJTUG:</p> +<pre> +sudo sed -i 's+download.docker.com+mirror.sjtu.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo +</pre> +<p>最后安装:</p> +<pre> +sudo yum makecache fast +sudo yum install docker-ce +</pre> + + + + + alpine + https://sjtug.org/post/mirror-help/alpine/ + Sat, 17 Apr 2021 17:44:00 +0800 + + https://sjtug.org/post/mirror-help/alpine/ + <p>Alpine Linux 是一个面向安全,轻量级的基于musl libc与busybox项目的Linux发行版。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -i <span style="color:#e6db74">&#39;s/dl-cdn.alpinelinux.org/mirrors.sjtug.sjtu.edu.cn/g&#39;</span> /etc/apk/repositories +</code></pre></div> + + + + ghcup + https://sjtug.org/post/mirror-help/ghcup/ + Tue, 30 Mar 2021 23:50:00 +0800 + + https://sjtug.org/post/mirror-help/ghcup/ + <p>Ghcup 是一种用于安装 Haskell 的工具,它使得用户可以轻易地在 GNU/Linux、macOS 和 FreeBSD 上安装特定版本的 ghc,并从零开始搭建好一个全新的 Haskell 开发环境(包括 cabal 与 HLS 支持)。</p> +<p><strong>使用说明</strong></p> +<p>创建 <code>~/.ghcup/config.yaml</code> 并输入以下内容</p> +<pre><code>url-source: + OwnSource: &quot;https://mirror.sjtu.edu.cn/ghcup/yaml/ghcup/data/ghcup-0.0.6.yaml&quot; +</code></pre><p>如果您尚未安装 ghcup,请在完成以上步骤后,于终端中执行以下指令(请不要以 root 用户执行),随后跟随屏幕上的指引完成安装。</p> +<ul> +<li>如果您运行的是 Linux, macOS (Intel), FreeBSD 或 WSL,请执行</li> +</ul> +<pre><code>curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | sh +</code></pre><ul> +<li>如果您运行的是 macOS (Apple 芯片) 请执行</li> +</ul> +<pre><code>curl --proto '=https' --tlsv1.2 -LsSf https://mirror.sjtu.edu.cn/ghcup/script/install.sh | arch -x86_64 /bin/bash +</code></pre><p><strong>故障排除</strong></p> +<ol> +<li>ghcup 出现形如 <code>[ Error ] JSON decoding failed with: AesonException</code> 的错误</li> +</ol> +<p>这可能是由于本机 ghcup 版本与配置文件版本不匹配造成。 +ghcup 于 0.1.15.1 版本前使用 0.0.4 版本的配置文件,此版本及之后的版本使用 0.0.5+ 版本的配置文件。 +请尝试将 <code>config.yaml</code> 中的 <code>ghcup-0.0.6.yaml</code> 改为 <code>ghcup-0.0.4.yaml</code> (抑或反之)后重试。</p> +<p>请注意,ghcup 上游倾向于仅更新最新版本配置文件中的内容,当版本发生变化后请及时更新配置文件版本。</p> +<ol start="2"> +<li>通过 ghcup 安装软件包时出现 <code>Error: Download failed ...</code> 错误</li> +</ol> +<p>这一错误可能是由于您的 ghcup 版本过老,使用的配置文件已经长久未更新,其中包含的软件包版本过旧所致。我们将尽力保留旧版本的软件包,但当存储空间不足时,可能随时删除旧文件。本镜像站仅保证同步最新版本配置文件中包含的软件包。</p> +<p>当出现上述现象时,请首先尝试更新 ghcup 的版本,并根据 <code>故障排除 1</code> 的指示修改配置文件。若 ghcup 已无法更新,可以尝试删除 <code>~/.ghcup</code> 整个文件夹(这一操作将删除 ghcup 以及所有通过 ghcup 安装的软件),并根据 <code>使用说明</code> 重新安装最新版本的 ghcup。</p> +<p>若完成以上步骤后问题仍未解决,请至 <a href="https://github.com/sjtug/mirror-requests">此处</a> 向我们反馈 BUG。</p> + + + + + qt + https://sjtug.org/post/mirror-help/qt/ + Mon, 22 Feb 2021 11:00:00 +0800 + + https://sjtug.org/post/mirror-help/qt/ + <p>通常来说,Qt 在线安装器会自动选择最近的镜像,因此无需做特殊设置即可使用 SJTUG Qt 镜像。</p> +<p>你可以通过下面的方法手动指定 Qt 镜像。</p> +<ul> +<li>使用离线安装器安装:在 <a href="https://www.qt.io/offline-installers">Offline Installers</a> 页面中找到需要下载的版本,并将链接中的 +<code>http://download.qt.io</code> 替换为 <code>https://mirrors.sjtug.sjtu.edu.cn/qt</code>。</li> +<li>使用在线安装器安装:参考 <a href="https://wiki.qt.io/Online_Installer_4.x#Selecting_a_mirror_for_opensource">Qt Wiki</a>, +在命令行中给安装器提供 <code>--mirror https://mirrors.sjtug.sjtu.edu.cn/qt</code> 的参数。比如在 macOS 上:</li> +</ul> +<pre><code>./qt-unified-macOS-x86_64-4.0.1-1-online.app/Contents/MacOS/qt-unified-macOS-x86_64-4.0.1-1-online --mirror https://mirrors.sjtug.sjtu.edu.cn/qt +</code></pre> + + + + fedora-ostree + https://sjtug.org/post/mirror-help/fedora-ostree/ + Mon, 04 Jan 2021 22:00:00 +0800 + + https://sjtug.org/post/mirror-help/fedora-ostree/ + <p>fedora-ostree 是 Fedora Silverblue (原 Atomic Workstation) 的智能缓存。 +Fedora Silverblue 通过 rpm-ostree 管理整个系统。 +当您第一次请求镜像中的资源时,如果文件没有被镜像服务器缓存,我们会将您重定向回原站, +并在后台进行缓存。目前镜像服务器上已经预先缓存了所有 fedora-ostree 仓库的分支。</p> +<p>使用方法:编辑 <code>/etc/ostree/remotes.d/fedora.conf</code></p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-plain" data-lang="plain">[remote &#34;fedora&#34;] +url=https://mirror.sjtu.edu.cn/fedora-ostree +gpg-verify=true +gpgkeypath=/etc/pki/rpm-gpg/ +# contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist +</code></pre></div> + + + + flathub + https://sjtug.org/post/mirror-help/flathub/ + Mon, 04 Jan 2021 22:00:00 +0800 + + https://sjtug.org/post/mirror-help/flathub/ + <p>Flathub 镜像是 <a href="https://flathub.org">flathub.org</a> 的智能缓存。当您请求镜像中的资源时, +如果文件没有被镜像服务器缓存,我们会将您重定向回原站,并在后台进行缓存。 +目前镜像服务器上已经预先缓存了所有 Flathub 软件的分支。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo flatpak remote-modify flathub --url<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/flathub +</code></pre></div><p>如果出现错误可尝试:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">wget https://mirror.sjtu.edu.cn/flathub/flathub.gpg +sudo flatpak remote-modify --gpg-import<span style="color:#f92672">=</span>flathub.gpg flathub +</code></pre></div><p>目前 sel.flathub.org 已经重定向到 SJTUG 镜像站。如果您原先使用该服务器作为 Flathub 上游, +无需做任何设置即可使用。</p> +<p>Flathub 中部分软件由于重分发授权问题,需要从官方服务器下载,无法使用镜像站加速。比如 +NVIDIA 驱动、JetBrains 系列软件等。如果您的使用体验不佳,请及时通过 GitHub 或邮件向我们反馈。</p> +<p>如果您中断了某次安装,重新下载可能会出现找不到文件的问题。您可以使用 <code>flatpak repair</code> 解决相关的问题。</p> + + + + + gcr.io + https://sjtug.org/post/mirror-help/gcr-io/ + Fri, 23 Oct 2020 10:00:00 +0800 + + https://sjtug.org/post/mirror-help/gcr-io/ + <p>该镜像是 gcr.io 反代。将所有需要用到 gcr.io 的地址换成 gcr-io.mirrors.sjtug.sjtu.edu.cn 即可。比如:</p> +<pre><code>docker pull gcr-io.mirrors.sjtug.sjtu.edu.cn/google_containers/echoserver:1.4 +</code></pre> + + + + git/opam-repository.git + https://sjtug.org/post/mirror-help/opam-git/ + Tue, 13 Oct 2020 19:00:00 +0800 + + https://sjtug.org/post/mirror-help/opam-git/ + <p><a href="https://opam.ocaml.org">opam</a> 是 OCaml 的包管理器。SJTUG 提供 opam 的反代服务。</p> +<p>首次使用 opam,可以使用 SJTUG 镜像源初始化 opam。</p> +<pre><code>opam init default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git +</code></pre><p>使用下面的指令,可以将默认源替换为 SJTUG 镜像。</p> +<pre><code>opam repo set-url default https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git --all --set-default +</code></pre> + + + + emacs-elpa + https://sjtug.org/post/mirror-help/emacs-elpa/ + Fri, 14 Aug 2020 14:55:00 +0800 + + https://sjtug.org/post/mirror-help/emacs-elpa/ + <p>emacs-elpa 包含了 GNU ELPA, NonGNU ELPA, MELPA, MELPA Stable, Org 这 5 个镜像。</p> +<table> +<thead> +<tr> +<th>ELPA</th> +<th>镜像地址</th> +</tr> +</thead> +<tbody> +<tr> +<td><a href="https://elpa.gnu.org/">GNU ELPA</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/</a></td> +</tr> +<tr> +<td><a href="https://elpa.gnu.org/nongnu/">NonGNU ELPA</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/nongnu/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/nongnu/</a></td> +</tr> +<tr> +<td><a href="https://melpa.org/">MELPA</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/</a></td> +</tr> +<tr> +<td><a href="https://stable.melpa.org/#/">MELPA Stable</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/stable-melpa/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/stable-melpa/</a></td> +</tr> +<tr> +<td><a href="https://orgmode.org/elpa.html">Org</a></td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/">https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/</a></td> +</tr> +</tbody> +</table> +<h2 id="使用方法">使用方法</h2> +<p>根据你的需求,设置 <code>package-archives</code> ,比如用 GNU ELPA 和 MELPA:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(<span style="color:#66d9ef">setq</span> package-archives <span style="color:#f92672">&#39;</span>((<span style="color:#e6db74">&#34;gnu&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>) + (<span style="color:#e6db74">&#34;melpa&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>))) + +</code></pre></div><h3 id="spacemacs-用户">Spacemacs 用户</h3> +<h4 id="master-分支">master 分支</h4> +<p>添加下面的代码到 <code>.spacemacs</code> 的 <code>dotspacemacs/user-init()</code></p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(<span style="color:#66d9ef">setq</span> configuration-layer--elpa-archives + <span style="color:#f92672">&#39;</span>((<span style="color:#e6db74">&#34;melpa-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>) + (<span style="color:#e6db74">&#34;org-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/&#34;</span>) + (<span style="color:#e6db74">&#34;gnu-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>))) +</code></pre></div><h4 id="develop-分支">develop 分支</h4> +<p>使用 <code>configuration-layer-elpa-archives</code> 代替原来的 <code>configuration-layer--elpa-archives</code> ( <code>--</code> 换成 <code>-</code> )</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(<span style="color:#66d9ef">setq</span> configuration-layer-elpa-archives + <span style="color:#f92672">&#39;</span>((<span style="color:#e6db74">&#34;melpa-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>) + (<span style="color:#e6db74">&#34;org-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/org/&#34;</span>) + (<span style="color:#e6db74">&#34;gnu-cn&#34;</span> <span style="color:#f92672">.</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>))) +</code></pre></div><h3 id="cask-用户">Cask 用户</h3> +<p><a href="https://github.com/cask/cask">Cask</a> 是一个 Emacs Lisp 的项目管理工具。这里还是以 GNU ELPA 和 MELPA 为例,在添加下面的代码到 Cask</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-lisp" data-lang="lisp">(source <span style="color:#e6db74">&#34;gnu&#34;</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/gnu/&#34;</span>) +(source <span style="color:#e6db74">&#34;melpa&#34;</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/emacs-elpa/melpa/&#34;</span>) +</code></pre></div><p>本镜像上游为 <a href="https://elpa.emacs-china.org">https://elpa.emacs-china.org</a> 。</p> +<p>SJTUG 不提供 rsync 镜像。</p> + + + + + julia + https://sjtug.org/post/mirror-help/julia/ + Wed, 05 Aug 2020 12:00:00 +0800 + + https://sjtug.org/post/mirror-help/julia/ + <p>SJTUG 目前提供了 Julia 的官方包注册表 <a href="https://github.com/JuliaRegistries/General">General</a> 镜像来加速 Julia 包的安装。</p> +<p>关于 Julia 的安装,请使用 <code>julia-releases</code> 镜像。</p> +<p>注:本镜像的使用需要 Julia <code>v1.4.0</code> 或更新的版本。</p> +<h2 id="使用方式">使用方式</h2> +<p>只需要设置环境变量 <code>JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia</code> 即可切换镜像。若成功切换镜像,则能通过 <code>versioninfo()</code> 查询到相关信息,例如:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia">julia<span style="color:#f92672">&gt;</span> versioninfo() +Julia Version <span style="color:#ae81ff">1.5.0</span> +Commit <span style="color:#ae81ff">96786e22</span>cc (<span style="color:#ae81ff">2020</span><span style="color:#f92672">-</span><span style="color:#ae81ff">08</span><span style="color:#f92672">-</span><span style="color:#ae81ff">01</span> <span style="color:#ae81ff">23</span><span style="color:#f92672">:</span><span style="color:#ae81ff">44</span> UTC) +Platform Info<span style="color:#f92672">:</span> + OS<span style="color:#f92672">:</span> macOS (x86_64<span style="color:#f92672">-</span>apple<span style="color:#f92672">-</span>darwin18<span style="color:#ae81ff">.7.0</span>) + CPU<span style="color:#f92672">:</span> Intel(R) Core(TM) i9<span style="color:#f92672">-</span><span style="color:#ae81ff">9880</span>H CPU <span style="color:#960050;background-color:#1e0010">@</span> <span style="color:#ae81ff">2.30</span>GHz + WORD_SIZE<span style="color:#f92672">:</span> <span style="color:#ae81ff">64</span> + LIBM<span style="color:#f92672">:</span> libopenlibm + LLVM<span style="color:#f92672">:</span> libLLVM<span style="color:#f92672">-</span><span style="color:#ae81ff">9.0.1</span> (ORCJIT, skylake) +Environment<span style="color:#f92672">:</span> + JULIA_PKG_SERVER <span style="color:#f92672">=</span> https<span style="color:#f92672">://</span>mirrors<span style="color:#f92672">.</span>sjtug<span style="color:#f92672">.</span>sjtu<span style="color:#f92672">.</span>edu<span style="color:#f92672">.</span>cn<span style="color:#f92672">/</span>julia +</code></pre></div><p>若不设置该环境变量则默认使用官方服务器 <code>pkg.julialang.org</code> 作为上游。本镜像站是其国内服务器的数据上游之一。</p> +<h3 id="临时使用">临时使用</h3> +<p>不同系统和命令行下设置环境变量的方式各不相同,在命令行下可以通过以下方式来临时修改环境变量</p> +<ul> +<li>Linux Bash: <code>export JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia</code></li> +<li>Windows Powershell: <code>$env:JULIA_PKG_SERVER = 'https://mirrors.sjtug.sjtu.edu.cn/julia'</code></li> +</ul> +<p>也可以利用 JuliaCN 社区维护的中文本地化工具包 <a href="https://github.com/JuliaCN/JuliaZH.jl">JuliaZH</a> 来进行切换:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia"><span style="color:#66d9ef">using</span> JuliaZH <span style="color:#75715e"># 在 using 时会自动切换到国内的镜像站</span> +JuliaZH<span style="color:#f92672">.</span>set_mirror(<span style="color:#e6db74">&#34;SJTUG&#34;</span>) <span style="color:#75715e"># 也可以选择手动切换到 BFSU 镜像</span> +JuliaZH<span style="color:#f92672">.</span>mirrors <span style="color:#75715e"># 查询记录的上游信息</span> +</code></pre></div><h3 id="永久使用">永久使用</h3> +<p>不同系统和命令行下永久设定环境变量的方式也不相同,例如 Linux Bash 下可以通过修改 <code>~/.bashrc</code> 文件实现该目的:</p> +<pre><code># ~/.bashrc +export JULIA_PKG_SERVER=https://mirrors.sjtug.sjtu.edu.cn/julia +</code></pre><p>此外,这里再提供一种针对 Julia 的全平台通用的方式:<code>$JULIA_DEPOT_PATH/config/startup.jl</code> +( 默认为 <code>~/.julia/config/startup.jl</code> ) 文件定义了每次启动 Julia 时都会执行的命令,编辑该文件,添加以下内容即可:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia"><span style="color:#75715e"># ~/.julia/config/startup.jl</span> +ENV[<span style="color:#e6db74">&#34;JULIA_PKG_SERVER&#34;</span>] <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/julia&#34;</span> +</code></pre></div><p>也可以选择使用 <code>JuliaZH</code> 来一键修改/创建 <code>startup.jl</code> 文件:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia">julia<span style="color:#f92672">&gt;</span> JuliaZH<span style="color:#f92672">.</span>generate_startup(<span style="color:#e6db74">&#34;SJTUG&#34;</span>) +┌ Info<span style="color:#f92672">:</span> 添加 PkgServer +│ 服务器地址 <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/julia&#34;</span> +└ 配置文件 <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;/root/.julia/config/startup.jl&#34;</span> +</code></pre></div><p>若要临时禁止,可以通过 <code>julia --startup-file=no</code> 来取消执行 <code>startup.jl</code> 文件。</p> +<h2 id="常见问题">常见问题</h2> +<h3 id="加快-condajl-相关操作的速度">加快 Conda.jl 相关操作的速度</h3> +<p><code>Conda.jl</code> 的加速分为两部分:</p> +<ul> +<li><code>conda</code> 的安装:如果系统中没有找到 <code>conda</code> 的话,<code>Conda.jl</code> 会下载并安装一份 miniconda。如果这一步下载非常缓慢的话,你可以提前从 <a href="https://mirrors.bfsu.edu.cn/anaconda/archive/">BFSU 镜像站</a>下载并安装 anaconda,然后通过设置环境变量 <code>CONDA_JL_HOME=$HOME/anaconda3</code> 来指定 <code>Conda.jl</code> 所使用的<code>conda</code>,这样就避免重复下载 <code>miniconda</code>. (<code>$HOME/anaconda3</code>是 anaconda3 的默认安装位置,你可能需要根据具体情况进行调整。)</li> +<li><code>conda add</code> 等操作的加速:这个只需要配置 anaconda 镜像源即可,即修改 <code>~/.condarc</code> 文件。具体的配置可以查看镜像站中 anaconda 镜像的使用说明。</li> +</ul> +<h3 id="为什么有些包的下载还是很慢">为什么有些包的下载还是很慢?</h3> +<p>有两类数据不会被镜像:</p> +<ul> +<li>在 <code>deps/build.jl</code> 文件中硬编码的下载地址,例如 <a href="https://github.com/jheinen/GR.jl/blob/70f025d5cb439d036409f1985107cb5e1615097f/deps/build.jl#L116">GR</a>.</li> +<li>在 <code>Artifacts.toml</code> 中没有给出 <code>download</code> 项的资源, 例如 <a href="https://github.com/JuliaImages/TestImages.jl/blob/eaa94348df619c65956e8cfb0032ecddb7a29d3a/Artifacts.toml">TestImages</a>.</li> +</ul> +<p>在安装包含这两类数据的包时,其数据依然是从原始地址进行下载,因此若网络不稳定则可能会在 <code>build</code> 阶段报错。</p> +<h3 id="为什么注册表还是从原地址下载">为什么注册表还是从原地址下载?</h3> +<p>Julia <code>v1.4.0</code> 之前的版本采用的是 <code>git clone</code> 的方式拉取注册表。为了保持兼容性,如果现有的注册表是一个完整的 git 仓库的话, +那么即使设置了 PkgServer 作为上游镜像也依然会通过 <code>git</code> 来进行更新,换句话说,不会通过镜像站来下载注册表数据。</p> +<p>以默认注册表 <code>General</code> 为例,只需要手动将其重置到镜像站即可:</p> +<ol> +<li>删除当前注册表:<code>(@v1.4) pkg&gt; registry rm General</code></li> +<li>从镜像站重新下载数据:<code>(@v1.4) pkg&gt; registry add General</code></li> +</ol> +<h3 id="为什么有些包还是从原地址下载">为什么有些包还是从原地址下载?</h3> +<p>镜像站只镜像注册表中记录的包,因此如果某些包是通过指定 URL 的方式来安装的话,那么该包的更新不会从镜像站进行下载。 +这常见于那些还未注册的包及其版本,例如:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-julia" data-lang="julia">]add Flux<span style="color:#75715e">#master</span> +]add https<span style="color:#f92672">://</span>github<span style="color:#f92672">.</span>com<span style="color:#f92672">/</span>FluxML<span style="color:#f92672">/</span>Flux<span style="color:#f92672">.</span>jl<span style="color:#f92672">.</span>git +Pkg<span style="color:#f92672">.</span>add(PackageSpec(url<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://github.com/FluxML/Flux.jl.git&#34;</span>)) +</code></pre></div> + + + + julia-releases + https://sjtug.org/post/mirror-help/julia-releases/ + Wed, 05 Aug 2020 12:00:00 +0800 + + https://sjtug.org/post/mirror-help/julia-releases/ + <h2 id="julia-二进制安装程序">Julia 二进制安装程序</h2> +<p>Julia 是一个全新的以科学计算为核心的通用编程语言,本镜像为其二进制发行程序。关于 Julia 下各种工具包的安装,请使用 <code>julia</code> 镜像。</p> +<p>这里仅镜像 <a href="https://julialang.org/downloads/">JuliaLang Downloads</a> 中提供的稳定发行版以及 rc 版本。每日构建的测试版 (nightlies) 以及 +<a href="http://junolab.org/">Juno</a>/<a href="https://juliacomputing.com/products/juliapro">Julia Pro</a>等 IDE 版本不包括在内。</p> +<p>尽管一些包管理工具(例如 <code>apt</code>, <code>pacman</code>, <code>conda</code>, <code>choco</code>) 中提供有 Julia,但是这些工具或多或少都存在一些由二进制 +依赖导致的问题,因此官方推荐的方式是根据自己的使用平台下载相应的二进制程序,然后通过解压的方式进行手动安装。</p> +<h2 id="julia-一键安装">Julia 一键安装</h2> +<p>对于习惯命令行的用户而言,<a href="https://github.com/johnnychen94/jill.py">jill.py</a> 是一个社区维护的全平台下一键安装 +Julia 的命令行工具。</p> +<p>安装/更新 <code>jill</code>: <code>pip install jill --user -U</code> (需要 Python <code>3.6</code> 或更新的版本)</p> +<ul> +<li>安装 Julia:<code>jill install [VERSION] [--upstream UPSTREAM] [--confirm]</code> +<ul> +<li><code>jill install</code>:最新的 <code>x.y.z</code> 版本</li> +<li><code>jill install --confirm</code>:无需交互确认直接安装</li> +<li><code>jill install --upstream SJTUG</code>:从本镜像站下载并安装</li> +<li><code>jill install 1.5</code>:安装最新的 <code>1.5.z</code> 版本</li> +</ul> +</li> +<li>查询现存的上游镜像:<code>jill upstream</code></li> +<li>帮助文档:<code>jill [COMMAND] --help</code> +<ul> +<li><code>jill --help</code>:查询存在的 <code>jill</code> 命令</li> +<li><code>jill install --help</code>:查询 <code>install</code> 命令的使用方式</li> +</ul> +</li> +</ul> +<p>利用 <code>jill</code> 安装完成后即可通过在命令行执行 <code>julia</code>/<code>julia-1</code>/<code>julia-1.5</code> 来启动不同版本的 Julia.</p> + + + + + mongodb + https://sjtug.org/post/mirror-help/mongodb/ + Sat, 01 Aug 2020 23:30:00 +0800 + + https://sjtug.org/post/mirror-help/mongodb/ + <p>mongodb 源是 <a href="http://repo.mongodb.org">repo.mongodb.org</a> 的全量同步。</p> +<p><strong>使用说明</strong></p> +<p>请参照官方教程配置并安装 <a href="https://docs.mongodb.com/manual/administration/install-on-linux/">https://docs.mongodb.com/manual/administration/install-on-linux/</a>。 +在安装过程中,把 <code>https://repo.mongodb.org/</code> 替换为 <code>https://mirrors.sjtug.sjtu.edu.cn/mongodb/</code>。比如在 Ubuntu focal 中使用时,可以执行以下指令。</p> +<pre><code>wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - +echo &quot;deb [ arch=amd64,arm64 ] https://mirrors.sjtug.sjtu.edu.cn/mongodb/apt/ubuntu/ focal/mongodb-org/4.4 multiverse&quot; | tee /etc/apt/sources.list.d/mongodb-org-4.4.list +</code></pre> + + + + crates.io + https://sjtug.org/post/mirror-help/crates.io/ + Thu, 09 Jul 2020 01:00:00 +0800 + + https://sjtug.org/post/mirror-help/crates.io/ + <p>编辑 <code>~/.cargo/config.toml</code></p> +<pre><code>[source] + +[source.mirror] +registry = &quot;sparse+https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/&quot; + +[source.crates-io] +replace-with = &quot;mirror&quot; +</code></pre><p>若您的 cargo 版本低于 1.68,请使用以下配置</p> +<pre><code>[source] + +[source.mirror] +registry = &quot;https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/&quot; + +[source.crates-io] +replace-with = &quot;mirror&quot; +</code></pre> + + + + git/crates.io-index + https://sjtug.org/post/mirror-help/creates.io.git/ + Thu, 09 Jul 2020 01:00:00 +0800 + + https://sjtug.org/post/mirror-help/creates.io.git/ + <p>编辑 <code>~/.cargo/config</code></p> +<pre><code>[source] + +[source.mirror] +registry = &quot;https://mirrors.sjtug.sjtu.edu.cn/git/crates.io-index/&quot; + +[source.crates-io] +replace-with = &quot;mirror&quot; +</code></pre> + + + + cran + https://sjtug.org/post/mirror-help/cran/ + Sat, 04 Jul 2020 15:33:04 +0800 + + https://sjtug.org/post/mirror-help/cran/ + <p>使用方法:</p> +<p>在安装时指定 repo。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-R" data-lang="R"><span style="color:#a6e22e">install.packages</span>(<span style="color:#e6db74">&#34;lattice&#34;</span>, repos<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/cran/&#34;</span>) +</code></pre></div><p>在 <code>.Rprofile</code> 中设置默认 repo。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-R" data-lang="R"><span style="color:#a6e22e">options</span>(repos<span style="color:#f92672">=</span><span style="color:#a6e22e">structure</span>(<span style="color:#a6e22e">c</span>(CRAN<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://mirrors.sjtug.sjtu.edu.cn/cran/&#34;</span>))) +</code></pre></div> + + + + anaconda + https://sjtug.org/post/mirror-help/anaconda/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/anaconda/ + <p>Anaconda 是一种 Python 语言的免费增值开源发行版,用于进行大规模数据处理, 预测分析, 和科学计算, 致力于简化包的管理和部署。Anaconda 使用软件包管理系统 conda 进行包管理。</p> +<p>SJTUG 源镜像了常用的 conda 库,以方便科学计算用户使用。</p> +<p><strong>Note: 如果您正在从其他镜像源切换到 SJTUG,请检查我们是否同步了你所需要的 repo,以及该 repo 是否支持您使用的平台 (e.g. linux-64)。如果没有,请删除相关配置,并提出新镜像请求。</strong></p> +<p><strong>使用说明</strong></p> +<p>编辑 <code>~/.condarc</code></p> +<pre><code>default_channels: + - https://mirror.sjtu.edu.cn/anaconda/pkgs/r + - https://mirror.sjtu.edu.cn/anaconda/pkgs/main +custom_channels: + conda-forge: https://mirror.sjtu.edu.cn/anaconda/cloud/ + pytorch: https://mirror.sjtu.edu.cn/anaconda/cloud/ +channels: + - defaults +</code></pre><p>在 <code>custom_channels</code> 中您可以添加下面所列的其他第三方源。我们建议您使用上面的方法配置,而非执行下面的指令。</p> +<p>您也可以使用<code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/{{你所需要的包名}}</code>来将SJTUG源添加作为这个包的上游。目前镜像的包与安装命令包括:</p> +<ul> +<li><strong>官方源</strong>: +<ul> +<li><code>pkgs/free</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/free</code></li> +<li><code>pkgs/main</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/main</code></li> +<li><code>pkgs/mro</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/mro</code></li> +<li><code>pkgs/msys2</code>: <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/msys2</code></li> +<li><code>pkgs/pro</code>: (deprecated) <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/pro</code></li> +<li><code>pkgs/r</code>: (empty) <code>conda config --add channels https://mirror.sjtu.edu.cn/anaconda/pkgs/r</code></li> +</ul> +</li> +<li><strong>第三方源</strong>: +<ul> +<li><code>cloud/bioconda</code>: <code>conda config --set custom_channels.bioconda https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/conda-forge</code>: <code>conda config --set custom_channels.conda-forge https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/menpo</code>: <code>conda config --set custom_channels.menpo https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/soumith</code>: <code>conda config --set custom_channels.soumith https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/viscid-hub</code>: <code>conda config --set custom_channels.viscid-hub https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/atztogo</code>: <code>conda config --set custom_channels.atztogo https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/pytorch</code>: <code>conda config --set custom_channels.pytorch https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +<li><code>cloud/pytorch-test</code>: <code>conda config --set custom_channels.pytorch-test https://mirror.sjtu.edu.cn/anaconda/cloud/</code></li> +</ul> +</li> +</ul> +<p>此外,在 Conda 4.7 后,官方的 default 源组默认只包含 main 和 r (windows 会包含 msys2) channel,其他官方源仍支持手动添加。但官方建议不再使用 free channel,详见 <a href="https://www.anaconda.com/why-we-removed-the-free-channel-in-conda-4-7/">Why We Removed the “Free” Channel in Conda 4.7</a>。</p> + + + + + anthon + https://sjtug.org/post/mirror-help/anthon/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/anthon/ + <p>AOSC OS(安同 OS)软件源。AOSC OS 是一个由安同开源社区 [https://aosc.io](<a href="https://aosc.io">https://aosc.io</a>)开发的半滚动 Linux 发行版,对包括 x86-64,aarch64,LoongArch64 等多种处理器架构提供支持。</p> +<p><strong>使用方法</strong></p> +<p>AOSC OS 内置 <code>apt-gen-list</code> 用于切换社区提供的可用镜像源。不建议直接使用 <code>/etc/apt/sources.list</code> 变更镜像。</p> +<p>使用如下指令将本镜像源添加到可用镜像源列表中</p> +<pre><code>sudo apt-gen-list add-custom-mirror sjtug https://mirror.sjtu.edu.cn/anthon/ +</code></pre><p>随后使用如下启用本镜像源</p> +<pre><code>sudo apt-gen-list add-mirror sjtug +</code></pre><p>如果仅使用本镜像源,使用如下指令</p> +<pre><code>sudo apt-gen-list set-mirror sjtug +</code></pre> + + + + archlinux + https://sjtug.org/post/mirror-help/archlinux/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/archlinux/ + <p>Arch Linux 是通用 x86-64 GNU/Linux 发行版。Arch 采用滚动升级模式,尽全力提供最新的稳定版软件。初始安装的 Arch 只是一个基本系统,随后用户可以根据自己的喜好安装需要的软件并配置成符合自己理想的系统。</p> +<p>使用方法:编辑 <code>/etc/pacman.d/mirrorlist</code> 文件,添加 <code>Server = https://mirror.sjtu.edu.cn/archlinux/$repo/os/$arch</code> 这一行,同时注释掉其它所有镜像,然后运行 <code>sudo pacman -Syy</code> 更新软件包缓存。</p> + + + + + archlinux-cn + https://sjtug.org/post/mirror-help/archlinux-cn/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/archlinux-cn/ + <p>Arch Linux 中文社区仓库 是由 Arch Linux 中文社区驱动的非官方用户仓库。包含中文用户常用软件、工具、字体/美化包等。</p> +<p>完整的包信息列表(包名称/架构/维护者/状态)请 <a href="https://github.com/archlinuxcn/repo">点击这里</a> 查看。</p> +<p>仓库主地址:http://repo.archlinuxcn.org/</p> +<p>使用方法:在 <code>/etc/pacman.conf</code> 文件末尾添加以下两行:</p> +<pre><code>[archlinuxcn] +Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch +</code></pre><p>之后,请执行下面的命令安装 archlinuxcn-keyring 包导入 GPG key。</p> +<pre><code>pacman -Sy archlinuxcn-keyring +</code></pre> + + + + archlinuxarm + https://sjtug.org/post/mirror-help/archlinuxarm/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/archlinuxarm/ + <p>Arch Linux ARM 是在使用 ARM 架构处理器的计算机上运行的 Linux 发行版。它为许多主流的采用 ARM 处理器的硬件提供内核及应用程序支持,同时和 Arch Linux 一样具有提供最新的软件源、避免预安装多余软件包等特点。</p> +<p>本仓库包含 Arch Linux ARM 的系统镜像及软件源。</p> +<p>系统镜像使用方法:请访问 <a href="https://archlinuxarm.org/platforms">https://archlinuxarm.org/platforms</a> ,阅读硬件平台对应的安装指引并下载对应的系统镜像。</p> +<p>软件源使用方法:在 <code>/etc/pacman.d/mirrorlist</code> 的文件顶端(所有镜像源的最上面)加上:</p> +<pre><code>Server = https://mirrors.sjtug.sjtu.edu.cn/archlinuxarm/$arch/$repo +</code></pre><p>之后,请执行下面的命令更新软件包缓存。</p> +<pre><code>pacman -Syy +</code></pre> + + + + armbian + https://sjtug.org/post/mirror-help/armbian/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/armbian/ + <p>Armbian 是为 ARM 单板机提供的基于 Debian 和 Ubuntu 的操作系统。Armbian 仓库包括专用的 u-boot、内核及各种支持文件。</p> +<p>可以使用以下方法更换软件源:</p> +<ul> +<li>运行 <code>armbian-config</code> -&gt; Personal -&gt; Mirrors -&gt; 选择镜像站。</li> +<li>编辑 <code>/etc/apt/sources.list.d/armbian.list</code>,将 <code>http://apt.armbian.com</code> 替换为 <code>https://mirror.sjtu.edu.cn/armbian/</code>,然后执行 <code>apt update</code>。</li> +</ul> + + + + + bioconductor + https://sjtug.org/post/mirror-help/bioconductor/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/bioconductor/ + <p>Bioconductor 为高通量基因组数据的分析和可视化提供开源工具。Bioconductor多数软件包采用R统计编程语言开发。Bioconductor 每年释出两个版本,并有活跃的用户社区。</p> +<p>使用方法:</p> +<p>Bioconductor 镜像源配置文件之一是 <code>~/.Rprofile</code> 。</p> +<p>注:R 的 <code>~</code> 在类 Unix 系统下为: <code>$HOME</code> (即 <code>~</code> ),在 Windows 下为: <code>%USERPROFILE%\Documents</code> ,具体路径可以在 R 中执行 <code>path.expand(&quot;~&quot;)</code> 查看。</p> +<p>在该文件末尾添加如下语句或在R/RStudio终端下键入:</p> +<pre><code>options(BioC_mirror=&quot;https://mirror.sjtu.edu.cn/bioconductor&quot;) +</code></pre><p>即可使用该 Bioconductor 镜像源安装 Bioconductor 软件包。 +命令如下:</p> +<pre><code>if (!requireNamespace(&quot;BiocManager&quot;, quietly = TRUE)) + install.packages(&quot;BiocManager&quot;) +BiocManager::install(&quot;$package_name&quot;) +</code></pre><p>请访问<a href="http://bioconductor.org/">官方网站</a>获取更多信息。</p> + + + + + blackarch + https://sjtug.org/post/mirror-help/blackarch/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/blackarch/ + <p>BlackArch 是一款基于 ArchLinux 的为渗透测试及安全研究人员开发的发行版,相当于 Arch 版的 Kali。可以当做现有 Arch 系统的非官方用户存储库。</p> +<p>使用方法:</p> +<p>在现有 Arch 系统中,编辑<code>/etc/pacman.conf</code>,在末尾添加两行</p> +<pre><code>[blackarch] +Server = https://mirror.sjtu.edu.cn/blackarch/$repo/os/$arch +</code></pre><p>由于一些软件依赖32位的库,需要取消掉<code>/etc/pacman.conf</code>中<code>multilib</code>的注释,详见https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib</p> +<p>之后,请执行下面的命令安装 blackarch-keyring 包导入 GPG key。</p> +<pre><code>sudo pacman -Sy blackarch-keyring +</code></pre> + + + + centos + https://sjtug.org/post/mirror-help/centos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/centos/ + <p>使用方法:运行下面的指令一键替换并备份。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -e <span style="color:#e6db74">&#39;s/mirrorlist/#mirrorlist/g&#39;</span> -e <span style="color:#e6db74">&#39;s|#baseurl=http://mirror.centos.org/|baseurl=http://mirror.sjtu.edu.cn/|g&#39;</span> -i.bak /etc/yum.repos.d/&lt;需要替换的文件&gt; +</code></pre></div><p>最后运行 <code>dnf makecache</code> 生成缓存</p> + + + + + dart-pub + https://sjtug.org/post/mirror-help/dart-packages/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/dart-packages/ + <p>dart-pub 镜像全量同步了 Dart 语言官方仓库 <a href="https://pub.dartlang.org">https://pub.dartlang.org</a> ,可以加速 Dart 包的下载。</p> +<p>使用方法:</p> +<p>设置环境变量 <code>export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub</code> 即可。</p> + + + + + debian + https://sjtug.org/post/mirror-help/debian/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/debian/ + <p>Debian 是完全由自由软件组成的类UNIX操作系统,其包含的多数软件使用GNU通用公共许可协议授权,并由Debian计划的参与者组成团队对其进行打包、开发与维护。Debian以其坚守Unix和自由软件的精神,以及其给予用户的众多选择而闻名。现时Debian提供了超过25,000个软件[9],超过50,000个软件包[10],并正式支持10个计算机系统结构。</p> +<h3 id="使用方法">使用方法:</h3> +<ul> +<li>一键替换</li> +</ul> +<pre><code>sudo sed -i &quot;s|http://deb.debian.org/debian|http://mirror.sjtu.edu.cn/debian|g&quot; /etc/apt/sources.list +</code></pre><ul> +<li>手动替换</li> +</ul> +<p>先安装 ca-certificates apt-transport-https 保证第三方https源可以使用。(执行 <code>sudo apt install -y ca-certificates apt-transport-https</code>)</p> +<p>再打开<code> /etc/apt/sources.list</code>,将类似于<code>http://deb.debian.org/debian/</code>的地址均替换为<code>https://mirror.sjtu.edu.cn/debian/</code>即可。</p> + + + + + debian-cd + https://sjtug.org/post/mirror-help/debian-cd/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/debian-cd/ + <p>Debian 是完全由自由软件组成的类 UNIX 操作系统,其包含的多数软件使用 GNU 通用公共许可协议授权,并由 Debian 计划的参与者组成团队对其进行打包、开发与维护。 Debian 以其坚守 Unix 和自由软件的精神,以及其给予用户的众多选择而闻名。现时 Debian 提供了超过25,000个软件,超过50,000个软件包,并正式支持10个计算机系统结构。</p> +<p>本镜像仅提供 Debian 最新稳定版本。</p> +<p>一般来说只需在 <code>iso-cd</code> 目录 <a href="https://mirror.sjtu.edu.cn/debian-cd/current/amd64/iso-cd/">https://mirror.sjtu.edu.cn/debian-cd/current/amd64/iso-cd/</a> 寻找无后缀版本即可。当你使用不支持 UEFI 启动的系统时候,请安装 <code>mac</code> 后缀版本。当你寻找教育版时候可以寻找 <code>edu</code> 后缀版本。</p> + + + + + debian-ports + https://sjtug.org/post/mirror-help/debian-ports/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/debian-ports/ + <p>本软件源仅适用于 Debian riscv64。</p> +<p>编辑<code>/etc/apt/sources.list</code>,删除所有内容,添加以下内容并保存。</p> +<pre><code>deb [arch=riscv64] http://mirror.sjtu.edu.cn/debian-ports unstable main +deb [arch=riscv64] http://mirror.sjtu.edu.cn/debian-ports unreleased main +</code></pre><p>然后,使用<code>sudo apt update</code>更新软件包索引。</p> + + + + + docker-registry + https://sjtug.org/post/mirror-help/docker-registry/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/docker-registry/ + <p>docker-registry 源是 Docker Hub 的反向代理,可以加速<code>docker pull</code>等需要下载镜像的命令。</p> +<h2 id="docker-使用方法">Docker 使用方法:</h2> +<p>编辑或新建<code>/etc/docker/daemon.json</code>文件,向其中添加<code>registry-mirrors</code>项,使最终配置类似:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-json" data-lang="json">{ + <span style="color:#f92672">&#34;registry-mirrors&#34;</span>: [<span style="color:#e6db74">&#34;https://docker.mirrors.sjtug.sjtu.edu.cn&#34;</span>] +} +</code></pre></div><h2 id="podman-使用方法">Podman 使用方法:</h2> +<p>新建<code>/etc/containers/registries.conf.d/050-sjtug-docker-mirror.conf</code>文件(或在<code>/etc/containers/registries.conf</code>文件末尾),写入以下内容:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-toml" data-lang="toml"><span style="color:#a6e22e">unqualified</span><span style="color:#960050;background-color:#1e0010">-</span><span style="color:#a6e22e">search</span><span style="color:#960050;background-color:#1e0010">-</span><span style="color:#a6e22e">registries</span> = [<span style="color:#e6db74">&#34;docker.io&#34;</span>] + +[[<span style="color:#a6e22e">registry</span>]] +<span style="color:#a6e22e">location</span> = <span style="color:#e6db74">&#34;docker.io&#34;</span> + +[[<span style="color:#a6e22e">registry</span>.<span style="color:#a6e22e">mirror</span>]] +<span style="color:#a6e22e">location</span> = <span style="color:#e6db74">&#34;docker.mirrors.sjtug.sjtu.edu.cn&#34;</span> +</code></pre></div> + + + + dragonflybsd/dports + https://sjtug.org/post/mirror-help/dragonflybsd/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/dragonflybsd/ + <h2 id="项目简介">项目简介</h2> +<p><a href="https://www.dragonflybsd.org/">DragonFly BSD</a> 隶属于 <a href="https://en.wikipedia.org/wiki/BSD">BSD 系统家族</a>, +是其中相对小众、但富有特色的一个成员,与 <a href="https://www.freebsd.org/">FreeBSD</a>、 +<a href="https://www.openbsd.org/">OpenBSD</a>、<a href="https://www.netbsd.org/">NetBSD</a> +组成四大 BSD 操作系统。</p> +<p>自 2003 年从 FreeBSD 4.8 衍生而来, +DragonFly BSD 对虚拟内存、虚拟文件系统、网络协议栈等关键内核子系统做了大幅修改, +尽可能地消除了锁和竞争,实现了出色的 SMP 性能。 +项目创始人 Matthew Dillon 自行开发的 <a href="https://en.wikipedia.org/wiki/HAMMER2">HAMMER2</a> +文件系统是另一个主要特色,该文件系统拥有可媲美 ZFS 的功能和稳定性,但节省内存等资源。 +DragonFly BSD 的其他特色功能还有 vkernel、swapcache、LUKS、TrueCrypt、等等, +详情可参考:<a href="https://www.dragonflybsd.org/features/">主要特性列表</a>。</p> +<p>DragonFly BSD 的内核简洁小巧,代码整洁,在线手册 (man pages) 清晰,适合学习和研究。 +驱动程序和用户空间工具主要继承自 FreeBSD,同时与 FreeBSD 使用相同的包管理工具 +<a href="https://github.com/freebsd/pkg">pkg(8)</a>,可利用 FreeBSD 丰富全面的文档资源, +用户体验良好。 +此外,DragonFly BSD 的社区虽小,但很友好。</p> +<h2 id="镜像介绍">镜像介绍</h2> +<p>SJTUG 镜像是 DragonFly BSD 在中国内地的首个镜像站点, +依托于华东教育网骨干节点,提供稳定、快速的镜像服务。</p> +<p>我们的镜像服务目前提供了如下内容:</p> +<ul> +<li><a href="https://mirror.sjtu.edu.cn/dragonflybsd/iso-images/">安装镜像 (ISO/IMG)</a></li> +<li><a href="https://mirror.sjtu.edu.cn/dragonflybsd/dports/">预编译软件包</a> +(收录了 3 个版本:当前开发版本、当前发布版本、上一发布版本)</li> +</ul> +<h2 id="使用方法">使用方法</h2> +<p>创建 pkg(8) 仓库配置文件 <code>/usr/local/etc/pkg/repos/sjtug.conf</code>,添加以下内容:</p> +<pre><code class="language-conf" data-lang="conf"># China, Shanghai +SJTUG: { + url: https://mirror.sjtu.edu.cn/dragonflybsd/dports/${ABI}/LATEST, + priority: 10, + enabled: yes +} +</code></pre><p>然后执行 <code>pkg update -f</code> 更新索引即可开始使用了。</p> +<p>注:仓库的优先级 (<code>priority</code>) 默认为 0,此处通过设置 <code>priority: 10</code> +提高优先级来优先使用 SJTUG 镜像服务。</p> +<h2 id="相关链接">相关链接</h2> +<ul> +<li>官方主页: <a href="https://www.dragonflybsd.org/">https://www.dragonflybsd.org/</a></li> +<li>镜像列表: <a href="https://www.dragonflybsd.org/mirrors/">https://www.dragonflybsd.org/mirrors/</a></li> +<li>系统源码: <a href="https://gitweb.dragonflybsd.org/dragonfly.git">官方 Gitweb</a>, <a href="https://github.com/DragonFlyBSD/DragonFlyBSD">GitHub</a></li> +<li>GitHub: <a href="https://github.com/DragonFlyBSD/DragonFlyBSD">https://github.com/DragonFlyBSD</a></li> +</ul> + + + + + fedora/linux + https://sjtug.org/post/mirror-help/fedora/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/fedora/ + <p>Fedora 项目是一个由红帽公司所赞助,以统筹 Fedora Linux 操作系统开发的社区。 +Fedora 项目在建设开源软件社区的同时构建了一个被称为&quot;Fedora&quot;的 GNU/Linux 发行版。</p> +<p>使用方法:运行下面的指令一键替换并备份。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -e <span style="color:#e6db74">&#39;s/^metalink=/#metalink=/g&#39;</span> -e <span style="color:#e6db74">&#39;s|^#baseurl=http://download.example/pub/|baseurl=https://mirror.sjtu.edu.cn/|g&#39;</span> -i.bak /etc/yum.repos.d/&lt;需要替换的文件&gt; +</code></pre></div><p>最后运行 <code>dnf makecache</code> 生成缓存</p> + + + + + flutter_infra + https://sjtug.org/post/mirror-help/flutter_infra/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/flutter_infra/ + <h2 id="欢迎使用-sjtug-镜像设置-flutter-开发环境">欢迎使用 SJTUG 镜像设置 Flutter 开发环境</h2> +<p>作为国内最早提供 Flutter 的镜像站,我们在近期对镜像站的更新中提高了 Flutter +镜像的稳定性,并解决了部分问题,欢迎大家使用!</p> +<p>Flutter 是 Google 开源的 UI 工具包,帮助开发者通过一套代码库高效构建多平台精美应用, +支持移动、Web、桌面和嵌入式平台。</p> +<p>Flutter 由 Google 主导,全球的开发者共同协作开发。中国的开发者数量占全球的 20% +以上,也有大量贡献者为 Flutter 的生态提供了很大的帮助和贡献。</p> +<p>为了更好帮助国内的开发者、设计师和研究者等使用 Flutter,我们为 Flutter 的使用 +提供了加速访问的服务。您需要将开发设备的如下两个环境变量设置指向 SJTUG 镜像:</p> +<ul> +<li><code>PUB_HOSTED_URL</code></li> +<li><code>FLUTTER_STORAGE_BASE_URL</code></li> +</ul> +<h3 id="linux-和-macos-系统设定-flutter-镜像">Linux 和 macOS 系统设定 Flutter 镜像</h3> +<p>执行如下代码:</p> +<pre><code>export PUB_HOSTED_URL=https://mirror.sjtu.edu.cn/dart-pub +export FLUTTER_STORAGE_BASE_URL=https://mirror.sjtu.edu.cn +</code></pre><h3 id="windows-系统设定-flutter-镜像">Windows 系统设定 Flutter 镜像</h3> +<p>右键单击“我的电脑”,单击“属性” ——&gt; “高级”选项卡 ——&gt; “环境变量”</p> +<p>在 “用户变量” 或 “系统变量” 中:</p> +<p>单击“新建”添加新变量:</p> +<ul> +<li>变量名: <code>PUB_HOSTED_URL</code></li> +<li>值: <code>https://mirror.sjtu.edu.cn/dart-pub</code></li> +<li>变量名: <code>FLUTTER_STORAGE_BASE_URL</code></li> +<li>值: <code>https://mirror.sjtu.edu.cn</code></li> +</ul> +<p>点击确定,保存生效。如果这两个变量名已经存在,点击编辑可修改变量值。</p> +<h3 id="设置-flutter-sdk-仓库镜像">设置 Flutter SDK 仓库镜像</h3> +<p>在 <code>flutter-sdk</code> 仓库下,执行如下指令即可。</p> +<pre><code>git remote set-url origin https://git.sjtu.edu.cn/sjtug/flutter-sdk.git +</code></pre><h3 id="downloadflutterio-镜像">download.flutter.io 镜像</h3> +<p>访问 <a href="https://mirror.sjtu.edu.cn/download.flutter.io/">https://mirror.sjtu.edu.cn/download.flutter.io/</a> 即可。</p> +<h2 id="更多资源">更多资源</h2> +<p>感谢 flutter.cn 对 SJTUG 镜像测试的支持。 +更多 Flutter 资源和中文文档, +请访问 Flutter 中文资源网站 (<a href="https://flutter.cn">flutter.cn</a>) +和 Dart 中文文档网站 (<a href="https://dart.cn">dart.cn</a>)。</p> + + + + + git/brew.git + https://sjtug.org/post/mirror-help/brew-git/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/brew-git/ + <p>本镜像是 Homebrew 自身的仓库,上游为<code>https://github.com/Homebrew/brew.git</code>。在<code>git</code>相关操作时使用<code>https://mirrors.sjtug.sjtu.edu.cn/git/brew.git</code>替代上述地址即可。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-core</code>, <code>homebrew-cask</code>和<code>brew-bottles</code>镜像,欢迎大家使用。</em></p> +<p>使用方法:</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_BREW_GIT_REMOTE<span style="color:#f92672">=</span>https://mirrors.sjtug.sjtu.edu.cn/git/brew.git +export HOMEBREW_CORE_GIT_REMOTE<span style="color:#f92672">=</span>https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git +export HOMEBREW_BOTTLE_DOMAIN<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/homebrew-bottles/bottles +</code></pre></div><p>另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_NO_INSTALL_FROM_API<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span> +</code></pre></div><p>随后正常使用官方脚本安装即可。</p> + + + + + git/homebrew-cask.git + https://sjtug.org/post/mirror-help/homebrew-cask/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/homebrew-cask/ + <p>homebrew-cask.git镜像了<a href="https://github.com/Homebrew/homebrew-cask.git">Homebrew Cask的描述文件,主要包括了较大的二进制文件与macOS应用</a>。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-core</code>和<code>brew-bottles</code>镜像,欢迎大家使用。</em></p> +<p><em>若首次安装 homebrew, 请参阅 <code>brew.git</code> 的说明。</em></p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew tap --custom-remote --force-auto-update homebrew/cask https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-cask.git +</code></pre></div><p>然后执行:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew update +</code></pre></div><p>另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_NO_INSTALL_FROM_API<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span> +</code></pre></div> + + + + git/homebrew-core.git + https://sjtug.org/post/mirror-help/homebrew-core/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/homebrew-core/ + <p>homebrew-core.git镜像了<a href="https://github.com/Homebrew/homebrew-core.git">Homebrew官方的软件包描述文件</a>。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-cask</code>和<code>brew-bottles</code>镜像,欢迎大家使用。</em></p> +<p><em>若首次安装 homebrew, 请参阅 <code>brew.git</code> 的说明。</em></p> +<p>使用方法:</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_CORE_GIT_REMOTE<span style="color:#f92672">=</span>https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git +</code></pre></div><p>然后执行:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">brew tap --custom-remote --force-auto-update homebrew/core https://mirrors.sjtug.sjtu.edu.cn/git/homebrew-core.git +brew update +</code></pre></div><p>另外,现 homebrew 版本将默认使用 API 下载,本镜像源尚不支持这种方式,若使用本镜像请手动关闭该开关。</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_NO_INSTALL_FROM_API<span style="color:#f92672">=</span><span style="color:#ae81ff">1</span> +</code></pre></div> + + + + git/ohmyzsh.git + https://sjtug.org/post/mirror-help/ohmyzsh/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ohmyzsh/ + <p><a href="https://ohmyz.sh/">Oh My Zsh</a> 是一个由社区驱动的开源框架,用于管理 <a href="https://www.zsh.org/">zsh</a> 的配置。</p> +<h2 id="首次安装-oh-my-zsh">首次安装 Oh My Zsh</h2> +<p>首先,需要确保系统中安装了 zsh 和 git,然后在终端运行以下命令其中之一:</p> +<table> +<thead> +<tr> +<th style="text-align:left">方法</th> +<th style="text-align:left">命令</th> +</tr> +</thead> +<tbody> +<tr> +<td style="text-align:left"><strong>curl</strong></td> +<td style="text-align:left"><code>REPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c &quot;$(curl -fsSL https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)&quot;</code></td> +</tr> +<tr> +<td style="text-align:left"><strong>wget</strong></td> +<td style="text-align:left"><code>REPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c &quot;$(wget -O- https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)&quot;</code></td> +</tr> +<tr> +<td style="text-align:left"><strong>fetch</strong></td> +<td style="text-align:left"><code>REPO=sjtug/ohmyzsh REMOTE=https://git.sjtu.edu.cn/${REPO}.git sh -c &quot;$(fetch -o - https://git.sjtu.edu.cn/sjtug/ohmyzsh/-/raw/master/tools/install.sh\?inline\=false)&quot;</code></td> +</tr> +</tbody> +</table> +<h2 id="替换现有仓库上游">替换现有仓库上游</h2> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">git -C $ZSH remote set-url origin https://git.sjtu.edu.cn/sjtug/ohmyzsh.git +</code></pre></div> + + + + google-fonts + https://sjtug.org/post/mirror-help/google-fonts/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/google-fonts/ + <p>本镜像提供了 Google Fonts 的反向代理。</p> +<p><strong>使用方法</strong></p> +<pre><code>&lt;link href=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; rel=&quot;stylesheet&quot;&gt; +</code></pre><p>改为</p> +<pre><code>&lt;link href=&quot;https://google-fonts.mirrors.sjtug.sjtu.edu.cn/css?family=Roboto&quot; rel=&quot;stylesheet&quot;&gt; +</code></pre> + + + + guix + https://sjtug.org/post/mirror-help/guix/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/guix/ + <p><a href="https://guix.gnu.org/">GNU/Guix</a>是隶属于GNU项目的自由软件发行版。Guix可以作为独立的操作系统发行版安装在计算机上,可以作为软件包管理器安装在别的Linux发行版上。 +它的核心是一个函数式软件包管理器,支持事务性的升级、回滚操作。用户可以通过 +<a href="https://www.gnu.org/software/guile/">Guile</a>语言编写配置文件管理操作系统的服务或者管理用户安装的软件。</p> +<h2 id="git-镜像">Git 镜像</h2> +<p>Git 镜像的地址为 <a href="https://mirror.sjtu.edu.cn/git/guix.git">https://mirror.sjtu.edu.cn/git/guix.git</a> 。修改 <code>~/.config/guix/channels.scm</code> 文件即可在 <code>guix pull</code> 时使用。</p> +<pre><code>(list (channel + (inherit (car %default-channels)) + (url &quot;https://mirror.sjtu.edu.cn/git/guix.git&quot;))) +</code></pre><h2 id="substitute-镜像">Substitute 镜像</h2> +<p>镜像地址为 <a href="https://mirror.sjtu.edu.cn/guix/">https://mirror.sjtu.edu.cn/guix/</a>。 +镜像实现方式为智能缓存,在镜像站用户首次访问某个 nar 或 narinfo 时,它会被永久缓存在镜像上; +之后的访问将直接从镜像服务器返回数据。</p> +<ul> +<li>guix命令支持使用 <code>--substitute-urls</code> 参数为单个命令的执行临时覆盖substitute服务器,例如:</li> +</ul> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">guix package -i &lt;package&gt; --substitute-urls<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/guix/&#34;</span> +</code></pre></div><ul> +<li>如果您使用 Guix 管理整个操作系统,请修改操作系统配置文件 ,替换 +<code>substitute-urls</code> 参数。例如:</li> +</ul> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-scheme" data-lang="scheme">(<span style="color:#a6e22e">operating-system</span> + (<span style="color:#a6e22e">services</span> (<span style="color:#a6e22e">modify-services</span> %desktop-services + (<span style="color:#a6e22e">guix-service-type</span> + config <span style="color:#66d9ef">=&gt; </span>(<span style="color:#a6e22e">guix-configuration</span> + (<span style="color:#a6e22e">inherit</span> config) + (<span style="color:#a6e22e">substitute-urls</span> <span style="color:#f92672">&#39;</span>(<span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/guix/&#34;</span> + <span style="color:#e6db74">&#34;https://ci.guix.gnu.org&#34;</span>)))))) + <span style="color:#f92672">...</span> + ) +</code></pre></div><ul> +<li>如果您在别的发行版上使用 Guix 包管理器,请修改 <code>guix-daemon</code> 的 +<code>--substitute-urls</code> 参数。比如修改 <code>guix-daemon.service</code> 的 <code>ExecStart</code> 为:</li> +</ul> +<pre><code class="language-conf" data-lang="conf">ExecStart=/var/guix/profiles/per-user/root/current-guix/bin/guix-daemon --build-users-group=guixbuild --substitute-urls=&quot;https://mirror.sjtu.edu.cn/guix/&quot; +</code></pre><p>本文档的编写参考了 <a href="https://guix.org.cn/wiki/mirror/">https://guix.org.cn/wiki/mirror/</a></p> + + + + + homebrew-bottles + https://sjtug.org/post/mirror-help/homebrew-bottles/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/homebrew-bottles/ + <p>homebrew-bottles.git镜像了<a href="https://homebrew.bintray.com/">预编译的 Homebrew 软件包</a>。</p> +<p><em>SJTUG镜像同时也提供了<code>homebrew-core</code>和<code>homebrew-cask</code>镜像,欢迎大家使用。</em></p> +<p><em>若首次安装 homebrew, 请参阅 <code>brew.git</code> 的说明。</em></p> +<p>使用方法:</p> +<p>执行以下语句或加入到<code>~/.bashrc</code>中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export HOMEBREW_BOTTLE_DOMAIN<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/homebrew-bottles/bottles +</code></pre></div><p>SJTUG 镜像现已支持 ghcr.io 的 bottles 同步。</p> + + + + + immortalwrt + https://sjtug.org/post/mirror-help/immortalwrt/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/immortalwrt/ + <p>ImmortalWrt 是 OpenWrt 的一个第三方分支,主要针对国人用户开发,提供更多的本地化软件包和设备支持。</p> +<p>使用方法: +修改 <code>/etc/opkg/distfeeds.conf</code> 文件,将源地址 <code>downloads.immortalwrt.org</code> / <code>mirrors.vsean.net/openwrt</code> 修改为 +<code>mirror.sjtu.edu.cn/immortalwrt</code>,然后运行 <code>opkg update</code> 刷新软件包列表。</p> +<p>您也可以登录 LuCI 后台,进入 <code>系统</code> -&gt; <code>软件包</code> 页面,点击 <code>配置 opkg</code> 并按上述说明完成对源地址的更改。</p> + + + + + kali + https://sjtug.org/post/mirror-help/kali/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/kali/ + <p>Kali Linux 是基于Debian的Linux发行版,设计用于数字鉴识和渗透测试。由 Offensive Security Ltd 维护和资助。</p> +<p>使用方法:</p> +<p>编辑<code>/etc/apt/sources.list</code>,在头部添加:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">deb https://mirrors.sjtug.sjtu.edu.cn/kali kali-rolling main non-free contrib +deb-src https://mirrors.sjtug.sjtu.edu.cn/kali kali-rolling main non-free contrib +</code></pre></div> + + + + leopardsh + https://sjtug.org/post/mirror-help/leopardsh/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/leopardsh/ + <p>leopard.sh / tiger.sh 是一个 PPC Mac OS X 10.4-10.5 上的包管理器,提供了许多常用软件包,节省了 PowerPC Mac 漫长的编译时间</p> +<p><strong>使用说明</strong></p> +<p><strong>Mac OS X Tiger:</strong></p> +<p>下载 <code>tiger.sh</code>,并运行安装</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">curl -O http://leopard.sh/tigersh/tiger.sh +chmod +x ./tiger.sh +./tiger.sh +</code></pre></div><p>安装完成后,脚本会自己移动到<code>/usr/local/bin/tiger.sh</code>,对其进行编辑:</p> +<pre><code>TIGERSH_MIRROR=${TIGERSH_MIRROR:-https://mirror.sjtu.edu.cn/leopardsh} +</code></pre><p>并在文件开头添加:</p> +<pre><code>export TIGERSH_MIRROR_NO_HTTP=1 +export TIGERSH_MIRROR_NO_HEAD=1 +</code></pre><p><strong>Mac OS X Leopard:</strong></p> +<p>下载 <code>leopard.sh</code>,并运行安装</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">curl -O http://leopard.sh/leopardsh/leopard.sh +chmod +x ./leopard.sh +./leopard.sh +</code></pre></div><p>安装完成后,脚本会自己移动到<code>/usr/local/bin/leopard.sh</code>,对其进行编辑:</p> +<pre><code>LEOPARDSH_MIRROR=${LEOPARDSH_MIRROR:-https://mirror.sjtu.edu.cn/leopardsh} +</code></pre><p>并在文件开头添加:</p> +<pre><code>export LEOPARDSH_MIRROR_NO_HTTP=1 +export LEOPARDSH_MIRROR_NO_HEAD=1 +</code></pre> + + + + linuxliteos + https://sjtug.org/post/mirror-help/linuxliteos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/linuxliteos/ + <p>Linux Lite 是一个基于 Ubuntu 长期支持版本(LTS)的 Linux 发行版,搭载 Xfce 桌面环境。Linux Lite 的目的是将 Windows 用户引入 Linux,对新手比较友好。其旨在提供一套完整的应用程序来帮助用户满足用户日常的计算需求,这包括完整的办公套件、媒体播放器和其他基本的日常软件。</p> +<p><strong>使用方式:</strong> 在终端输入<code>sudo nano /etc/apt/sources.list</code>,删除原有内容,用以下内容代替。</p> +<pre><code>deb https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/ emerald main +</code></pre><p>然后</p> +<p><code>sudo apt update</code></p> + + + + + maven-central + https://sjtug.org/post/mirror-help/maven-central/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/maven-central/ + <p>Apache Maven仓库存放了可用于Maven的大量软件包(特别是Java软件)。目前本镜像为 <a href="http://repo.maven.apache.org/maven2/">http://repo.maven.apache.org/maven2/</a> 的反向代理,能够加速安装。</p> +<p>使用方法:</p> +<p>修改Maven根目录下的<code>conf/setting.xml</code>,增加一节<code>&lt;mirror /&gt;</code>,具体如下:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-xml" data-lang="xml"><span style="color:#f92672">&lt;mirrors&gt;</span> + <span style="color:#75715e">&lt;!-- Other mirrors... --&gt;</span> + <span style="color:#f92672">&lt;mirror&gt;</span> + <span style="color:#f92672">&lt;id&gt;</span>sjtugmaven<span style="color:#f92672">&lt;/id&gt;</span> + <span style="color:#f92672">&lt;name&gt;</span>sjtug maven<span style="color:#f92672">&lt;/name&gt;</span> + <span style="color:#f92672">&lt;url&gt;</span>https://mirrors.sjtug.sjtu.edu.cn/maven-central/<span style="color:#f92672">&lt;/url&gt;</span> + <span style="color:#f92672">&lt;mirrorOf&gt;</span>central<span style="color:#f92672">&lt;/mirrorOf&gt;</span> + <span style="color:#f92672">&lt;/mirror&gt;</span> +<span style="color:#f92672">&lt;/mirrors&gt;</span> +</code></pre></div> + + + + msys2 + https://sjtug.org/post/mirror-help/msys2/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/msys2/ + <p><strong>收录架构</strong></p> +<ul> +<li>MINGW: i686, x86_64</li> +<li>MSYS: i686, x86_64</li> +</ul> +<p><strong>获取基本组件包</strong></p> +<p>请访问该镜像目录下的<code>distrib/</code>目录(<a href="http://mirrors.sjtug.sjtu.edu.cn/msys2/distrib/x86_64/">x86_64</a>、<a href="http://mirrors.sjtug.sjtu.edu.cn/msys2/distrib/i686/">i686</a>),找到名为<code>msys2-&lt;架构&gt;-&lt;日期&gt;.exe</code>的文件(如<code>msys2-x86_64-20141113.exe</code>),下载安装即可。</p> +<p><strong>pacman的配置</strong></p> +<p>编辑<code>/etc/pacman.d/mirrorlist.mingw32</code>,在文件开头添加:</p> +<pre><code>Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686 +</code></pre><p>编辑<code>/etc/pacman.d/mirrorlist.mingw64</code>,在文件开头添加:</p> +<pre><code>Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/x86_64 +</code></pre><p>编辑<code>/etc/pacman.d/mirrorlist.msys</code>,在文件开头添加:</p> +<pre><code>Server = http://mirrors.sjtug.sjtu.edu.cn/msys2/msys/$arch +</code></pre><p>然后执行<code>pacman -Sy</code>刷新软件包数据即可。</p> +<p>注:本Help参考自<a href="https://lug.ustc.edu.cn/wiki/mirrors/help/msys2">UTSC镜像</a>和<a href="https://mirrors.tuna.tsinghua.edu.cn/help/msys2/">清华镜像</a></p> + + + + + mx-isos + https://sjtug.org/post/mirror-help/mx-isos/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/mx-isos/ + <p><a href="https://mxlinux.org/">MX Linux</a> 是一个基于Debian 稳定分支的面向桌面的Linux发行,它是antiX 及早先的MEPIS 社区合作的产物。它采用Xfce 作为缺省桌面,是一个轻量级操作系统。</p> +<p>本Repo镜像了MX Linux和AntiX的安装镜像。具体信息可以参见 <a href="https://mxlinux.org/wiki/system/iso-download-mirrors">https://mxlinux.org/wiki/system/iso-download-mirrors</a> 。</p> +<p>本站另有<code>mx-packages</code>镜像,包括了MX Linux与AntiX的软件包,欢迎大家使用。</p> + + + + + mx-packages + https://sjtug.org/post/mirror-help/mx-packages/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/mx-packages/ + <p><a href="https://mxlinux.org/">MX Linux</a> 是一个基于Debian 稳定分支的面向桌面的Linux发行,它是antiX 及早先的MEPIS 社区合作的产物。它采用Xfce 作为缺省桌面,是一个轻量级操作系统。</p> +<p>本Repo镜像了MX Linux和AntiX的软件包。</p> +<p>使用方法:</p> +<ul> +<li> +<p>(推荐)打开MX Repo Manager,选择SJTUG mirror</p> +</li> +<li> +<p>(手动): +打开<code> /etc/apt/sources.list</code>,将</p> +</li> +</ul> +<pre><code>deb http://mxrepo.com/mx/repo/ stretch non-free main +deb http://mxrepo.com/mx/testrepo/ mx7 test +</code></pre><p>替换成</p> +<pre><code>deb http://mirrors.sjtug.sjtu.edu.cn/mx-packages/mx/repo stretch main non-free +deb http://mirrors.sjtug.sjtu.edu.cn/mx-packages/mx/testrepo test +</code></pre> + + + + nix-channels/store + https://sjtug.org/post/mirror-help/nix-channels/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/nix-channels/ + <p>Nix 是一个支持 Linux 和 macOS 的函数式包管理器,具有原子更新、依赖隔离、构建尽可能可复现等特点。</p> +<p>Nixpkgs 是 Nix 包管理器对应的软件发行版,使用 Nix 函数式语言编写,除软件包外提供用于软件定制、构建、开发环境配置的工具。</p> +<p>使用方法:</p> +<p>单独安装的 Nix:编辑配置文件(系统配置位于 <code>/etc/nix/nix.conf</code>,用户配置位于 <code>~/.config/nix/nix.conf</code>):</p> +<pre><code>substituters = https://mirror.sjtu.edu.cn/nix-channels/store https://cache.nixos.org +</code></pre><p>单独安装的 Nix 在更改完配置文件之后需要重启 nix-daemon 才能应用配置。</p> +<p>NixOS 与 nix-darwin:编辑配置文件(一般来说,NixOS 配置位于 <code>/etc/nixos/configuration.nix</code>,nix-darwin 配置位于 <code>$HOME/.nixpkgs/darwin-configuration.nix</code>,如果你手动指定了 <code>NIX_PATH</code> 或是使用 Flakes 管理系统,请根据具体情况编辑对应的文件):</p> +<p>对于 NixOS 21.11(及之前的版本)与 nix-darwin:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-nix" data-lang="nix">{ config<span style="color:#f92672">,</span> lib<span style="color:#f92672">,</span> pkgs<span style="color:#f92672">,</span> <span style="color:#f92672">...</span> }: +{ + nix<span style="color:#f92672">.</span>binaryCaches <span style="color:#f92672">=</span> [ <span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/nix-channels/store&#34;</span> ]; +} +</code></pre></div><p>对于 NixOS 22.05(及之后的版本):</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-nix" data-lang="nix">{ config<span style="color:#f92672">,</span> lib<span style="color:#f92672">,</span> pkgs<span style="color:#f92672">,</span> <span style="color:#f92672">...</span> }: +{ + nix<span style="color:#f92672">.</span>settings<span style="color:#f92672">.</span>substituters <span style="color:#f92672">=</span> [ <span style="color:#e6db74">&#34;https://mirror.sjtu.edu.cn/nix-channels/store&#34;</span> ]; +} +</code></pre></div><p>NixOS 与 nix-darwin 在更改完配置之后需要 switch 到新配置后生效。</p> + + + + + nodejs-release + https://sjtug.org/post/mirror-help/nodejs-release/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/nodejs-release/ + <p>本链接反代了 <a href="https://nodejs.org/dist/">https://nodejs.org/dist/</a> 。可以在此手动下载Nodejs的安装包,也可以配合Nodejs环境使用:</p> +<ul> +<li><code>n</code>:<code>export NODE_MIRROR=https://mirrors.sjtug.sjtu.edu.cn/nodejs-release/</code></li> +<li><code>nvm</code>:<code>export NVM_NODEJS_ORG_MIRROR=https://mirrors.sjtug.sjtu.edu.cn/nodejs-release</code></li> +</ul> + + + + + npm-registry + https://sjtug.org/post/mirror-help/npm-registry/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/npm-registry/ + <p>npm-registry 源是 NodeJS 的官方包管理 npm 的仓库的反向代理,可以加速<code>npm install</code>等需要下载的命令。</p> +<p>使用方法:</p> +<ul> +<li><strong>短期使用</strong>: 在<code>npm</code>命令后加上<code>--registry=https://mirrors.sjtug.sjtu.edu.cn/npm-registry</code>的参数,即可使用SJTUG源。</li> +<li><strong>长期使用</strong>: +<ul> +<li><strong>Xnix</strong>: 打开<code>$HOME/.npmrc</code>,添加以下内容:</li> +</ul> +<pre><code>registry=https://mirrors.sjtug.sjtu.edu.cn/npm-registry +</code></pre><p>即可大幅提升下载速度。</p> +<ul> +<li><strong>Windows</strong>: 编辑<code>%USERPROFILE%\.npmrc</code>,同样加入以上内容即可使用SJTUG镜像源。</li> +</ul> +</li> +</ul> + + + + + openEuler + https://sjtug.org/post/mirror-help/openeuler/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/openeuler/ + <p>openEuler 是一个开源、免费的 Linux 发行版,将通过开放的社区形式与全球的开发者共同构建一个开放、 +多元和架构包容的软件生态体系。</p> +<p>同时,openEuler 也是一个创新的平台,鼓励任何人在该平台上提出新想法、开拓新思路、实践新方案。</p> +<h2 id="配置方法">配置方法</h2> +<p>openEuler 源包含多个版本,假定您需要使用 openEuler-20.09 版本,在 yum 源目录(<code>/etc/yum.repos.d/</code>)下新增 openEuler.repo 文件, +注意文件中的 <code>openEuler-20.09</code> 路径:</p> +<pre><code>[OS] +name=OS +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/OS/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/OS/$basearch/RPM-GPG-KEY-openEuler +[everything] +name=everything +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/everything/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/everything/$basearch/RPM-GPG-KEY-openEuler +[EPOL] +name=EPOL +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/EPOL/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/EPOL/$basearch/RPM-GPG-KEY-openEuler +[debuginfo] +name=debuginfo +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/debuginfo/$basearch/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/debuginfo/$basearch/RPM-GPG-KEY-openEuler +[source] +name=source +baseurl=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/source/ +enabled=1 +gpgcheck=1 +gpgkey=https://mirror.sjtu.edu.cn/openeuler/openEuler-20.09/source/RPM-GPG-KEY-openEuler +</code></pre><p>正常执行 <code>yum update</code> 和 <code>yum install</code> 即可。如果您在使用的过程中遇到任何问题,可以直接联系 openEuler +社区 <a href="mailto:admin@openeuler.io">admin@openeuler.io</a>,也可以通过 GitHub 向 SJTUG 反馈 bug。</p> + + + + + packagist + https://sjtug.org/post/mirror-help/packagist/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/packagist/ + <p>Packagist 是 PHP 包管理软件 Composer 的源。本镜像仅包含所有包的 metadata,并非全量同步镜像。</p> +<p><strong>使用方法</strong></p> +<p>全局设置</p> +<pre><code>composer config -g repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn +</code></pre><p>或者仅对一个项目设置</p> +<pre><code>composer config repo.packagist composer https://packagist.mirrors.sjtug.sjtu.edu.cn +</code></pre> + + + + parrot + https://sjtug.org/post/mirror-help/parrot/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/parrot/ + <p>Parrot Security OS是一个基于Debian的Linux发行版,专注于计算机安全。它专为渗透测试,漏洞评估和缓解,计算机取证和匿名Web浏览而设计。</p> +<p><strong>使用方法</strong></p> +<p>修改<code>etc/apt/sources.list.d/parrot.list</code>的以下内容:</p> +<pre><code>#stable repository +deb https://mirrors.sjtug.sjtu.edu.cn/parrot/ parrot main contrib non-free +#deb-src https://mirrors.sjtug.sjtu.edu.cn/parrot/ parrot main contrib non-free +</code></pre> + + + + putty + https://sjtug.org/post/mirror-help/putty/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/putty/ + <p>PuTTY是一个支持Telnet、SSH、rlogin、纯TCP以及串行端口连接软件。</p> +<p>使用方法:直接打开点击Download</p> + + + + + pypi-packages + https://sjtug.org/post/mirror-help/pypi-packages/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/pypi-packages/ + <p><del>2019年10月10日起,由于 PyPI 占用过多空间,我们将 PyPI 改为了反代。PyPI 源的服务质量可能有所下降。</del></p> +<p>2020年12月7日起,我们通过智能缓存全量同步了 PyPI。欢迎继续使用。</p> +<p>PyPI 是 Python 官方的包仓库,可以通过 <code>pip</code>, <code>easy_install</code> 等方式从 PyPI 安装 <code>numpy</code>, <code>tensorflow</code> 等常用包。</p> +<p>执行指令</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple +</code></pre></div><p>或者创建或编辑 <code>~/.config/pip/pip.conf</code> 文件,加入或修改 <code>index-url</code> 相关段落为:</p> +<pre><code class="language-conf" data-lang="conf">[global] +index-url = https://mirror.sjtu.edu.cn/pypi/web/simple +format = columns +</code></pre><p>临时使用:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip install -i https://mirror.sjtu.edu.cn/pypi/web/simple numpy +</code></pre></div> + + + + pypi/web/simple + https://sjtug.org/post/mirror-help/pypi/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/pypi/ + <p><del>2019年10月10日起,由于 PyPI 占用过多空间,我们将 PyPI 改为了反代。PyPI 源的服务质量可能有所下降。</del></p> +<p>2020年12月7日起,我们通过智能缓存全量同步了 PyPI。欢迎继续使用。</p> +<p>PyPI 是 Python 官方的包仓库,可以通过 <code>pip</code>, <code>easy_install</code> 等方式从 PyPI 安装 <code>numpy</code>, <code>tensorflow</code> 等常用包。</p> +<p>执行指令</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip config set global.index-url https://mirror.sjtu.edu.cn/pypi/web/simple +</code></pre></div><p>或者创建或编辑 <code>~/.config/pip/pip.conf</code> 文件,加入或修改 <code>index-url</code> 相关段落为:</p> +<pre><code class="language-conf" data-lang="conf">[global] +index-url = https://mirror.sjtu.edu.cn/pypi/web/simple +format = columns +</code></pre><p>临时使用:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip install -i https://mirror.sjtu.edu.cn/pypi/web/simple numpy +</code></pre></div> + + + + pytorch-wheels + https://sjtug.org/post/mirror-help/pytorch-wheels/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/pytorch-wheels/ + <p>pytorch-wheels 是 PyTorch pip 源的镜像。直接将 <a href="https://pytorch.org/get-started/locally/">PyTorch 安装指引</a> +中的 <code>https://download.pytorch.org/whl</code> 替换为 <code>https://mirror.sjtu.edu.cn/pytorch-wheels</code> 即可。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">pip install torch<span style="color:#f92672">===</span>1.7.1 torchvision<span style="color:#f92672">===</span>0.8.2 torchaudio<span style="color:#f92672">===</span>0.7.2 -f https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html +</code></pre></div> + + + + raspberry-pi-os-images + https://sjtug.org/post/mirror-help/raspberry-pi-os-images/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspberry-pi-os-images/ + <p>主仓库地址: <a href="http://downloads.raspberrypi.org/">http://downloads.raspberrypi.org/</a></p> +<p><strong>使用方法</strong></p> +<p>根据需要的版本进入以下包含 Raspberry Pi OS 系统镜像的目录,选择<code>.zip</code>文件下载即可。推荐使用 <a href="https://www.balena.io/etcher/">balenaEtcher</a> 将镜像写入 SD 卡</p> +<table> +<thead> +<tr> +<th>Raspberry Pi OS 版本</th> +<th>存储目录</th> +</tr> +</thead> +<tbody> +<tr> +<td>精简版 Raspberry Pi OS 系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_lite_armhf/images/">raspios_lite_armhf</a></td> +</tr> +<tr> +<td>常规版 Raspberry Pi OS 系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_armhf/images/">raspios_armhf</a></td> +</tr> +<tr> +<td>完整版 Raspberry Pi OS 系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_full_armhf/images/">raspios_full_armhf</a></td> +</tr> +<tr> +<td>精简版 Raspberry Pi OS 64位系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_lite_arm64/images/">raspios_lite_arm64</a></td> +</tr> +<tr> +<td>常规版 Raspberry Pi OS 64位系统</td> +<td><a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspios_arm64/images/">raspios_arm64</a></td> +</tr> +</tbody> +</table> +<p><strong>备注</strong></p> +<ul> +<li>暂无 Raspberry Pi OS 64位完整版系统</li> +<li>Raspberry Pi OS 是 Raspbian 的后继者,二者名称不同,但功能和界面相同。首个 Raspberry Pi OS 系统发行于 2020年5月27日</li> +<li>2012年7月15日-2020年2月14日期间发行的旧版 Raspbian 系统镜像与 Raspberry Pi OS 位于不同目录,各版本分别位于:<a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspbian_lite/images/">raspbian_lite</a>、<a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspbian/images/">raspbian</a>、<a href="https://mirrors.sjtug.sjtu.edu.cn/raspberry-pi-os-images/raspbian_full/images/">raspbian_full</a>。</li> +</ul> +<p><strong>Raspberry Pi OS 常用设置</strong></p> +<ul> +<li> +<p>无头初始化设置</p> +<ul> +<li> +<p>启用 SSH:在 SD 卡 boot 分区中创建名为 <code>ssh</code> (不应包括任何扩展名或其他字符)的空白文件</p> +</li> +<li> +<p>预设 WiFi 信息:在 SD 卡 boot 分区中创建名为 <code>wpa_supplicant.conf</code> 的文本文件,按如下格式填写 <code>YOUR_WiFi_NAME</code> 和 <code>YOUR_WiFi_PASSWORD</code> ,推荐设置为本机 WiFi 热点或拥有管理员权限的无线路由器 WiFi ,以便查找树莓派的 IP 地址</p> +<pre><code>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev +update_config=1 +country=CN + +network={ + ssid=&quot;YOUR_WiFi_NAME&quot; + psk=&quot;YOUR_WiFi_PASSWORD&quot; +} +</code></pre></li> +<li> +<p>远程连接:插卡启动树莓派,在 WiFi 热点中查询 IP 分配情况,确认树莓派的 IP 地址,使用 SSH 进行远程连接。树莓派的默认 SSH 端口为 22,用户名为 <code>pi</code> ,默认密码为 <code>raspberry</code></p> +</li> +</ul> +</li> +<li> +<p>命令行下的设置</p> +<ul> +<li>在终端输入 <code>sudo raspi-config</code> 命令进行基本设置。可将时区设置为 <code>Asia/Shanghai</code> ,将默认区域更改为 <code>en_US.UTF-8</code> (英文)或 <code>zh_CN.UTF-8</code> (中文);连接USB键盘时,可将键盘布局修改为美式键盘(Generic 104-key PC -&gt; Other -&gt; English (US) -&gt; English (US));同时还可启用 VNC 以进行远程桌面连接。</li> +</ul> +</li> +<li> +<p>图形界面下的设置</p> +<ul> +<li>首次进入桌面时,根据提示进行鼠标操作设置即可</li> +</ul> +</li> +<li> +<p>apt 软件源修改</p> +<ul> +<li> +<p>Raspberry Pi OS 系统镜像内预置的 apt 软件源在国内访问缓慢,可将 apt 软件源更改为 SJTUG 镜像源</p> +<ul> +<li>将 <code>/etc/apt/sources.list</code> 文件中的 raspbian 存储库由 <code>http://raspbian.raspberrypi.org/raspbian/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/</code> ,对于64位 Raspberry Pi OS ,将 <code>http://deb.debian.org/debian/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/debian/</code> ,将 <code>http://deb.debian.org/debian-security/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/debian-security/</code></li> +<li>将 <code>/etc/apt/sources.list.d/raspi.list</code> 文件中的 raspberrypi 存储库由 <code>http://archive.raspberrypi.org/debian/</code> 更改为 <code>https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/</code></li> +</ul> +</li> +<li> +<p>可输入以下命令完成 apt 软件源设置(截至 2021-05-28 版仍然适用)</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak +sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak +sudo sed -i <span style="color:#e6db74">&#34;s|http://raspbian.raspberrypi.org/raspbian/|https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/|g&#34;</span> /etc/apt/sources.list +sudo sed -i <span style="color:#e6db74">&#34;s|http://deb.debian.org/debian|https://mirrors.sjtug.sjtu.edu.cn/debian|g&#34;</span> /etc/apt/sources.list +sudo sed -i <span style="color:#e6db74">&#34;s|http://archive.raspberrypi.org/debian/|https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/|g&#34;</span> /etc/apt/sources.list.d/raspi.list +sudo apt update +</code></pre></div></li> +</ul> +</li> +<li> +<p>添加 Raspbian 非官方软件源 Raspbian Addons(可选)</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">wget -qO- https://mirror.sjtu.edu.cn/raspbian-addons/KEY.gpg | sudo apt-key add - +echo <span style="color:#e6db74">&#34;deb https://mirror.sjtu.edu.cn/raspbian-addons/debian precise main&#34;</span> | sudo tee /etc/apt/sources.list.d/raspbian-addons.list +sudo apt update +</code></pre></div></li> +<li> +<p>软件包更新</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">sudo apt update <span style="color:#f92672">&amp;&amp;</span> sudo apt upgrade -y <span style="color:#f92672">&amp;&amp;</span> sudo apt autoremove -y +</code></pre></div></li> +</ul> + + + + + raspberrypi + https://sjtug.org/post/mirror-help/raspberrypi/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspberrypi/ + <p>raspberrypi是树莓派基金会提供的软件源,包括 ui 相关程序及部分由树莓派基金会为树莓派编写的软件。</p> +<p><strong>使用方法</strong></p> +<p>将<code>/etc/apt/sources.list.d/raspi.list</code>中的<code>http://archive.raspberrypi.org/debian/</code>更换成<code>https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/</code>。</p> + + + + + raspbian + https://sjtug.org/post/mirror-help/raspbian/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspbian/ + <p>Raspberry Pi OS 是为树莓派设计,基于 Debian 的操作系统。本镜像提供了 Raspberry Pi OS 的官方软件源。</p> +<p><strong>使用方法</strong></p> +<p>更换软件源:</p> +<p>编辑<code>/etc/apt/sources.list</code>,将所有的<code>deb</code>与<code>deb-src</code>之后的网址替换成<code>https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/</code>。</p> + + + + + raspbian-addons + https://sjtug.org/post/mirror-help/raspbian-addons/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/raspbian-addons/ + <p>Raspbian Addons 是 Raspbian 非官方软件源,含有许多来自 GitHub 的开源软件,可作为对 Raspbian(Debian) 官方仓库的一个补充。</p> +<ul> +<li>项目主页:https://raspbian-addons.org</li> +<li>官方文档:https://docs.raspbian-addons.org</li> +<li>GitHub 主页:https://github.com/raspbian-addons</li> +</ul> +<p>支持架构:armhf、arm64</p> +<h2 id="使用方法">使用方法</h2> +<p>信任仓库的 GPG 公钥</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">wget -qO- https://mirror.sjtu.edu.cn/raspbian-addons/KEY.gpg | sudo apt-key add - +</code></pre></div><p>添加该仓库</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">echo <span style="color:#e6db74">&#34;deb https://mirror.sjtu.edu.cn/raspbian-addons/debian precise main&#34;</span> | sudo tee /etc/apt/sources.list.d/raspbian-addons.list +</code></pre></div><p>更新软件包缓存</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sudo apt update +</code></pre></div> + + + + rocky + https://sjtug.org/post/mirror-help/rocky/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/rocky/ + <p>使用方法:运行下面的指令一键替换并备份。</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">sed -e <span style="color:#e6db74">&#39;s|^mirrorlist=|#mirrorlist=|g&#39;</span> <span style="color:#ae81ff">\ +</span><span style="color:#ae81ff"></span> -e <span style="color:#e6db74">&#39;s|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.sjtug.sjtu.edu.cn/rocky|g&#39;</span> <span style="color:#ae81ff">\ +</span><span style="color:#ae81ff"></span> -i.bak <span style="color:#ae81ff">\ +</span><span style="color:#ae81ff"></span> /etc/yum.repos.d/Rocky-*.repo +</code></pre></div><p>最后运行 <code>dnf makecache</code> 生成缓存</p> + + + + + ros + https://sjtug.org/post/mirror-help/ros/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ros/ + <p>使用方式:</p> +<p>可使用<code>gedit</code>等文本编辑器修改<code>/etc/apt/sources.list.d/ros-latest.list</code>。修改后使用<code>sudo apt update</code>更新软件源。</p> +<p>Ubuntu 18.04 (ROS Melodic)</p> +<pre><code>deb https://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu bionic main +</code></pre><p>Ubuntu 20.04 (ROS Noetic)</p> +<pre><code>deb https://mirrors.sjtug.sjtu.edu.cn/ros/ubuntu focal main +</code></pre> + + + + rust-static + https://sjtug.org/post/mirror-help/rust-static/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/rust-static/ + <p>rust-static储存了rust的工具链及<code>rustup</code>本身的镜像。</p> +<p>使用方法:安装<code>rustup</code>,将以下环境变量加入<code>~/.bashrc</code>或类似文件中:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">export RUSTUP_DIST_SERVER<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/rust-static +export RUSTUP_UPDATE_ROOT<span style="color:#f92672">=</span>https://mirror.sjtu.edu.cn/rust-static/rustup +</code></pre></div> + + + + ubuntu + https://sjtug.org/post/mirror-help/ubuntu/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu/ + <p>Ubuntu是一个基于Debian的Linux发行版,包含了常用的大量软件包。Ubuntu的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。Ubuntu目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。</p> +<p>SJTUG镜像源可以加速软件包的安装。</p> +<p>使用方式:</p> +<p>使用<code>sudo nano /etc/apt/sources.list</code>打开镜像源列表文件。将类似于<code>http://cn.archive.ubuntu.com/ubuntu</code>或<code>http://cn.archive.ubuntu.com/ubuntu</code>的地址改成<code>https://mirror.sjtu.edu.cn/ubuntu</code>,之后按<code>Ctrl-O 回车</code>保存,按<code>Ctrl-X</code>退出。最后执行<code>sudo apt update</code>即可。</p> +<p>镜像站一天同步一次 Ubuntu 镜像。为了取得最新的安全更新,我们不建议您将 <code>security.ubuntu.com</code> 换成镜像源。</p> +<p>您也可使用<code>sudo sed -i 's/http:\/\/cn.archive.ubuntu.com/https:\/\/mirror.sjtu.edu.cn/g' /etc/apt/sources.list</code>指令直接批量修改。</p> +<p>以下为修改后的镜像源列表文件的示例。可使用<code>gedit</code>等文本编辑器修改<code>/etc/apt/sources.list</code>。修改后使用<code>sudo apt update</code>更新软件源。</p> +<p>Ubuntu 18.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu/ bionic main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 20.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu/ focal main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ focal-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 22.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu/ jammy main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse +</code></pre><p>其中<code>deb-src</code>为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。</p> + + + + + ubuntu-cd + https://sjtug.org/post/mirror-help/ubuntu-cd/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-cd/ + <p>Ubuntu 是一个基于 Debian 的 Linux 发行版。 Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。 Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。</p> +<p>本镜像主要收录还在生命周期内 x86 和 arm 架构的镜像,包括开发版,不包括超过 End of Standard Support 后进入 ESM 的镜像。</p> +<p>您可以通过 <a href="https://wiki.ubuntu.com/Releases">https://wiki.ubuntu.com/Releases</a> 查看现在还在生命周期内的镜像。</p> +<p>更多衍生发行版和其他架构非桌面版本请至 <a href="https://mirror.sjtu.edu.cn/ubuntu-cdimage/">https://mirror.sjtu.edu.cn/ubuntu-cdimage/</a> 查看,或者在 <a href="https://mirror.sjtu.edu.cn/docs/ubuntu-cdimage">https://mirror.sjtu.edu.cn/docs/ubuntu-cdimage</a> 获取该镜像使用帮助。</p> + + + + + ubuntu-cdimage + https://sjtug.org/post/mirror-help/ubuntu-cdimage/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-cdimage/ + <p>Ubuntu 是一个基于 Debian 的 Linux 发行版。 Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。 Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。</p> +<p>本镜像提供现在维护版本的每日构建版本、 Ubuntu 原版的 server 版本和 Ubuntu 衍生版本,提供这些版本的多个架构支持。</p> +<p>Ubuntu 衍生版现在包括 Kubuntu(KDE) 、 Xubuntu(Xfce) 、 Ubuntu Budgie 、 Ubuntu Studio 、 Lubuntu(LXDE) 、 Ubuntu Kylin (优麒麟)、Ubuntu MATE 、Ubuntu Budgie(Budgie),可以进入相关目录下载衍生版的镜像。</p> +<p>你可以查看 <a href="https://wiki.ubuntu.com/UbuntuFlavors">https://wiki.ubuntu.com/UbuntuFlavors</a> 现在所支持的 Ubuntu 衍生版本和已经不受到支持的 Ubuntu 衍生版本。</p> +<p>如果你正在寻找原版的桌面版本,你可以在 <a href="https://mirror.sjtu.edu.cn/ubuntu-cd/">https://mirror.sjtu.edu.cn/ubuntu-cd/</a> 获取, +也可以在这查看使用帮助 <a href="https://mirror.sjtu.edu.cn/docs/ubuntu-cd">https://mirror.sjtu.edu.cn/docs/ubuntu-cd</a>。</p> + + + + + ubuntu-cloud-images + https://sjtug.org/post/mirror-help/ubuntu-cloud-images/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-cloud-images/ + <p>本镜像为 OpenStack, LXD 等公有云使用的 Ubuntu 镜像,收录官方的云 Ubuntu 镜像,由 Canonical 定制,提供 Ubuntu 认证镜像,可在 OpenStack, LXD 等公有云上运行。</p> +<p>本镜像包含 KVM, Hyper-V, Xen 等虚拟结构的官方定制镜像。</p> +<p><strong>使用方法</strong></p> +<p>可以使用 <a href="https://mirror.sjtu.edu.cn/ubuntu-cloud-images/locator">https://mirror.sjtu.edu.cn/ubuntu-cloud-images/locator/</a> 查找公有云使用的镜像。</p> + + + + + ubuntu-ports + https://sjtug.org/post/mirror-help/ubuntu-ports/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/ubuntu-ports/ + <p>使用方式:</p> +<p>可使用<code>gedit</code>等文本编辑器修改<code>/etc/apt/sources.list</code>。修改后使用<code>sudo apt update</code>更新软件源。</p> +<p>Ubuntu 18.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ bionic-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 20.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ focal-proposed main restricted universe multiverse +</code></pre><p>Ubuntu 22.04</p> +<pre><code>deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-updates main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-backports main restricted universe multiverse +deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-security main restricted universe multiverse + +# deb https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse +# deb-src https://mirror.sjtu.edu.cn/ubuntu-ports/ jammy-proposed main restricted universe multiverse +</code></pre><p>其中<code>deb-src</code>为源码镜像,默认注释以提高速度。可将原镜像列表备份后替换为上述内容。</p> + + + + + voidlinux + https://sjtug.org/post/mirror-help/voidlinux/ + Mon, 01 Jan 0001 00:00:00 +0000 + + https://sjtug.org/post/mirror-help/voidlinux/ + <p>Void linux 是基于 Linux 内核独立开发的通用操作系统。其特色在于一份二进制/源代码混合式包管理系统,这使得用户能快速安装、更新、移除软件,或者是借助 XBPS 源代码集合从源码直接生成软件。该发行的其他特性包括对 Raspberry Pi 单板计算机(armv6 和 armv7)的支持,每日更新的滚动式开发模式,可以选择 glibc 和 musl 作为 C 库,以及名为 runit 的原生 BSD 风格 init 系统。</p> +<p>使用方法:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-sh" data-lang="sh">mkdir -p /etc/xbps.d +cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ +sed -i <span style="color:#e6db74">&#39;s|https://alpha.de.repo.voidlinux.org|https://mirror.sjtu.edu.cn/voidlinux|g&#39;</span> /etc/xbps.d/*-repository-*.conf +</code></pre></div><p>之后可用 <code>xbps-query -L</code> 检查是否正确替换。</p> +<p>运行 <code>xbps-install -Su</code> 刷新镜像并更新系统。</p> +<p>请前往<a href="https://docs.voidlinux.org/xbps/repositories/mirrors/changing.html">官方教程</a>获取更多信息。</p> + + + + + \ No newline at end of file diff --git a/tags/mirror-help/page/1/index.html b/tags/mirror-help/page/1/index.html new file mode 100644 index 00000000..7bf368bf --- /dev/null +++ b/tags/mirror-help/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/mirror-help/ \ No newline at end of file diff --git a/tags/mirror-help/page/2/index.html b/tags/mirror-help/page/2/index.html new file mode 100644 index 00000000..5e7b83cb --- /dev/null +++ b/tags/mirror-help/page/2/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/page/3/index.html b/tags/mirror-help/page/3/index.html new file mode 100644 index 00000000..ff0f0b9d --- /dev/null +++ b/tags/mirror-help/page/3/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/page/4/index.html b/tags/mirror-help/page/4/index.html new file mode 100644 index 00000000..2018a8c8 --- /dev/null +++ b/tags/mirror-help/page/4/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/page/5/index.html b/tags/mirror-help/page/5/index.html new file mode 100644 index 00000000..7e264fc0 --- /dev/null +++ b/tags/mirror-help/page/5/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/page/6/index.html b/tags/mirror-help/page/6/index.html new file mode 100644 index 00000000..b7f0b385 --- /dev/null +++ b/tags/mirror-help/page/6/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/page/7/index.html b/tags/mirror-help/page/7/index.html new file mode 100644 index 00000000..95da0340 --- /dev/null +++ b/tags/mirror-help/page/7/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-help/page/8/index.html b/tags/mirror-help/page/8/index.html new file mode 100644 index 00000000..821ab9df --- /dev/null +++ b/tags/mirror-help/page/8/index.html @@ -0,0 +1,131 @@ + + + + + + + + + + mirror-help · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-news/index.html b/tags/mirror-news/index.html new file mode 100644 index 00000000..0fbdcd51 --- /dev/null +++ b/tags/mirror-news/index.html @@ -0,0 +1,239 @@ + + + + + + + + + + mirror-news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-news/index.xml b/tags/mirror-news/index.xml new file mode 100644 index 00000000..b98832e4 --- /dev/null +++ b/tags/mirror-news/index.xml @@ -0,0 +1,677 @@ + + + mirror-news on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/mirror-news/ + Recent content in mirror-news on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Thu, 02 Nov 2023 12:08:00 -0700 + + + + + + 思源镜像站 11/03 服务异常中断 + https://sjtug.org/post/mirror-news/2023-11-03-outage/ + Thu, 02 Nov 2023 12:08:00 -0700 + + https://sjtug.org/post/mirror-news/2023-11-03-outage/ + <p>由于上游交大云服务故障,思源镜像站 (mirror.sjtu.edu.cn) 于 11/03 1:12 至 05:07 服务中断,总故障时间 3 小时 55 分钟。在此过程中,致远镜像站 (mirrors.sjtug.sjtu.edu.cn) 的部分存储服务也受到影响导致无法访问。现在本站所有服务已经恢复正常。</p> + + + + + 镜像站将于9月19-20日上午4时维护 + https://sjtug.org/post/mirror-news/2023-09-19-maintain/ + Tue, 12 Sep 2023 17:30:00 -0700 + + https://sjtug.org/post/mirror-news/2023-09-19-maintain/ + <p>SJTUG 软件源镜像站的两台服务器将分别于 2023年9月19日周二 上午4时 UTC+8 及 2023年9月20日周三 上午4时 UTC+8 进行服务器架构升级,停机窗口详见下文。届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 和 mirror.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 37 升级到 Fedora 38。</li> +<li>将思源镜像服务器的操作系统从 Debian 11 升级到 Debian 12。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年9月19日 上午4时起,我们将对致远镜像站 (mirrors.sjtug.sjtu.edu.cn) 进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。</li> +<li>2023年9月20日 上午4时起,我们将对思源镜像站 (mirror.sjtu.edu.cn) 进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站自6月3日起公网服务不可用 + https://sjtug.org/post/mirror-news/2023-06-03-maintain/ + Sat, 03 Jun 2023 16:00:00 +0800 + + https://sjtug.org/post/mirror-news/2023-06-03-maintain/ + <p>由于上游校园主干网络临时维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。</p> +<p>本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年6月3日 (周六) 至 2023年6月5日(周一):上游校园主干网络维护</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> +<p>2023年6月3日 19:00 更新:不可用时间窗口更新</p> + + + + + 镜像站将于2月22日下午4时及2月23日上午8时15分维护 + https://sjtug.org/post/mirror-news/2023-02-23-maintain/ + Mon, 20 Feb 2023 09:30:00 +0800 + + https://sjtug.org/post/mirror-news/2023-02-23-maintain/ + <p>SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2023年2月22日周三 至 2023年2月23日周四 UTC+8 部分时段进行服务器架构升级,停机窗口详见下文。届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 35 升级到 Fedora 37。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年2月22日 下午4时起,我们将对致远镜像站进行初期升级。初期升级将在 30 分钟内完成,期间可能会出现服务中断的情况。</li> +<li>2023年2月23日 上午4时起,我们将对致远镜像站进行主版本升级。系统升级将在 2 小时内完成,期间将停止服务。如出现兼容性问题,可能会中断更长时间。</li> +<li>2023年2月23日 上午8时15分起,我们将更新配置。系统配置将在 1 小时内完成,期间可能会出现服务中断的情况。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站将于2月17日上午8时45分维护 + https://sjtug.org/post/mirror-news/2023-02-17-maintain/ + Wed, 15 Feb 2023 17:00:00 +0800 + + https://sjtug.org/post/mirror-news/2023-02-17-maintain/ + <p>SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2023年2月17日周五 上午8时45分 UTC+8 进行硬件检修。在此期间服务会中断大约一小时。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。与此同时,思源服务器 (mirror.sjtu.edu.cn) 上的软件源将不受影响。</p> +<p>本次维护将会对服务器上的硬件进行维护,以提供更好的使用体验。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2023年2月17日 (周五) 上午8时45分:我们将使致远服务器离线并进行硬件维护,在此期间服务会中断约一小时。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站于10月16日至10月24日公网服务不可用 + https://sjtug.org/post/mirror-news/2022-10-16-maintain/ + Sun, 16 Oct 2022 00:00:00 +0800 + + https://sjtug.org/post/mirror-news/2022-10-16-maintain/ + <p>接上海交通大学网络信息中心通知,由于上游校园主干网络维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。</p> +<p>本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2022年10月16日 (周日) 至 2022年10月24日(周一):上游校园主干网络维护</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站于6月2日至6月6日公网服务不可用 + https://sjtug.org/post/mirror-news/2022-06-02-maintain/ + Thu, 02 Jun 2022 21:30:00 +0800 + + https://sjtug.org/post/mirror-news/2022-06-02-maintain/ + <p>接上海交通大学网络信息中心通知,由于上游校园主干网络维护,SJTUG 软件源镜像站 (mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn) 目前公网服务中断。</p> +<p>本次服务中断的影响范围是 mirror.sjtu.edu.cn 及 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2022年6月2日 (周四) 至 2022年6月6日(周一):上游校园主干网络维护</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站将于11月14日周日上午4时维护 + https://sjtug.org/post/mirror-news/2021-11-05-maintain/ + Fri, 05 Nov 2021 13:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-11-05-maintain/ + <p>SJTUG 软件源镜像站的致远服务器 (mirrors.sjtug.sjtu.edu.cn) 将于 2021年11月14日周日 上午4时 UTC+8 进行系统升级。在此期间服务会中断大约半小时。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 33 升级到 Fedora 35。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2021年11月12日 (周五) 上午8时:我们将升级服务器上的软件包,并进行重启,为周日的升级做准备。期间服务可能会中断 5 分钟。</li> +<li>2021年11月14日 (周日) 上午4时:服务器将重启进行系统升级,在此期间服务会中断大约半小时。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> + + + + + 镜像站10月7日9时起服务不可用 (已恢复) + https://sjtug.org/post/mirror-news/2021-10-07-outage/ + Thu, 07 Oct 2021 09:45:00 +0800 + + https://sjtug.org/post/mirror-news/2021-10-07-outage/ + <p>由于 mirrors.sjtug.sjtu.edu.cn 升级时出现问题,镜像站服务目前处于不完全可用状态。我们正在调查服务器升级失败的原因,并尝试重启服务器。</p> +<ul> +<li>上午11时更新:初步确定服务器无法启动的原因是意外将三年前的 grub 配置覆盖了最新配置,导致无法正常进入系统。正在尝试重新生成 grub 引导配置。</li> +<li>下午3时更新:我们已经进入 Fedora recovery mode 进行修复工作。</li> +<li>8日上午9时更新:服务已经恢复。我们还将做一些维护工作,期间可能有服务中断。</li> +</ul> + + + + + 关于近期 HTTPS 证书问题的相关提示 (已更新证书) + https://sjtug.org/post/mirror-news/2021-10-04-cert/ + Mon, 04 Oct 2021 00:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-10-04-cert/ + <p>SJTUG 软件源镜像使用 Let&rsquo;s Encrypt 签发的 HTTPS 证书提供服务。2021 年 9 月 30 日晚上 10 时,用于交叉签名根证书的 <a href="https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/">DST Root CA X3 过期</a>。因此,在老版本系统中,您可能会碰到错误的“证书过期”提示。</p> +<p>如果您在更新软件包时遇到困难,可以参考对应软件源的帮助文档,先将软件源设置成 HTTP 协议访问;而后参考 <a href="https://github.com/tuna/issues/issues/1342#issuecomment-931412628">TUNA 的解决方案</a> 更新您的系统,从而从 SJTUG 镜像站获取最新的软件更新。</p> +<ul> +<li>10月12日0时更新:mirrors.sjtug.sjtu.edu.cn 已经去掉了 DST Root CA X3,证书链仅保留 ISRG Root X1。</li> +<li>10月12日0时更新:mirror.sjtu.edu.cn 已经去掉了 DST Root CA X3,证书链仅保留 ISRG Root X1。</li> +</ul> + + + + + 镜像站将于10月6-7日上午8时维护 + https://sjtug.org/post/mirror-news/2021-09-26-maintain/ + Sun, 26 Sep 2021 13:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-09-26-maintain/ + <p>SJTUG 软件源镜像站的两台服务器将分别于 2021年10月6日 上午8时 UTC+8 和 2021年10月7日 上午8时 UTC+8 起进行服务器架构升级,届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 和 mirror.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将致远镜像服务器的操作系统从 Fedora 31 升级到 Fedora 33。</li> +<li>将思源镜像服务器的操作系统从 Debian 10 升级到 Debian 11。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>2021年10月6日 上午8时起,我们将首先维护思源镜像站 (mirror.sjtu.edu.cn)。Debian 系统升级将在 30 分钟内完成,期间可能会出现服务中断的情况。</li> +<li>之后将进行机器重启,思源镜像站的所有服务可能会出现 5 分钟左右的中断。如出现兼容性问题,可能会中断更长时间。</li> +<li>2021年10月7日 上午4时起,我们将维护致远镜像站 (mirrors.sjtug.sjtu.edu.cn)。Fedora 系统升级将在 2 小时内完成,期间将停止服务。</li> +<li>2021年10月7日 上午8时起,我们将更新配置。Fedora 系统配置将在 30 分钟内完成,期间可能会出现服务中断的情况。</li> +</ul> +<p>感谢您对 SJTUG 镜像站的关注。</p> +<p><em>更新:致远镜像站将升级到 Fedora 33 而非 Fedora 34。</em></p> +<p><em>更新:致远镜像站将会在 4 时起停机更新,而非 8 时。</em></p> + + + + + 新增 DGL, Fedora Rawhide, OpenBSD, Raspbian Addons, Ubuntu Kylin, Ubuntu Cloud Images, Zorinos ISOs 镜像 + https://sjtug.org/post/mirror-news/2021-08-26-new-mirrors/ + Thu, 26 Aug 2021 15:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-08-26-new-mirrors/ + <p>SJTUG 软件源镜像在近期添加了一批新的镜像源。</p> +<ul> +<li>添加 Raspbian Addons 镜像。<a href="https://github.com/sjtug/mirror-docker-unified/pull/261">PR#261</a></li> +<li>添加 Fedora Rawhide 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/264">PR#264</a></li> +<li>添加 DGL (anaconda/cloud/dglteam) 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/268">PR#268</a></li> +<li>添加 OpenBSD 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/269">PR#269</a></li> +<li>添加 Ubuntu Kylin 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/270">PR#270</a></li> +<li>添加 Zorinos ISOs 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/271">PR#271</a></li> +<li>添加 Ubuntu Cloud Images 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/275">PR#275</a></li> +</ul> +<p>与此同时,我们也做了一些功能上的更新:</p> +<ul> +<li>修复了 ghcup 的同步。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/274">PR#274</a></li> +<li>Caddy Web Server 升级到了 2.4.3。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/271">PR#271</a></li> +<li>Zhiyuan 镜像服务器 (mirrors.sjtug) 支持 IPv6。</li> +</ul> +<p>欢迎大家使用。</p> + + + + + 新增 AlmaLinux, Armbian, Fedora development, ghcup, Linux kernel, Rocky Linux 镜像 + https://sjtug.org/post/mirror-news/2021-05-25-new-mirrors/ + Tue, 25 May 2021 14:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-05-25-new-mirrors/ + <p>SJTUG 软件源镜像在近期添加了一批新的镜像源。</p> +<ul> +<li>添加 ghcup 镜像。<a href="https://github.com/sjtug/mirror-docker-unified/pull/225">PR#225</a></li> +<li>添加 Armbian 和 AlmaLinux 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/227">PR#227</a></li> +<li>添加 Linux kernel 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/228">PR#228</a></li> +<li>添加了 Fedora development 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/236">PR#236</a> <a href="https://github.com/sjtug/mirror-docker-unified/pull/238">PR#238</a></li> +<li>添加了 Rocky Linux 镜像 <a href="https://github.com/sjtug/mirror-docker-unified/pull/246">PR#246</a></li> +</ul> +<p>与此同时,我们也做了一些功能上的更新:</p> +<ul> +<li>Homebrew 支持从 ghcr.io 同步。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/245">PR#245</a></li> +<li>Rsync 的磁盘限制大大减小,可以为下游提供文件同步服务了。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/240">PR#240</a></li> +<li>git 源切换到了 git.sjtu.edu.cn 提供服务,用户体验更好。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/249">PR#249</a></li> +<li>Caddy Web Server 升级到了 2.4.0。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/248">PR#248</a></li> +</ul> +<p>欢迎大家使用。</p> + + + + + 新增 conda-forge/osx-arm64, GIMP, MacPorts, VSCodium 镜像 + https://sjtug.org/post/mirror-news/2021-03-23-new-mirrors/ + Tue, 23 Mar 2021 14:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-03-23-new-mirrors/ + <p>SJTUG 软件源镜像在本月添加了一批新的镜像源。</p> +<ul> +<li>conda-forge 添加了 Apple M1 平台支持。<a href="https://github.com/sjtug/mirror-docker-unified/pull/222">PR#222</a></li> +<li>GIMP <a href="https://github.com/sjtug/mirror-docker-unified/pull/220">PR#220</a></li> +<li>MacPorts <a href="https://github.com/sjtug/mirror-docker-unified/pull/216">PR#216</a></li> +<li>VSCodium <a href="https://github.com/sjtug/mirror-docker-unified/pull/208">PR#208</a></li> +</ul> +<p>与此同时,我们也做了一些功能上的更新:</p> +<ul> +<li>存储在 SJTU S3 上的软件源现在可以浏览所有文件了。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/212">PR#212</a></li> +<li>Flutter 切换到了新上游。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/209">PR#209</a></li> +<li>openSUSE 添加到了官方源。 <a href="https://github.com/sjtug/mirror-docker-unified/pull/215">PR#215</a></li> +</ul> +<p>欢迎大家使用。</p> + + + + + 新增 Bioconductor, openEuler, Void Linux, Wireshark 镜像 + https://sjtug.org/post/mirror-news/2021-03-06-new-mirrors/ + Sat, 06 Mar 2021 18:40:00 +0800 + + https://sjtug.org/post/mirror-news/2021-03-06-new-mirrors/ + <p>近期,SJTUG 的镜像同步工具 mirror-clone <a href="https://github.com/sjtug/mirror-clone/pull/57">添加了 Rsync 支持</a>。 +在此基础上,我们增加了 Bioconductor, Void Linux 和 Wireshark 镜像。这三个镜像都存储在 SJTU 对象存储服务上。 +从这些软件源下载软件时,您会被自动重定向到 SJTU 对象存储服务。</p> +<p>我们还增加了 openEuler 镜像,存储在思源 (mirror.sjtu.edu.cn) 服务器上。</p> +<p>您可以参阅镜像站首页的帮助文档,配置相关软件使用 SJTUG 镜像。</p> +<p>与此同时,由于致远服务器压力过大,我们将部分软件源迁移到了其他存储中。您可以调整相关软件的设置,以取得最好的使用体验。</p> +<ul> +<li>manjaro 迁移到了思源服务器。</li> +<li>archlinux 迁移到了思源服务器。</li> +<li>ctan 迁移到了思源服务器。</li> +<li>anaconda 迁移到了 SJTU 对象存储服务。</li> +</ul> +<p>欢迎大家使用。</p> + + + + + 镜像站将于2月17日上午8时维护 + https://sjtug.org/post/mirror-news/2021-02-10-maintain/ + Wed, 10 Feb 2021 13:00:00 +0800 + + https://sjtug.org/post/mirror-news/2021-02-10-maintain/ + <p>SJTUG 软件源镜像站致远镜像服务器将于 2021年2月17日 上午8时 UTC+8 起进行服务器架构升级,届时服务将会出现短时间的不可用,希望大家予以谅解。</p> +<p>本次维护的影响范围是 mirrors.sjtug.sjtu.edu.cn 上存储的所有软件源。</p> +<p>本次维护将会对服务器上的镜像站软件架构进行升级,以提供更好的使用体验。升级内容包括:</p> +<ul> +<li>将 ftp.sjtu.edu.cn 的反向代理源更改为思源镜像服务器的对应镜像。</li> +<li>解决部分目录重定向到错误路径导致 404 的问题。</li> +<li>停止提供 nodejs-release, maven-central, npm-registry, google-fonts 服务,相关服务会重定向到上游。 +技术详情可以参阅 <a href="https://github.com/sjtug/mirror-docker-siyuan/projects/1">Zhiyuan Migration Project</a>。</li> +</ul> +<p>本次维护的服务不可用时间窗口预计如下。</p> +<ul> +<li>维护前 24 小时停止 rsync 服务,使得上游不再将用户重定向到本镜像站。</li> +<li>Web 服务器重启将在 5 分钟内完成。在此期间,所有软件源均不可用。</li> +<li>同步服务重启将在 30 分钟内完成。在此期间,前端将无法显示同步状态。</li> +<li>涉及到子域名的服务(如 Docker 反代、anaconda)可能无法立即正常提供服务,在 1 小时内可以恢复。</li> +</ul> +<p>在新年来临之际,我谨代表 SJTUG 镜像站维护人员,祝大家在即将到来的一年里,阖家欢乐,万事如意。</p> + + + + + 新增 apache, DragonFlyBSD 等镜像 + https://sjtug.org/post/mirror-news/2021-01-04-siyuan-available/ + Mon, 04 Jan 2021 16:30:00 +0800 + + https://sjtug.org/post/mirror-news/2021-01-04-siyuan-available/ + <p>SJTUG 的新服务器“思源 (Siyuan)”服务器已经在 <a href="https://mirror.sjtu.edu.cn">https://mirror.sjtu.edu.cn</a> 上线。 +该服务器兼容原 <a href="https://ftp.sjtu.edu.cn">ftp.sjtu.edu.cn</a> 服务器提供的服务,并在此基础上增加了许多软件源镜像。 +原先的 <a href="https://ftp.sjtu.edu.cn">ftp.sjtu.edu.cn</a> 将在近几个月内解析至 SJTUG 思源镜像服务器。</p> +<p>新服务器兼容以下 18 个 <a href="https://ftp.sjtu.edu.cn">ftp.sjtu.edu.cn</a> 上的软件源镜像。</p> +<ul> +<li>centos</li> +<li>debian</li> +<li>debian-cd</li> +<li>debian-security</li> +<li>deepin</li> +<li>deepin-cd</li> +<li>fedora/linux</li> +<li>fedora/epel</li> +<li>fedora-secondary</li> +<li>linuxmint</li> +<li>linuxmint-cd</li> +<li>mageia</li> +<li>opensuse</li> +<li>openvz</li> +<li>remi</li> +<li>scientific</li> +<li>ubuntu</li> +<li>ubuntu-cd</li> +</ul> +<p>新服务器新增了以下 8 个镜像。</p> +<ul> +<li>apache</li> +<li>docker-ce</li> +<li>ubuntu-cdimage</li> +<li>ubuntu-ports</li> +<li>openwrt</li> +<li>rpmfusion</li> +<li>dragonflybsd/dports</li> +<li>dragonflybsd/iso-images</li> +</ul> +<p>与此同时,我们也上线了大量常用 git 仓库镜像。</p> +<p>欢迎大家继续使用 SJTUG 镜像站。</p> + + + + + 新增 FreeCAD 镜像与 GitHub Release 智能缓存 + https://sjtug.org/post/mirror-news/2021-01-02-add-github-release-freecad/ + Sat, 02 Jan 2021 09:55:00 +0800 + + https://sjtug.org/post/mirror-news/2021-01-02-add-github-release-freecad/ + <p>FreeCAD 镜像可以在 <a href="https://mirrors.sjtug.sjtu.edu.cn/github-release/FreeCAD/FreeCAD/releases/download/?mirror_intel_list">这里</a> 访问,我们已经全量同步了近 3 个版本。</p> +<p>目前 GitHub Release 智能缓存只开放了 FreeCAD 项目的缓存。您可以在 <a href="https://github.com/sjtug/mirror-requests/issues">mirror-requests</a> 中通过 issue 的方式请求添加新的 GitHub Release 镜像。</p> + + + + + Dart 与 Flutter 镜像源已全量同步 + https://sjtug.org/post/mirror-news/2020-12-25-fix-flutter/ + Fri, 25 Dec 2020 13:15:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-25-fix-flutter/ + <p>在 Flutter 中文社区的大力支持下,我们修复了 Dart 与 Flutter 镜像访问不稳定的问题。请参考帮助文档进行配置。欢迎大家继续使用 SJTUG 镜像源。</p> + + + + + Guix 镜像源正式上线 + https://sjtug.org/post/mirror-news/2020-12-21-release-guix/ + Mon, 21 Dec 2020 15:30:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-21-release-guix/ + <p>在 Guix 中文社区的大力支持下,我们上线了 Guix 镜像源。Guix 镜像源的实现方式是智能缓存。当镜像站用户第一次请求某个资源时,它会被永久缓存在镜像站服务器上。</p> +<p>Guix 镜像源分为 git 镜像和 substitute 镜像,请参考帮助文档进行配置。欢迎大家使用。</p> + + + + + PyPI 全量同步镜像源重新上线 + https://sjtug.org/post/mirror-news/2020-12-08-add-pypi/ + Thu, 10 Dec 2020 13:30:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-08-add-pypi/ + <p>继 SJTUG 镜像源智能缓存上线后,我们从清华大学开源软件镜像站 (TUNA) 全量同步了 PyPI 软件源。感谢上海交通大学网络信息中心和 TUNA 的支持。欢迎大家继续使用 PyPI 镜像源。</p> + + + + + SJTUG 镜像源智能缓存正式上线 + https://sjtug.org/post/mirror-news/2020-12-07-announcing-new-arch/ + Mon, 07 Dec 2020 12:00:00 +0800 + + https://sjtug.org/post/mirror-news/2020-12-07-announcing-new-arch/ + <p>SJTUG 镜像在近期进行了一次更新。我们开发了智能缓存工具 <a href="https://github.com/sjtug/mirror-intel">mirror-intel</a>, +并将部分反向代理软件源移植到了智能缓存系统上。</p> +<p>智能缓存的后端是由上海交通大学网络信息中心提供的对象存储服务。</p> +<p>当您访问智能缓存软件源时,服务器会先检测文件是否在对象存储中。如果存在,请求会直接被重定向到 <a href="https://s3.jcloud.sjtu.edu.cn">https://s3.jcloud.sjtu.edu.cn</a> 。 +否则,请求会被重定向到上游;与此同时,智能缓存会将文件同步到对象存储中。</p> +<p>目前通过智能缓存提供服务的软件源镜像包括:</p> +<ul> +<li>rust-static (rustup 镜像源)。上游为 <a href="https://static.rust-lang.org">https://static.rust-lang.org</a> 。近三个月的工具链均已缓存。</li> +<li>crates.io (cargo 包管理器镜像源)。上游为 <a href="https://static.crates.io">https://static.crates.io</a> 。所有包都已缓存。</li> +<li>homebrew-bottles。上游为清华大学开源软件镜像站 (TUNA)。所有包都已缓存。</li> +<li>pypi-packages。上游为清华大学开源软件镜像站 (TUNA)。正在同步中。</li> +<li>flathub, fedora-ostree, fedora-iot 均使用官方 ostree 上游。所有分支都已缓存。ostree 镜像还在测试阶段,正式版会在近几个月内发布。</li> +</ul> +<p>欢迎大家的使用~</p> + + + + + 新增 emacs-elpa 与 msys2 镜像 + https://sjtug.org/post/mirror-news/2020-09-28-new-mirrors/ + Mon, 28 Sep 2020 14:00:00 +0800 + + https://sjtug.org/post/mirror-news/2020-09-28-new-mirrors/ + <p>SJTUG 镜像在最近两个月中新增了下面两个镜像。</p> +<ul> +<li>emacs-elpa (包含 GNU ELPA, MELPA, MELPA Stable, Marmalade, Org, Sunrise Commander ELPA, user42 ELPA),上游 emacs-china。</li> +<li>msys2</li> +</ul> +<p>九月中旬,镜像站的反向代理服务出现了一些稳定性问题。我们更换了反向代理方式,提高了 crates.io 等镜像的稳定性。</p> +<p>在 @johnnychen94 的帮助下,镜像站解决了 julia 镜像缺失文件的问题。</p> +<p>Qt 镜像已加入官方源。在使用官方安装器进行安装时,国内用户会自动使用 SJTUG 镜像站下载文件。</p> +<p>Ubuntu, Debian 等 apt 源禁用了 https 自动跳转,现在可以直接使用 http 协议访问。</p> +<p>欢迎大家使用。</p> + + + + + 新增 archlinuxarm, julia, mongodb, Qt 镜像 + https://sjtug.org/post/mirror-news/2020-08-05-new-mirrors/ + Wed, 05 Aug 2020 18:00:00 +0800 + + https://sjtug.org/post/mirror-news/2020-08-05-new-mirrors/ + <p>SJTUG 镜像源近期迎来了一大批更新。</p> +<ul> +<li>改变了 archlinux 镜像的同步方式,实时性更强。</li> +<li>新增 archlinuxarm 源。</li> +<li>在 anaconda 中新增了 PyTorch 源。</li> +<li>新增 julia 源。该镜像源将成为中国大陆境内官方 Pkg Server 的上游之一。</li> +<li>新增 mongodb 源。</li> +<li>新增 Qt 源。我们近期在联系 Qt,希望将镜像加入官方镜像列表中。</li> +</ul> +<p>欢迎大家体验!</p> +<p>2019-2020 年我们还新增/修复了下面这些镜像:</p> +<ul> +<li>增强了 anaconda 同步的稳定性,修复了部分源 404 的问题。</li> +<li>修复了 CRAN 的同步问题。</li> +<li>修复了 crates.io 的重定向问题。</li> +<li>修复了 dart-package 的重定向问题。</li> +<li>pypi 改为反代。</li> +<li>修复了 maven 的访问问题。</li> +<li>新增了 google-fonts 反代。</li> +<li>新增了 packagist 元数据。</li> +</ul> + + + + + 镜像站将于4月20日凌晨2点维护 + https://sjtug.org/post/mirror-news/2020-04-18-maintain/ + Sat, 18 Apr 2020 19:00:00 -0400 + + https://sjtug.org/post/mirror-news/2020-04-18-maintain/ + <p>SJTUG 软件源镜像站 将在 2020年4月20日 凌晨2时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:2小时。</p> + + + + + 关于19年10月软件源日志泄漏的通告 + https://sjtug.org/post/mirror-news/2019-10-10-data-leak/ + Thu, 10 Oct 2019 19:37:00 -0700 + + https://sjtug.org/post/mirror-news/2019-10-10-data-leak/ + <h1 id="发生了什么">发生了什么</h1> +<p>由于镜像状态页面的Access Token未被合理限权,未授权外部用户可以查看软件源的所有日志。</p> +<h1 id="范围">范围</h1> +<p>2018年4月3日2019年10月10日的日志,其中可能会对用户造成影响的内容包括:用户的IP、访问时间与路径</p> +<h1 id="目前采取的措施">目前采取的措施</h1> +<p>目前已经此漏洞已被以下措施修复:</p> +<ul> +<li>注销了之前未被限权的Access Token</li> +<li>更换了日志账户的Account Token</li> +<li>在完成日志权限模型之前,暂时停止日志上传</li> +<li>更换了泄漏的代理后端的IP,并换用了随机性更强的域名</li> +</ul> +<p>之后将会更加审慎处理相关信息的接口,保障数据安全。</p> + + + + + Pypi镜像源改为反代 + https://sjtug.org/post/mirror-news/2019-10-09-remove-pypi/ + Wed, 09 Oct 2019 22:23:00 -0700 + + https://sjtug.org/post/mirror-news/2019-10-09-remove-pypi/ + <p>由于PyPI镜像占用空间过大,经过权衡我们决定放弃PyPI的全量镜像。出于兼容性考虑,https://mirrors.sjtug.sjtu.edu.cn/pypi/web 现在反代 <a href="https://pypi.org">https://pypi.org</a> (与原有URL相同,已有用户不必进行更改)。有需要的用户可以迁移到其他镜像或继续使用反代服务。</p> + + + + + 镜像站将于21日凌晨2点维护 + https://sjtug.org/post/mirror-news/2019-06-19-maintain/ + Wed, 19 Jun 2019 13:51:00 -0700 + + https://sjtug.org/post/mirror-news/2019-06-19-maintain/ + <p>SJTUG 软件源镜像站 将在 2019年6月21日 凌晨2时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:2小时。</p> + + + + + 镜像站已支持TLS v1.3访问 + https://sjtug.org/post/mirror-news/2019-03-06-tls-1.3/ + Wed, 06 Mar 2019 20:00:00 -0800 + + https://sjtug.org/post/mirror-news/2019-03-06-tls-1.3/ + <p>镜像站现已正式支持TLS 1.3访问。使用 curl &gt;= 7.52.0 的软件会自动采用TLS 1.3以降低访问延时。</p> + + + + + 镜像站已于01/05恢复正常 + https://sjtug.org/post/mirror-news/2019-01-04-outage/ + Fri, 04 Jan 2019 20:30:00 -0800 + + https://sjtug.org/post/mirror-news/2019-01-04-outage/ + <p>由于网页服务器异常crash,镜像站于1月4日14时到5日3时期间无法正常访问。目前已经修复,欢迎大家继续使用。</p> + + + + + 镜像站11/22 6:31开始服务暂时不可用 + https://sjtug.org/post/mirror-news/2018-11-22-outage/ + Thu, 22 Nov 2018 05:55:00 +0800 + + https://sjtug.org/post/mirror-news/2018-11-22-outage/ + <p>镜像站在11/22早6:31开始,服务暂时不可用,目前我们正在调查原因。</p> + + + + + 镜像站将在 11/22 凌晨3时 UTC+8维护 + https://sjtug.org/post/mirror-news/2018-11-20-maintain/ + Tue, 20 Nov 2018 11:55:00 +0800 + + https://sjtug.org/post/mirror-news/2018-11-20-maintain/ + <p>SJTUG 软件源镜像站 将在2018年11月22日 凌晨3时 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。预计维护时间:1小时。</p> + + + + + 新增homebrew与raspbian/raspberrypi镜像 + https://sjtug.org/post/mirror-news/2018-06-15-raspbian-homebrew/ + Fri, 15 Jun 2018 15:00:00 +0800 + + https://sjtug.org/post/mirror-news/2018-06-15-raspbian-homebrew/ + <p>新增了MacOS的homebrew包管理器与适用于树莓派的raspbian/raspberrypi仓库的镜像。</p> +<p>欢迎大家查看<code>git/homebrew-{core/cask}.git</code>、<code>homebrew-bottles</code>与<code>raspbian</code>/<code>raspberrypi</code>了解如何使用。</p> + + + + + ROS源上游故障 + https://sjtug.org/post/mirror-news/2018-06-04-ros-failure/ + Mon, 04 Jun 2018 19:40:00 +0800 + + https://sjtug.org/post/mirror-news/2018-06-04-ros-failure/ + <p>今天中午12:00左右,ROS上游唯一的Rsync源出现故障无法进行同步,大部分国内镜像站都会受到影响。已经同步的包仍然可以正常下载,但12:00以后的更新将无法反馈到用户。目前我们在密切观察这一现象,若短时间内rsync源无法恢复,我们将会尝试切换到apt-cache源。</p> + + + + + 镜像源维护完成 + https://sjtug.org/post/mirror-news/2018-05-29-maintain-complete/ + Tue, 29 May 2018 23:30:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-29-maintain-complete/ + <p>SJTUG 镜像源在今天晚上 11:00 ~ 11:21 按计划进行了例行维护,在维护期间服务暂时不可用,目前已经恢复正常。</p> + + + + + 镜像站将在05/29 晚11:00 UTC+8维护 + https://sjtug.org/post/mirror-news/2018-05-29-maintain/ + Tue, 29 May 2018 11:55:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-29-maintain/ + <p>SJTUG 软件源镜像站 将在2018年5月29日晚11:00 UTC+8起进行服务器维护,届时服务将会出现短时间的不可用,希望大家予以谅解。维护时间据估计不会超过30分钟。</p> + + + + + SJTUG 镜像源加入 GNU、CTAN 官方镜像源列表 + https://sjtug.org/post/mirror-news/2018-05-17-gnu-ctan-repo/ + Thu, 17 May 2018 21:40:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-17-gnu-ctan-repo/ + <p>SJTUG 软件源镜像站 v2 正式上线后,现已加入 GNU、CTAN 官方镜像源列表:</p> +<ul> +<li><a href="https://www.gnu.org/prep/ftp.html">GNU Mirror List</a></li> +<li><a href="https://ctan.org/mirrors">CTAN Sites</a></li> +</ul> + + + + + 镜像源域名更换为mirrors.sjtug.sjtu.edu.cn + https://sjtug.org/post/mirror-news/2018-05-07-domain-update/ + Mon, 07 May 2018 15:00:00 +0800 + + https://sjtug.org/post/mirror-news/2018-05-07-domain-update/ + <p>欢迎大家之后使用新域名访问</p> + + + + + 镜像源v2 Beta版上线! + https://sjtug.org/post/mirror-news/2018-03-04-v2-beta/ + Sun, 04 Mar 2018 22:00:00 +0800 + + https://sjtug.org/post/mirror-news/2018-03-04-v2-beta/ + + + + + 喜迎校庆 SJTUG Mirrors加入Arch Linux镜像源 + https://sjtug.org/post/mirror-news/2016-04-07-arch-repo/ + Thu, 07 Apr 2016 22:00:00 +0800 + + https://sjtug.org/post/mirror-news/2016-04-07-arch-repo/ + + + + + SJTUG Demo镜像源成立 + https://sjtug.org/post/mirror-news/2016-03-17-established/ + Thu, 17 Mar 2016 22:00:00 +0800 + + https://sjtug.org/post/mirror-news/2016-03-17-established/ + + + + + \ No newline at end of file diff --git a/tags/mirror-news/page/1/index.html b/tags/mirror-news/page/1/index.html new file mode 100644 index 00000000..878ecf9a --- /dev/null +++ b/tags/mirror-news/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/mirror-news/ \ No newline at end of file diff --git a/tags/mirror-news/page/2/index.html b/tags/mirror-news/page/2/index.html new file mode 100644 index 00000000..dbcde820 --- /dev/null +++ b/tags/mirror-news/page/2/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-news/page/3/index.html b/tags/mirror-news/page/3/index.html new file mode 100644 index 00000000..f396e66f --- /dev/null +++ b/tags/mirror-news/page/3/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-news/page/4/index.html b/tags/mirror-news/page/4/index.html new file mode 100644 index 00000000..48d88383 --- /dev/null +++ b/tags/mirror-news/page/4/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + mirror-news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/mirror-news/page/5/index.html b/tags/mirror-news/page/5/index.html new file mode 100644 index 00000000..52b2b59a --- /dev/null +++ b/tags/mirror-news/page/5/index.html @@ -0,0 +1,131 @@ + + + + + + + + + + mirror-news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/news/index.html b/tags/news/index.html new file mode 100644 index 00000000..03286761 --- /dev/null +++ b/tags/news/index.html @@ -0,0 +1,239 @@ + + + + + + + + + + news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/news/index.xml b/tags/news/index.xml new file mode 100644 index 00000000..765569aa --- /dev/null +++ b/tags/news/index.xml @@ -0,0 +1,408 @@ + + + news on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/news/ + Recent content in news on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Mon, 19 Jun 2023 21:00:00 +0800 + + + + + + SJTUG x 交大超算 6 月吃吃喝喝与技术分享 + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + Mon, 19 Jun 2023 21:00:00 +0800 + + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + <p>本周一 (19日) 14:00 在电院E咖三楼进行的 SJTUG 吃吃喝喝和技术分享活动圆满结束~</p> +<p>本次分享的嘉宾是方禹舜同学,题目是“面向超算集群的大语言模型并行训练初探”,活动中探讨了如何突破计算和内存资源的限制,采用并行化方法训练以大语言模型为首的各类大规模模型,并简短介绍了上海交通大学学生超算队的活动及相关超算赛事。</p> +<p>现场提供了小吃以及 SJTUG 贴纸。日后的吃吃喝喝活动不出意外也会继续提供以上福利,欢迎蹭饭!感谢 <a href="https://net.sjtu.edu.cn">交大网络信息中心</a>(<a href="https://hpc.sjtu.edu.cn/">交大高性能计算中心</a>) 对本次活动的赞助!</p> +<p>本次分享在 b 站上进行了直播,录播已经上传到 <a href="https://www.dropbox.com/scl/fi/wk0sej7xrj39hwa4l6wiq/2023-06-19-14-16-41.mp4?dl=0&amp;rlkey=2apx0eamrgcanzcddwrnuekkd">Dropbox</a>。slides 已经上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a>。</p> +<p><img src="https://sjtug.org/images/2023-06.in-event.jpeg" alt="in-event"></p> + + + + + SJTUG x Naive Systems 11 月吃吃喝喝与技术分享 + https://sjtug.org/post/2021-11-20-rust-sharing/ + Sat, 20 Nov 2021 20:00:00 +0800 + + https://sjtug.org/post/2021-11-20-rust-sharing/ + <p>下周五 (26日) 18:30 将在电院E咖二楼进行 SJTUG 吃吃喝喝和技术分享活动,欢迎大家参加~</p> +<p>本次分享的嘉宾是冷亦君同学,题目是“Use Abella to prove equivalence of datalog rules in Polonius (the new Rust borrow checker)”。 +届时现场会提供小吃、SJTUG 贴纸、以及来自 Naive Systems 的纪念品。感谢 <a href="https://www.naivesystems.com">Naive Systems</a> 对本次活动的赞助!活动安排如下:</p> +<ul> +<li>18:30 - 19:30 技术分享时间</li> +<li>19:30 - 20:30 小吃和闲聊时间</li> +</ul> +<p>电院E咖的位置在电子信息与电气工程学院 2 号楼和 3 号楼之间。</p> +<p>本次分享没有直播,下次一定。slides 已经上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a>。</p> +<p><img src="https://sjtug.org/images/2021-11.in-event.jpeg" alt="in-event"></p> + + + + + SJTUG 2021 年春季招新 + https://sjtug.org/post/2021-03-09-welcome/ + Tue, 09 Mar 2021 23:00:00 +0800 + + https://sjtug.org/post/2021-03-09-welcome/ + <p>SJTUG (上海交通大学 Linux 用户组) 是一个非盈利的技术组织。只要你对 *nix 相关技术感兴趣、有热情,即可成为我们的一员。</p> +<p>成为 SJTUG 的一员,即可参与:</p> +<ul> +<li>不定期的技术分享活动。</li> +<li>不确定的学期吃锅活动。</li> +<li>参与维护软件源镜像站。(仅限校内成员)</li> +</ul> +<p>加入 SJTUG 成员所在的讨论组,即可成为 SJTUG 的一员。相关的活动通知也会同步发送到这些位置。目前 SJTUG 的成员主要出现在这些地方:</p> +<ul> +<li>SJTUG 微信群。由于群人数即将达到限制,目前仅能通过邀请入群。</li> +<li>2021 年新建的 QQ 群。群号 715273806。</li> +<li>电报群。首先,关注 <a href="https://t.me/sjtug_mirrors_news">SJTUG 镜像站的通知频道</a>。而后,加入频道关联的群组。</li> +</ul> +<p>期待您的加入!</p> + + + + + SJTUG 技术分享:Build system, lazy evaluation and incremental computation + https://sjtug.org/post/2019-09-18-build-system/ + Thu, 12 Sep 2019 16:00:00 +0800 + + https://sjtug.org/post/2019-09-18-build-system/ + <p>在9月18日我们将会进行一次SJTUG技术分享以及开学吃锅活动!</p> +<p>本次带来技术分享的是张震学长,技术分享结束后是吃锅活动,欢迎大家参加技术分享/吃锅/both!</p> +<p>技术分享活动时间:9月18日 18:00-19:00 +地点:新图书馆 E216</p> +<p>标题:Build system, lazy evaluation and incremental computation</p> +<p>摘要:什么是 Build System(构建系统)的本质?工程实践中为什么有 make、bazel 等众多“轮子”?它们之间的区别是什么?Build system 和更为基础的 Lazy Evaluation(惰性求值)和 Incremental Computation(增量计算)这两种紧密联系的计算概念又有何联系?如何在你的开发实践中运用惰性求值和增量计算?这些概念在浏览器布局引擎、自动代码生成等应用里有什么样的应用?这次分享活动将从实际代码出发来探讨这些话题,并思考算法开发的未来趋势。</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 技术分享:任务型对话概览 + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + Mon, 01 Apr 2019 19:00:00 +0800 + + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + <p>周一(4月1日)晚 19:00 将在 图书馆主馆 E312 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>任务型对话概览 @ 刘啸远</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 技术分享:C++中的运行期与编译期多态 + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + Sat, 08 Dec 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + <p>下周六(15日)晚 19:00 将在 李政道图书馆 209 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>C++中的运行期与编译期多态 (Runtime and Compile-Time Polymorphism) in C++ @ 任云玮</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018 暑期课堂预告 + https://sjtug.org/post/2018-06-06-summer-class/ + Wed, 06 Jun 2018 19:35:00 +0800 + + https://sjtug.org/post/2018-06-06-summer-class/ + <p>6-30 Update: 请大家注意,由于社总安排变更,上课地点改为东中院 1-103</p> +<p>Update: 课程具体时间地点安排已更新</p> +<blockquote> +<p><a href="https://www.wjx.top/m/24873152.aspx">报名链接点这里</a></p> +<p>课程安排情况(社总信息):<a href="https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA">https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA</a></p> +</blockquote> +<p>SJTUG 本次暑假小学期再次开设了夏季课堂,面向对编程及相关技术感兴趣的同学进行 5~6 次分享,主讲人除 SJTUG 成员外,预计还将邀请在业界的学长做 Guest Talk/Sharing,以下是主要内容预告(暂定,持续更新中):</p> +<table> +<thead> +<tr> +<th>活动</th> +<th>时间</th> +<th>地点</th> +<th>主讲人</th> +<th>内容</th> +</tr> +</thead> +<tbody> +<tr> +<td>Tutorial</td> +<td>07.03 19:00</td> +<td>东中院 1-103</td> +<td><a href="http://evensgn.com">@Evensgn</a></td> +<td>Git 使用教学</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.06 19:00</td> +<td>东中院 1-103</td> +<td>@littleRound</td> +<td>计算机工作原理漫谈</td> +</tr> +<tr> +<td>Guest Talk</td> +<td>07.10 19:00</td> +<td>东中院 1-103</td> +<td>周健,依图科技研发总监,上海交大计算机系学士、硕士;亚洲首个世界大学生程序设计竞赛世界冠军</td> +<td>从摩尔定律到行星级的智能系统————漫谈 AI 时代的过去、现在和将来</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.13 19:00</td> +<td>东中院 1-103</td> +<td>@footoredo</td> +<td>浅谈密码学与密码</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.17 19:00</td> +<td>东中院 1-103</td> +<td><a href="https://io-meter.com">@茄子(ant_sz)</a></td> +<td>基于 KV Store 的实时多维数据分析</td> +</tr> +<tr> +<td>Guest Sharing</td> +<td>07.20 19:00</td> +<td>东中院 1-103</td> +<td>施闻轩,PingCAP 工程师</td> +<td>A small bite of Rust</td> +</tr> +</tbody> +</table> +<p>欢迎感兴趣的同学们参加!</p> +<p>暑期课堂结束之后,所有讲者的 slides 会在我们的<a href="https://github.com/sjtug/sharing">Github仓库</a> 公开,欢迎大家 Star~</p> + + + + + SJTUG 2018 第 4 次分享:合作训练(Cooperative Training) + https://sjtug.org/post/2018-05-12-cooperative-training/ + Tue, 08 May 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-05-12-cooperative-training/ + <p>本周六(12日)晚 19:00 将在 图书馆主馆 E216 进行本学期第 4 次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>合作训练:CoT Cooperative Training @ 卢思迪</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018 第 3 次分享:Rust 中的内存安全 + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + Sat, 14 Apr 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + <p>本周日(22日)晚 19:00 将在 图书馆主馆 E309 进行本学期第 3 次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>Rust 中的内存安全 @ 张宇宁</p> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018第二次分享:Concatenative Programming 初探 + https://sjtug.org/post/2018-03-31-concatenative-programming/ + Mon, 26 Mar 2018 21:00:00 +0800 + + https://sjtug.org/post/2018-03-31-concatenative-programming/ + <p>本周六(31日)晚 19:00 将在 图书馆主馆 E216 进行本学期第二次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>Concatenative Programming 初探 @ 王竹阳</p> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018第一次分享:FOSS历史与Web开发入门 + https://sjtug.org/post/2018-03-10-intro/ + Sat, 10 Mar 2018 21:00:00 +0800 + + https://sjtug.org/post/2018-03-10-intro/ + <p>本周六(10日)晚7点将在 图书馆主馆 E210 进行本学期第一次分享,欢迎大家带电脑前来参加。内容有:</p> +<ol> +<li>Linux 入门与开源社区 @ 骆铮</li> +<li>Python Web Application 开发入门 @ 范舟</li> +</ol> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + Haskell小课堂 01 + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + Thu, 02 Nov 2017 22:00:00 +0800 + + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + <p>Haskell 是一门默认惰性求值的纯函数式语言,在 stackoverflow 的统计中它是程序员在夜晚和双休日使用最多的语言。本周六的 Haskell 小课堂将带大家简单了解一下 Haskell 的语法和特性,以及代数数据类型、模式匹配、typeclass 等基础知识,为后续课程作铺垫。本次小课堂旨在从入门到入门,不需要前置知识。</p> +<p>本周六下午3:00将由王竹阳同学在新图B118给大家带来Haskell小课堂的第一节课程,欢迎同学们前来探讨。</p> + + + + + SJTUG例行分享:系统性能的测量与分析 + https://sjtug.org/post/2017-10-28-performance-measurement/ + Sat, 28 Oct 2017 19:00:00 +0800 + + https://sjtug.org/post/2017-10-28-performance-measurement/ + <p>本周六将由贾枭学长给大家分享系统性能的测量与分析的常用思路与技巧,欢迎大家前来。</p> +<p><a href="https://github.com/sjtug/sharing/tree/master/2017-10-28">Slides下载</a></p> + + + + + SJTUG暑期课堂报名中! + https://sjtug.org/post/2017-06-12-summer-class/ + Mon, 12 Jun 2017 15:58:00 +0800 + + https://sjtug.org/post/2017-06-12-summer-class/ + <p>UPDATE: <a href="http://sjtug.org/post/2017-06-24-summer-class-portal/">课程主页</a>已经开通!</p> +<p>SJTUG本次暑假开设了夏季第二课堂,将面向初学者与感兴趣同学的进行3~4次分享,主要内容见下:</p> +<table> +<thead> +<tr> +<th>日期</th> +<th>地点</th> +<th>主讲人</th> +<th>内容</th> +</tr> +</thead> +<tbody> +<tr> +<td>6月29日(19周周四)</td> +<td>东上309</td> +<td><a href="https://intmainreturn0.com">@htfy96</a></td> +<td>开源与自由软件历史。以几个人物作为主线科普自由软件及其相关运动的起伏与发展,不需要代码水平的科普性质讲座。</td> +</tr> +<tr> +<td>7月6日(20周周四)</td> +<td>待定</td> +<td><a href="https://io-meter.com">@茄子(ant_sz)</a></td> +<td>待定</td> +</tr> +<tr> +<td>7月13日(21周周四)</td> +<td>东上309</td> +<td><a href="javascript:;">@Phijack</a></td> +<td>Game Theory and Mechanism</td> +</tr> +<tr> +<td>7月20日(22周周四)</td> +<td>东上309</td> +<td><a href="http://codeworm96.github.io">@codeworm96</a></td> +<td>Haskell School of Music,探索用程序语言的方式对音乐进行抽象,不要求编程或音乐理论基础。<a href="http://codeworm96.github.io/posts/2017-06-15-HSoM.html">详细介绍点此</a></td> +</tr> +</tbody> +</table> +<p>课堂将保证小规模,确保来的同学都有当面指导的机会。欢迎对技术感兴趣的同学来参加!我们尤其欢迎在Linux、自由软件、函数式编程等领域有兴趣的同学。</p> +<p>强烈建议加最后的微信群以获取资料与课前信息。</p> +<p>不管你是否已经毕业,还是只能来几节课,都欢迎填写这张表格报名:</p> +<p><a href="https://wj.qq.com/s/1401085/f0a5" target="_blank" rel="nofollow" style="color:#fff;font-size:20px; background:#5badf0;padding: 10px 20px 10px 20px;">立即报名</a></p> +<p>之后,所有的Slides都会在我们的<a href="https://github.com/sjtug/sharing">Github仓库</a>公开,欢迎Star~</p> +<p>欢迎想来的同学长按识别二维码加群或加微信69oulciV@: +<img src="https://user-images.githubusercontent.com/8121231/27035049-82b2b8c2-4fb2-11e7-84f9-ccf2c05be98c.jpg" alt="SJTUG Summer Class2017"></p> + + + + + GPG Sign Party & Yubikey安利 + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + Thu, 09 Mar 2017 22:11:40 +0800 + + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + <p>本周日(12日)下午3点到5点,在新图E216将举行GPG Sign Party&amp;Yubikey安利活动。将手把手教大家签发/交换密钥与加密、签名信息,欢迎参加!</p> +<p>校内同学点击<a href="http://studyroom.lib.sjtu.edu.cn/reserve_plus.asp">这里加入学习室</a>。 +申请单号94388,密码165165</p> + + + + + SJTUG开学聚餐 + https://sjtug.org/post/2017-02-21-hotpot/ + Tue, 21 Feb 2017 19:41:47 +0800 + + https://sjtug.org/post/2017-02-21-hotpot/ + <p>又到了开学聚餐的时间啦!这次聚餐还是定在欧尚部落情,在本周六(25日)晚5:30GMT+8于拖鞋门前旗杆下集合。欢迎各位过来吃锅!</p> +<p>如果时间安排不合适,可以填写<a href="https://goo.gl/forms/tXNbYezH0pOeAHe83">这个表单</a>。如果时间冲突的同学多的话可能会进行调整</p> + + + + + SJTUG新版首页上线 + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + Sat, 14 Jan 2017 20:55:00 +0800 + + https://sjtug.org/post/2017-01-14-announcing-new-portal/ + <p>我们的首页已经更新到基于Hugo的版本,希望能给大家带来更好的阅读体验。</p> +<p>接下来这里将会加入例行分享的报道及一些技术文章,欢迎大家订阅。</p> + + + + + SJTUG例行分享:HaLVM + https://sjtug.org/post/2017-01-08-halvm/ + Sun, 08 Jan 2017 20:55:00 +0800 + + https://sjtug.org/post/2017-01-08-halvm/ + <p>本周日(1月8日)下午15:00 - 17:30,@张震巨巨在新图E210给大家介绍HaLVM项目,欢迎大家来参加分享</p> +<p>项目地址:<a href="https://github.com/GaloisInc/HaLVM">Github/HaLVM</a></p> +<p>巨巨主页:<a href="https://github.com/izgzhen">Github/izgzhen</a></p> +<blockquote> +<p>HaLVM(Haskell Lightweight Virtual Machine)是一个让Glasgow Haskell Compiler套件直接在Xen虚拟环境下运行的项目。</p> +</blockquote> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2017-01-08">sjtug/sharing/HaLVM</a></p> + + + + + SJTUG例行分享:Life of a packet + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + Sat, 12 Nov 2016 23:40:00 +0800 + + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + <p>11月12日晚18:00将在光彪楼二楼进行例行分享,由@贾枭 学长给大家带来分享 Life of a packet,欢迎大家来参与活动</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-11-12">sjtug/sharing</a></p> + + + + + SJTUG例行分享:简单的物理引擎 + https://sjtug.org/post/2016-10-29-physical-engine/ + Sat, 29 Oct 2016 23:45:00 +0800 + + https://sjtug.org/post/2016-10-29-physical-engine/ + <p>10月29日晚18:00将在新图E316进行例行分享,由大一巨巨 @时光机 给大家带来「简单的物理引擎」分享,欢迎大家来参与活动</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-16">sjtug/sharing</a></p> + + + + + SJTUG例行分享:C11 Memory Model + https://sjtug.org/post/2016-10-16-c11-memory-model/ + Sun, 16 Oct 2016 22:45:00 +0800 + + https://sjtug.org/post/2016-10-16-c11-memory-model/ + <p>10月16日晚18:00,@贾枭 学长在新图B416向大家介绍 C11 Memory Model 的有关知识。</p> +<p>视频在 <a href="https://www.liveedu.tv/sjtug/">LiveEdu</a> 可以看到。</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-16">sjtug/sharing</a></p> + + + + + SJTUG例行分享:Dependent Type + https://sjtug.org/post/2016-10-04-dependent-type/ + Tue, 04 Oct 2016 22:55:00 +0800 + + https://sjtug.org/post/2016-10-04-dependent-type/ + <p>10月4日晚18:00 - 21:00,@邵成 @钱泽森 两位同学在新图E316向大家介绍 Dependent Type。</p> +<p>邵成:Fun with Dependent Types in Haskell<br> +钱泽森:How to Write a Safe Printf in Agda</p> +<p>视频在 <a href="https://www.liveedu.tv/sjtug/">LiveEdu</a> 可以看到</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-04">sjtug/sharing</a></p> + + + + + \ No newline at end of file diff --git a/tags/news/page/1/index.html b/tags/news/page/1/index.html new file mode 100644 index 00000000..748d485e --- /dev/null +++ b/tags/news/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/news/ \ No newline at end of file diff --git a/tags/news/page/2/index.html b/tags/news/page/2/index.html new file mode 100644 index 00000000..92464e58 --- /dev/null +++ b/tags/news/page/2/index.html @@ -0,0 +1,245 @@ + + + + + + + + + + news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/news/page/3/index.html b/tags/news/page/3/index.html new file mode 100644 index 00000000..a5dc0a83 --- /dev/null +++ b/tags/news/page/3/index.html @@ -0,0 +1,143 @@ + + + + + + + + + + news · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/page/1/index.html b/tags/page/1/index.html new file mode 100644 index 00000000..13dd4707 --- /dev/null +++ b/tags/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/ \ No newline at end of file diff --git a/tags/page/2/index.html b/tags/page/2/index.html new file mode 100644 index 00000000..001a7b7a --- /dev/null +++ b/tags/page/2/index.html @@ -0,0 +1,167 @@ + + + + + + + + + + Tags · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/sharing/index.html b/tags/sharing/index.html new file mode 100644 index 00000000..c6018afb --- /dev/null +++ b/tags/sharing/index.html @@ -0,0 +1,239 @@ + + + + + + + + + + sharing · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/sharing/index.xml b/tags/sharing/index.xml new file mode 100644 index 00000000..8e330d05 --- /dev/null +++ b/tags/sharing/index.xml @@ -0,0 +1,236 @@ + + + sharing on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/sharing/ + Recent content in sharing on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Mon, 19 Jun 2023 21:00:00 +0800 + + + + + + SJTUG x 交大超算 6 月吃吃喝喝与技术分享 + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + Mon, 19 Jun 2023 21:00:00 +0800 + + https://sjtug.org/post/2023-06-19-hpc-llm-train/ + <p>本周一 (19日) 14:00 在电院E咖三楼进行的 SJTUG 吃吃喝喝和技术分享活动圆满结束~</p> +<p>本次分享的嘉宾是方禹舜同学,题目是“面向超算集群的大语言模型并行训练初探”,活动中探讨了如何突破计算和内存资源的限制,采用并行化方法训练以大语言模型为首的各类大规模模型,并简短介绍了上海交通大学学生超算队的活动及相关超算赛事。</p> +<p>现场提供了小吃以及 SJTUG 贴纸。日后的吃吃喝喝活动不出意外也会继续提供以上福利,欢迎蹭饭!感谢 <a href="https://net.sjtu.edu.cn">交大网络信息中心</a>(<a href="https://hpc.sjtu.edu.cn/">交大高性能计算中心</a>) 对本次活动的赞助!</p> +<p>本次分享在 b 站上进行了直播,录播已经上传到 <a href="https://www.dropbox.com/scl/fi/wk0sej7xrj39hwa4l6wiq/2023-06-19-14-16-41.mp4?dl=0&amp;rlkey=2apx0eamrgcanzcddwrnuekkd">Dropbox</a>。slides 已经上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a>。</p> +<p><img src="https://sjtug.org/images/2023-06.in-event.jpeg" alt="in-event"></p> + + + + + SJTUG x Naive Systems 11 月吃吃喝喝与技术分享 + https://sjtug.org/post/2021-11-20-rust-sharing/ + Sat, 20 Nov 2021 20:00:00 +0800 + + https://sjtug.org/post/2021-11-20-rust-sharing/ + <p>下周五 (26日) 18:30 将在电院E咖二楼进行 SJTUG 吃吃喝喝和技术分享活动,欢迎大家参加~</p> +<p>本次分享的嘉宾是冷亦君同学,题目是“Use Abella to prove equivalence of datalog rules in Polonius (the new Rust borrow checker)”。 +届时现场会提供小吃、SJTUG 贴纸、以及来自 Naive Systems 的纪念品。感谢 <a href="https://www.naivesystems.com">Naive Systems</a> 对本次活动的赞助!活动安排如下:</p> +<ul> +<li>18:30 - 19:30 技术分享时间</li> +<li>19:30 - 20:30 小吃和闲聊时间</li> +</ul> +<p>电院E咖的位置在电子信息与电气工程学院 2 号楼和 3 号楼之间。</p> +<p>本次分享没有直播,下次一定。slides 已经上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a>。</p> +<p><img src="https://sjtug.org/images/2021-11.in-event.jpeg" alt="in-event"></p> + + + + + SJTUG 技术分享:Build system, lazy evaluation and incremental computation + https://sjtug.org/post/2019-09-18-build-system/ + Thu, 12 Sep 2019 16:00:00 +0800 + + https://sjtug.org/post/2019-09-18-build-system/ + <p>在9月18日我们将会进行一次SJTUG技术分享以及开学吃锅活动!</p> +<p>本次带来技术分享的是张震学长,技术分享结束后是吃锅活动,欢迎大家参加技术分享/吃锅/both!</p> +<p>技术分享活动时间:9月18日 18:00-19:00 +地点:新图书馆 E216</p> +<p>标题:Build system, lazy evaluation and incremental computation</p> +<p>摘要:什么是 Build System(构建系统)的本质?工程实践中为什么有 make、bazel 等众多“轮子”?它们之间的区别是什么?Build system 和更为基础的 Lazy Evaluation(惰性求值)和 Incremental Computation(增量计算)这两种紧密联系的计算概念又有何联系?如何在你的开发实践中运用惰性求值和增量计算?这些概念在浏览器布局引擎、自动代码生成等应用里有什么样的应用?这次分享活动将从实际代码出发来探讨这些话题,并思考算法开发的未来趋势。</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 技术分享:任务型对话概览 + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + Mon, 01 Apr 2019 19:00:00 +0800 + + https://sjtug.org/post/2019-04-01-task-oriented-dialogue/ + <p>周一(4月1日)晚 19:00 将在 图书馆主馆 E312 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>任务型对话概览 @ 刘啸远</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 技术分享:C++中的运行期与编译期多态 + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + Sat, 08 Dec 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-12-15-polymorphism-in-cpp/ + <p>下周六(15日)晚 19:00 将在 李政道图书馆 209 进行 SJTUG 技术分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>C++中的运行期与编译期多态 (Runtime and Compile-Time Polymorphism) in C++ @ 任云玮</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018 第 4 次分享:合作训练(Cooperative Training) + https://sjtug.org/post/2018-05-12-cooperative-training/ + Tue, 08 May 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-05-12-cooperative-training/ + <p>本周六(12日)晚 19:00 将在 图书馆主馆 E216 进行本学期第 4 次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>合作训练:CoT Cooperative Training @ 卢思迪</p> +<p>届时会通过 teamviewer、<a href="https://live.bilibili.com/6254516">bilibili 直播间</a> 等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018 第 3 次分享:Rust 中的内存安全 + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + Sat, 14 Apr 2018 19:00:00 +0800 + + https://sjtug.org/post/2018-04-22-memory-safety-in-rust/ + <p>本周日(22日)晚 19:00 将在 图书馆主馆 E309 进行本学期第 3 次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>Rust 中的内存安全 @ 张宇宁</p> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018第二次分享:Concatenative Programming 初探 + https://sjtug.org/post/2018-03-31-concatenative-programming/ + Mon, 26 Mar 2018 21:00:00 +0800 + + https://sjtug.org/post/2018-03-31-concatenative-programming/ + <p>本周六(31日)晚 19:00 将在 图书馆主馆 E216 进行本学期第二次分享,欢迎大家带电脑前来参加。本次分享内容为:</p> +<p>Concatenative Programming 初探 @ 王竹阳</p> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + SJTUG 2018第一次分享:FOSS历史与Web开发入门 + https://sjtug.org/post/2018-03-10-intro/ + Sat, 10 Mar 2018 21:00:00 +0800 + + https://sjtug.org/post/2018-03-10-intro/ + <p>本周六(10日)晚7点将在 图书馆主馆 E210 进行本学期第一次分享,欢迎大家带电脑前来参加。内容有:</p> +<ol> +<li>Linux 入门与开源社区 @ 骆铮</li> +<li>Python Web Application 开发入门 @ 范舟</li> +</ol> +<p>届时会通过teamviewer等进行现场直播,slides 会上传到 <a href="https://github.com/sjtug/sharing">https://github.com/sjtug/sharing</a></p> + + + + + Haskell小课堂 01 + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + Thu, 02 Nov 2017 22:00:00 +0800 + + https://sjtug.org/post/2017-11-02-haskell-talk-01/ + <p>Haskell 是一门默认惰性求值的纯函数式语言,在 stackoverflow 的统计中它是程序员在夜晚和双休日使用最多的语言。本周六的 Haskell 小课堂将带大家简单了解一下 Haskell 的语法和特性,以及代数数据类型、模式匹配、typeclass 等基础知识,为后续课程作铺垫。本次小课堂旨在从入门到入门,不需要前置知识。</p> +<p>本周六下午3:00将由王竹阳同学在新图B118给大家带来Haskell小课堂的第一节课程,欢迎同学们前来探讨。</p> + + + + + SJTUG例行分享:系统性能的测量与分析 + https://sjtug.org/post/2017-10-28-performance-measurement/ + Sat, 28 Oct 2017 19:00:00 +0800 + + https://sjtug.org/post/2017-10-28-performance-measurement/ + <p>本周六将由贾枭学长给大家分享系统性能的测量与分析的常用思路与技巧,欢迎大家前来。</p> +<p><a href="https://github.com/sjtug/sharing/tree/master/2017-10-28">Slides下载</a></p> + + + + + GPG Sign Party & Yubikey安利 + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + Thu, 09 Mar 2017 22:11:40 +0800 + + https://sjtug.org/post/2017-03-09-gpg-sign-party/ + <p>本周日(12日)下午3点到5点,在新图E216将举行GPG Sign Party&amp;Yubikey安利活动。将手把手教大家签发/交换密钥与加密、签名信息,欢迎参加!</p> +<p>校内同学点击<a href="http://studyroom.lib.sjtu.edu.cn/reserve_plus.asp">这里加入学习室</a>。 +申请单号94388,密码165165</p> + + + + + SJTUG例行分享:HaLVM + https://sjtug.org/post/2017-01-08-halvm/ + Sun, 08 Jan 2017 20:55:00 +0800 + + https://sjtug.org/post/2017-01-08-halvm/ + <p>本周日(1月8日)下午15:00 - 17:30,@张震巨巨在新图E210给大家介绍HaLVM项目,欢迎大家来参加分享</p> +<p>项目地址:<a href="https://github.com/GaloisInc/HaLVM">Github/HaLVM</a></p> +<p>巨巨主页:<a href="https://github.com/izgzhen">Github/izgzhen</a></p> +<blockquote> +<p>HaLVM(Haskell Lightweight Virtual Machine)是一个让Glasgow Haskell Compiler套件直接在Xen虚拟环境下运行的项目。</p> +</blockquote> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2017-01-08">sjtug/sharing/HaLVM</a></p> + + + + + SJTUG例行分享:Life of a packet + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + Sat, 12 Nov 2016 23:40:00 +0800 + + https://sjtug.org/post/2016-11-12-life-of-a-packet/ + <p>11月12日晚18:00将在光彪楼二楼进行例行分享,由@贾枭 学长给大家带来分享 Life of a packet,欢迎大家来参与活动</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-11-12">sjtug/sharing</a></p> + + + + + SJTUG例行分享:简单的物理引擎 + https://sjtug.org/post/2016-10-29-physical-engine/ + Sat, 29 Oct 2016 23:45:00 +0800 + + https://sjtug.org/post/2016-10-29-physical-engine/ + <p>10月29日晚18:00将在新图E316进行例行分享,由大一巨巨 @时光机 给大家带来「简单的物理引擎」分享,欢迎大家来参与活动</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-16">sjtug/sharing</a></p> + + + + + SJTUG例行分享:C11 Memory Model + https://sjtug.org/post/2016-10-16-c11-memory-model/ + Sun, 16 Oct 2016 22:45:00 +0800 + + https://sjtug.org/post/2016-10-16-c11-memory-model/ + <p>10月16日晚18:00,@贾枭 学长在新图B416向大家介绍 C11 Memory Model 的有关知识。</p> +<p>视频在 <a href="https://www.liveedu.tv/sjtug/">LiveEdu</a> 可以看到。</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-16">sjtug/sharing</a></p> + + + + + SJTUG例行分享:Dependent Type + https://sjtug.org/post/2016-10-04-dependent-type/ + Tue, 04 Oct 2016 22:55:00 +0800 + + https://sjtug.org/post/2016-10-04-dependent-type/ + <p>10月4日晚18:00 - 21:00,@邵成 @钱泽森 两位同学在新图E316向大家介绍 Dependent Type。</p> +<p>邵成:Fun with Dependent Types in Haskell<br> +钱泽森:How to Write a Safe Printf in Agda</p> +<p>视频在 <a href="https://www.liveedu.tv/sjtug/">LiveEdu</a> 可以看到</p> +<p><strong>分享资料</strong> : <a href="https://github.com/sjtug/sharing/tree/master/2016-10-04">sjtug/sharing</a></p> + + + + + \ No newline at end of file diff --git a/tags/sharing/page/1/index.html b/tags/sharing/page/1/index.html new file mode 100644 index 00000000..bd3dea64 --- /dev/null +++ b/tags/sharing/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/sharing/ \ No newline at end of file diff --git a/tags/sharing/page/2/index.html b/tags/sharing/page/2/index.html new file mode 100644 index 00000000..91229632 --- /dev/null +++ b/tags/sharing/page/2/index.html @@ -0,0 +1,203 @@ + + + + + + + + + + sharing · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/summer_school/index.html b/tags/summer_school/index.html new file mode 100644 index 00000000..08b16719 --- /dev/null +++ b/tags/summer_school/index.html @@ -0,0 +1,158 @@ + + + + + + + + + + summer_school · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/summer_school/index.xml b/tags/summer_school/index.xml new file mode 100644 index 00000000..dd638e8e --- /dev/null +++ b/tags/summer_school/index.xml @@ -0,0 +1,279 @@ + + + summer_school on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/summer_school/ + Recent content in summer_school on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 06 Jun 2018 19:35:00 +0800 + + + + + + SJTUG 2018 暑期课堂预告 + https://sjtug.org/post/2018-06-06-summer-class/ + Wed, 06 Jun 2018 19:35:00 +0800 + + https://sjtug.org/post/2018-06-06-summer-class/ + <p>6-30 Update: 请大家注意,由于社总安排变更,上课地点改为东中院 1-103</p> +<p>Update: 课程具体时间地点安排已更新</p> +<blockquote> +<p><a href="https://www.wjx.top/m/24873152.aspx">报名链接点这里</a></p> +<p>课程安排情况(社总信息):<a href="https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA">https://mp.weixin.qq.com/s/OiJNz16c3uQoRc8vkn7CxA</a></p> +</blockquote> +<p>SJTUG 本次暑假小学期再次开设了夏季课堂,面向对编程及相关技术感兴趣的同学进行 5~6 次分享,主讲人除 SJTUG 成员外,预计还将邀请在业界的学长做 Guest Talk/Sharing,以下是主要内容预告(暂定,持续更新中):</p> +<table> +<thead> +<tr> +<th>活动</th> +<th>时间</th> +<th>地点</th> +<th>主讲人</th> +<th>内容</th> +</tr> +</thead> +<tbody> +<tr> +<td>Tutorial</td> +<td>07.03 19:00</td> +<td>东中院 1-103</td> +<td><a href="http://evensgn.com">@Evensgn</a></td> +<td>Git 使用教学</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.06 19:00</td> +<td>东中院 1-103</td> +<td>@littleRound</td> +<td>计算机工作原理漫谈</td> +</tr> +<tr> +<td>Guest Talk</td> +<td>07.10 19:00</td> +<td>东中院 1-103</td> +<td>周健,依图科技研发总监,上海交大计算机系学士、硕士;亚洲首个世界大学生程序设计竞赛世界冠军</td> +<td>从摩尔定律到行星级的智能系统————漫谈 AI 时代的过去、现在和将来</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.13 19:00</td> +<td>东中院 1-103</td> +<td>@footoredo</td> +<td>浅谈密码学与密码</td> +</tr> +<tr> +<td>Sharing</td> +<td>07.17 19:00</td> +<td>东中院 1-103</td> +<td><a href="https://io-meter.com">@茄子(ant_sz)</a></td> +<td>基于 KV Store 的实时多维数据分析</td> +</tr> +<tr> +<td>Guest Sharing</td> +<td>07.20 19:00</td> +<td>东中院 1-103</td> +<td>施闻轩,PingCAP 工程师</td> +<td>A small bite of Rust</td> +</tr> +</tbody> +</table> +<p>欢迎感兴趣的同学们参加!</p> +<p>暑期课堂结束之后,所有讲者的 slides 会在我们的<a href="https://github.com/sjtug/sharing">Github仓库</a> 公开,欢迎大家 Star~</p> + + + + + 暑期课堂学生分流 + https://sjtug.org/post/2017-06-25-summer-class-schedule/ + Sun, 25 Jun 2017 21:57:00 +0800 + + https://sjtug.org/post/2017-06-25-summer-class-schedule/ + <p>由于暑期课堂报名人数接近90人,教室无法容纳这么多的人数,因此我们不得不采取分流措施。选择这门课的老师与同学建议按照以下表格前来上课。</p> +<p>当然,如果您有特别感兴趣的话题可以随时来听,但可能会发生没有座位的情况。</p> +<h2 id="建议在第14周6月29日7月20日前来的老师与同学的手机后4位">建议在第1、4周(6月29日/7月20日)前来的老师与同学的手机后4位</h2> +<pre><code>0076 +0158 +0203 +1025 +1991 +2073 +2180 +2529 +2537 +2701 +3081 +3136 +3253 +3739 +4746 +5042 +5301 +5397 +5425 +5532 +6265 +6527 +6708 +6723 +6985 +7035 +7051 +7076 +7586 +7683 +8038 +8189 +8851 +9108 +9481 +</code></pre><p>以及学号是B045090027,没有填写手机号的同学</p> +<h2 id="建议在第23周7月7日7月13日前来的老师与同学的手机后4位">建议在第2、3周(7月7日/7月13日)前来的老师与同学的手机后4位</h2> +<pre><code>0039 +0069 +0153 +0159 +0200 +0320 +0709 +0874 +1160 +1172 +1362 +1691 +1716 +2127 +2530 +2596 +2913 +3215 +3580 +3680 +4486 +4648 +4782 +5028 +5163 +5209 +5336 +5585 +5732 +5831 +5996 +6090 +6217 +6241 +6321 +7065 +7076 +7317 +7450 +7597 +7598 +7931 +7959 +8127 +8360 +8525 +8676 +8972 +9150 +9371 +9731 +</code></pre> + + + + 2017-SJTUG暑期课堂课程主页 + https://sjtug.org/post/2017-06-24-summer-class-portal/ + Sat, 24 Jun 2017 20:29:00 +0800 + + https://sjtug.org/post/2017-06-24-summer-class-portal/ + <p>这里是SJTUG 2017暑期课堂的课程主页,之后所有的课程时间、地点以本页为准,相关的资料也会在本页发放。</p> +<blockquote> +<p>UPDATE(06-25): <a href="https://sjtug.org/post/2017-06-25-summer-class-schedule">人员分流名单</a>已经公布,请尽快查看自己的时间 +UPDATE(06-29):更新第一周课件及第二周时间地点 +UPDATE(07-01):更新第二周主题</p> +</blockquote> +<h2 id="6月29日开源与自由软件历史">6月29日/开源与自由软件历史</h2> +<p>时间:6月29日(19周周四)18:00</p> +<p>地点:东上309</p> +<p>主讲人:<a href="https://intmainreturn0.com">@htfy96</a></p> +<p>课件:<a href="http://sjtug.org/sharing/2017-06-29/">在线查看</a> <a href="https://github.com/sjtug/sharing/tree/master/2017-06-29">下载</a></p> +<h2 id="7月7日git使用">7月7日/Git使用</h2> +<p>时间:<strong>7月7日(20周周五)20:30</strong>(有更改)</p> +<p>地点:东中4-302</p> +<p>主讲人:<a href="https://io-meter.com">@茄子(ant_sz)</a></p> +<p>课件:N/A</p> +<h2 id="7月13日game-theory-and-mechanism">7月13日/Game Theory and Mechanism</h2> +<p>时间:7月13日(21周周四)18:00</p> +<p>地点:东上309</p> +<p>主讲人:<a href="javascript:;">@Phijack</a></p> +<p>课件:N/A</p> +<h2 id="7月20日haskell-school-of-music">7月20日/Haskell School of Music</h2> +<p>时间:7月20日(22周周四)18:00</p> +<p>地点:东上309</p> +<p>主讲人:<a href="http://codeworm96.github.io">@codeworm96</a></p> +<p>课件:N/A</p> +<h2 id="获取最新资讯">获取最新资讯</h2> +<p>可以通过<a href="http://sjtug.org/tags/summer_school/index.xml">RSS订阅</a>或关注我们的微信号@sjtunix获取最新资讯:</p> +<p><img src="https://sjtug.org/images/wechat_qrcode.jpg" alt="wechat_qrcode"></p> + + + + + SJTUG暑期课堂报名中! + https://sjtug.org/post/2017-06-12-summer-class/ + Mon, 12 Jun 2017 15:58:00 +0800 + + https://sjtug.org/post/2017-06-12-summer-class/ + <p>UPDATE: <a href="http://sjtug.org/post/2017-06-24-summer-class-portal/">课程主页</a>已经开通!</p> +<p>SJTUG本次暑假开设了夏季第二课堂,将面向初学者与感兴趣同学的进行3~4次分享,主要内容见下:</p> +<table> +<thead> +<tr> +<th>日期</th> +<th>地点</th> +<th>主讲人</th> +<th>内容</th> +</tr> +</thead> +<tbody> +<tr> +<td>6月29日(19周周四)</td> +<td>东上309</td> +<td><a href="https://intmainreturn0.com">@htfy96</a></td> +<td>开源与自由软件历史。以几个人物作为主线科普自由软件及其相关运动的起伏与发展,不需要代码水平的科普性质讲座。</td> +</tr> +<tr> +<td>7月6日(20周周四)</td> +<td>待定</td> +<td><a href="https://io-meter.com">@茄子(ant_sz)</a></td> +<td>待定</td> +</tr> +<tr> +<td>7月13日(21周周四)</td> +<td>东上309</td> +<td><a href="javascript:;">@Phijack</a></td> +<td>Game Theory and Mechanism</td> +</tr> +<tr> +<td>7月20日(22周周四)</td> +<td>东上309</td> +<td><a href="http://codeworm96.github.io">@codeworm96</a></td> +<td>Haskell School of Music,探索用程序语言的方式对音乐进行抽象,不要求编程或音乐理论基础。<a href="http://codeworm96.github.io/posts/2017-06-15-HSoM.html">详细介绍点此</a></td> +</tr> +</tbody> +</table> +<p>课堂将保证小规模,确保来的同学都有当面指导的机会。欢迎对技术感兴趣的同学来参加!我们尤其欢迎在Linux、自由软件、函数式编程等领域有兴趣的同学。</p> +<p>强烈建议加最后的微信群以获取资料与课前信息。</p> +<p>不管你是否已经毕业,还是只能来几节课,都欢迎填写这张表格报名:</p> +<p><a href="https://wj.qq.com/s/1401085/f0a5" target="_blank" rel="nofollow" style="color:#fff;font-size:20px; background:#5badf0;padding: 10px 20px 10px 20px;">立即报名</a></p> +<p>之后,所有的Slides都会在我们的<a href="https://github.com/sjtug/sharing">Github仓库</a>公开,欢迎Star~</p> +<p>欢迎想来的同学长按识别二维码加群或加微信69oulciV@: +<img src="https://user-images.githubusercontent.com/8121231/27035049-82b2b8c2-4fb2-11e7-84f9-ccf2c05be98c.jpg" alt="SJTUG Summer Class2017"></p> + + + + + \ No newline at end of file diff --git a/tags/summer_school/page/1/index.html b/tags/summer_school/page/1/index.html new file mode 100644 index 00000000..50a26c52 --- /dev/null +++ b/tags/summer_school/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/summer_school/ \ No newline at end of file diff --git a/tags/templates/index.html b/tags/templates/index.html new file mode 100644 index 00000000..d07665de --- /dev/null +++ b/tags/templates/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + templates · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/templates/index.xml b/tags/templates/index.xml new file mode 100644 index 00000000..27bee181 --- /dev/null +++ b/tags/templates/index.xml @@ -0,0 +1,256 @@ + + + templates on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/templates/ + Recent content in templates on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 02 Apr 2014 00:00:00 +0000 + + + + + + (Hu)go Template Primer + https://sjtug.org/post/goisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/goisforlovers/ + <p>Hugo uses the excellent <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.</p> +<p>This document is a brief primer on using go templates. The <a href="http://golang.org/pkg/html/template/">go docs</a> +provide more details.</p> +<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2> +<p>Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.</p> +<p>A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the <a href="http://golang.org/pkg/html/template/">go docs</a>.</p> +<h2 id="basic-syntax">Basic Syntax</h2> +<p>Go lang templates are html files with the addition of variables and +functions.</p> +<p><strong>Go variables and functions are accessible within {{ }}</strong></p> +<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p> +<pre><code>{{ foo }} +</code></pre> +<p><strong>Parameters are separated using spaces</strong></p> +<p>Calling the add function with input of 1, 2:</p> +<pre><code>{{ add 1 2 }} +</code></pre> +<p><strong>Methods and fields are accessed via dot notation</strong></p> +<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p> +<pre><code>{{ .Params.bar }} +</code></pre> +<p><strong>Parentheses can be used to group items together</strong></p> +<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }} +</code></pre> +<h2 id="variables">Variables</h2> +<p>Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +<a href="https://sjtug.org/layout/variables">variables</a> page.</p> +<p>A variable is accessed by referencing the variable name.</p> +<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt; +</code></pre> +<p>Variables can also be defined and referenced.</p> +<pre><code>{{ $address := &quot;123 Main St.&quot;}} +{{ $address }} +</code></pre> +<h2 id="functions">Functions</h2> +<p>Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. <a href="https://sjtug.org/layout/functions">Hugo template +functions</a> provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ add 1 2 }} +</code></pre> +<h2 id="includes">Includes</h2> +<p>When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ template &quot;chrome/header.html&quot; . }} +</code></pre> +<h2 id="logic">Logic</h2> +<p>Go templates provide the most basic iteration and conditional logic.</p> +<h3 id="iteration">Iteration</h3> +<p>Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.</p> +<p><strong>Example 1: Using Context</strong></p> +<pre><code>{{ range array }} + {{ . }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring value variable name</strong></p> +<pre><code>{{range $element := array}} + {{ $element }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring key and value variable name</strong></p> +<pre><code>{{range $index, $element := array}} + {{ $index }} + {{ $element }} +{{ end }} +</code></pre> +<h3 id="conditionals">Conditionals</h3> +<p>If, else, with, or, &amp; and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p> +<p>Go Templates treat the following values as false:</p> +<ul> +<li>false</li> +<li>0</li> +<li>any array, slice, map, or string of length zero</li> +</ul> +<p><strong>Example 1: If</strong></p> +<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 2: If -&gt; Else</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{else}} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<p><strong>Example 3: And &amp; Or</strong></p> +<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +</code></pre> +<p><strong>Example 4: With</strong></p> +<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent.</p> +<p>The first example above could be simplified as:</p> +<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 5: If -&gt; Else If</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{ else if isset .Params &quot;caption&quot; }} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<h2 id="pipes">Pipes</h2> +<p>One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the +input of the following pipe.</p> +<p>Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.</p> +<p>A few simple examples should help convey how to use the pipe.</p> +<p><strong>Example 1 :</strong></p> +<pre><code>{{ if eq 1 1 }} Same {{ end }} +</code></pre> +<p>is the same as</p> +<pre><code>{{ eq 1 1 | if }} Same {{ end }} +</code></pre> +<p>It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.</p> +<p><strong>Example 2 :</strong></p> +<pre><code>{{ index .Params &quot;disqus_url&quot; | html }} +</code></pre> +<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p> +<p><strong>Example 3 :</strong></p> +<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +Stuff Here +{{ end }} +</code></pre> +<p>Could be rewritten as</p> +<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }} +Stuff Here +{{ end }} +</code></pre> +<h2 id="context-aka-the-dot">Context (aka. the dot)</h2> +<p>The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.</p> +<p><strong>Example:</strong></p> +<pre><code> {{ $title := .Site.Title }} + {{ range .Params.tags }} + &lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt; + {{ end }} +</code></pre> +<p>Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.</p> +<h1 id="hugo-parameters">Hugo Parameters</h1> +<p>Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.</p> +<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2> +<p>In each piece of content you can provide variables to be used by the +templates. This happens in the <a href="https://sjtug.org/content/front-matter">front matter</a>.</p> +<p>An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.</p> +<p>Here is the example front matter:</p> +<pre><code>--- +title: &quot;Permalinks&quot; +date: &quot;2013-11-18&quot; +aliases: + - &quot;/doc/permalinks/&quot; +groups: [&quot;extras&quot;] +groups_weight: 30 +notoc: true +--- +</code></pre><p>Here is the corresponding code inside of the template:</p> +<pre><code> {{ if not .Params.notoc }} + &lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt; + {{ .TableOfContents }} + &lt;/div&gt; + {{ end }} +</code></pre> +<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2> +<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site +parameters, which are values which will be available to you in chrome.</p> +<p>For instance, you might declare:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">params</span>: + <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span> + <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">&#34;spf13&#34;</span> + <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span> +</code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only +provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.</p> +<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt; +&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt; +&lt;/footer&gt;{{end}} +</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent:</p> +<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt; +&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt; +&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot; + alt=&quot;Twitter&quot;&gt;&lt;/a&gt; +&lt;/span&gt;{{end}} +</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do +so, such as in this example:</p> +<pre><code>&lt;nav class=&quot;recent&quot;&gt; + &lt;h1&gt;Recent Posts&lt;/h1&gt; + &lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} + &lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt; + {{end}}&lt;/ul&gt; +&lt;/nav&gt; +</code></pre> + + + + \ No newline at end of file diff --git a/tags/templates/page/1/index.html b/tags/templates/page/1/index.html new file mode 100644 index 00000000..41470c8f --- /dev/null +++ b/tags/templates/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/templates/ \ No newline at end of file diff --git a/tags/themes/index.html b/tags/themes/index.html new file mode 100644 index 00000000..bdaf2b38 --- /dev/null +++ b/tags/themes/index.html @@ -0,0 +1,122 @@ + + + + + + + + + + themes · SJTUG - A Joyful Techie User Group + + + + + + + + + + + + + + + + + + +
+ +
+

SJTUG

+ SJTU *NIX User Group +
+
+ + +
+ + + +
+ +
+ + + + + + + + + + + + + +
+ + +

+ + © Copyright 2023 SJTUG + +

+
+ +
+ + + + + + + + + + + + + + diff --git a/tags/themes/index.xml b/tags/themes/index.xml new file mode 100644 index 00000000..69adf956 --- /dev/null +++ b/tags/themes/index.xml @@ -0,0 +1,256 @@ + + + themes on SJTUG - A Joyful Techie User Group + https://sjtug.org/tags/themes/ + Recent content in themes on SJTUG - A Joyful Techie User Group + Hugo -- gohugo.io + zh-cn + Wed, 02 Apr 2014 00:00:00 +0000 + + + + + + (Hu)go Template Primer + https://sjtug.org/post/goisforlovers/ + Wed, 02 Apr 2014 00:00:00 +0000 + + https://sjtug.org/post/goisforlovers/ + <p>Hugo uses the excellent <a href="http://golang.org/">go</a> <a href="http://golang.org/pkg/html/template/">html/template</a> library for +its template engine. It is an extremely lightweight engine that provides a very +small amount of logic. In our experience that it is just the right amount of +logic to be able to create a good static website. If you have used other +template systems from different languages or frameworks you will find a lot of +similarities in go templates.</p> +<p>This document is a brief primer on using go templates. The <a href="http://golang.org/pkg/html/template/">go docs</a> +provide more details.</p> +<h2 id="introduction-to-go-templates">Introduction to Go Templates</h2> +<p>Go templates provide an extremely simple template language. It adheres to the +belief that only the most basic of logic belongs in the template or view layer. +One consequence of this simplicity is that go templates parse very quickly.</p> +<p>A unique characteristic of go templates is they are content aware. Variables and +content will be sanitized depending on the context of where they are used. More +details can be found in the <a href="http://golang.org/pkg/html/template/">go docs</a>.</p> +<h2 id="basic-syntax">Basic Syntax</h2> +<p>Go lang templates are html files with the addition of variables and +functions.</p> +<p><strong>Go variables and functions are accessible within {{ }}</strong></p> +<p>Accessing a predefined variable &ldquo;foo&rdquo;:</p> +<pre><code>{{ foo }} +</code></pre> +<p><strong>Parameters are separated using spaces</strong></p> +<p>Calling the add function with input of 1, 2:</p> +<pre><code>{{ add 1 2 }} +</code></pre> +<p><strong>Methods and fields are accessed via dot notation</strong></p> +<p>Accessing the Page Parameter &ldquo;bar&rdquo;</p> +<pre><code>{{ .Params.bar }} +</code></pre> +<p><strong>Parentheses can be used to group items together</strong></p> +<pre><code>{{ if or (isset .Params &quot;alt&quot;) (isset .Params &quot;caption&quot;) }} Caption {{ end }} +</code></pre> +<h2 id="variables">Variables</h2> +<p>Each go template has a struct (object) made available to it. In hugo each +template is passed either a page or a node struct depending on which type of +page you are rendering. More details are available on the +<a href="https://sjtug.org/layout/variables">variables</a> page.</p> +<p>A variable is accessed by referencing the variable name.</p> +<pre><code>&lt;title&gt;{{ .Title }}&lt;/title&gt; +</code></pre> +<p>Variables can also be defined and referenced.</p> +<pre><code>{{ $address := &quot;123 Main St.&quot;}} +{{ $address }} +</code></pre> +<h2 id="functions">Functions</h2> +<p>Go template ship with a few functions which provide basic functionality. The go +template system also provides a mechanism for applications to extend the +available functions with their own. <a href="https://sjtug.org/layout/functions">Hugo template +functions</a> provide some additional functionality we believe +are useful for building websites. Functions are called by using their name +followed by the required parameters separated by spaces. Template +functions cannot be added without recompiling hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ add 1 2 }} +</code></pre> +<h2 id="includes">Includes</h2> +<p>When including another template you will pass to it the data it will be +able to access. To pass along the current context please remember to +include a trailing dot. The templates location will always be starting at +the /layout/ directory within Hugo.</p> +<p><strong>Example:</strong></p> +<pre><code>{{ template &quot;chrome/header.html&quot; . }} +</code></pre> +<h2 id="logic">Logic</h2> +<p>Go templates provide the most basic iteration and conditional logic.</p> +<h3 id="iteration">Iteration</h3> +<p>Just like in go, the go templates make heavy use of range to iterate over +a map, array or slice. The following are different examples of how to use +range.</p> +<p><strong>Example 1: Using Context</strong></p> +<pre><code>{{ range array }} + {{ . }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring value variable name</strong></p> +<pre><code>{{range $element := array}} + {{ $element }} +{{ end }} +</code></pre> +<p><strong>Example 2: Declaring key and value variable name</strong></p> +<pre><code>{{range $index, $element := array}} + {{ $index }} + {{ $element }} +{{ end }} +</code></pre> +<h3 id="conditionals">Conditionals</h3> +<p>If, else, with, or, &amp; and provide the framework for handling conditional +logic in Go Templates. Like range, each statement is closed with <code>end</code>.</p> +<p>Go Templates treat the following values as false:</p> +<ul> +<li>false</li> +<li>0</li> +<li>any array, slice, map, or string of length zero</li> +</ul> +<p><strong>Example 1: If</strong></p> +<pre><code>{{ if isset .Params &quot;title&quot; }}&lt;h4&gt;{{ index .Params &quot;title&quot; }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 2: If -&gt; Else</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{else}} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<p><strong>Example 3: And &amp; Or</strong></p> +<pre><code>{{ if and (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +</code></pre> +<p><strong>Example 4: With</strong></p> +<p>An alternative way of writing &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent.</p> +<p>The first example above could be simplified as:</p> +<pre><code>{{ with .Params.title }}&lt;h4&gt;{{ . }}&lt;/h4&gt;{{ end }} +</code></pre> +<p><strong>Example 5: If -&gt; Else If</strong></p> +<pre><code>{{ if isset .Params &quot;alt&quot; }} + {{ index .Params &quot;alt&quot; }} +{{ else if isset .Params &quot;caption&quot; }} + {{ index .Params &quot;caption&quot; }} +{{ end }} +</code></pre> +<h2 id="pipes">Pipes</h2> +<p>One of the most powerful components of go templates is the ability to +stack actions one after another. This is done by using pipes. Borrowed +from unix pipes, the concept is simple, each pipeline&rsquo;s output becomes the +input of the following pipe.</p> +<p>Because of the very simple syntax of go templates, the pipe is essential +to being able to chain together function calls. One limitation of the +pipes is that they only can work with a single value and that value +becomes the last parameter of the next pipeline.</p> +<p>A few simple examples should help convey how to use the pipe.</p> +<p><strong>Example 1 :</strong></p> +<pre><code>{{ if eq 1 1 }} Same {{ end }} +</code></pre> +<p>is the same as</p> +<pre><code>{{ eq 1 1 | if }} Same {{ end }} +</code></pre> +<p>It does look odd to place the if at the end, but it does provide a good +illustration of how to use the pipes.</p> +<p><strong>Example 2 :</strong></p> +<pre><code>{{ index .Params &quot;disqus_url&quot; | html }} +</code></pre> +<p>Access the page parameter called &ldquo;disqus_url&rdquo; and escape the HTML.</p> +<p><strong>Example 3 :</strong></p> +<pre><code>{{ if or (or (isset .Params &quot;title&quot;) (isset .Params &quot;caption&quot;)) (isset .Params &quot;attr&quot;)}} +Stuff Here +{{ end }} +</code></pre> +<p>Could be rewritten as</p> +<pre><code>{{ isset .Params &quot;caption&quot; | or isset .Params &quot;title&quot; | or isset .Params &quot;attr&quot; | if }} +Stuff Here +{{ end }} +</code></pre> +<h2 id="context-aka-the-dot">Context (aka. the dot)</h2> +<p>The most easily overlooked concept to understand about go templates is that {{ . }} +always refers to the current context. In the top level of your template this +will be the data set made available to it. Inside of a iteration it will have +the value of the current item. When inside of a loop the context has changed. . +will no longer refer to the data available to the entire page. If you need to +access this from within the loop you will likely want to set it to a variable +instead of depending on the context.</p> +<p><strong>Example:</strong></p> +<pre><code> {{ $title := .Site.Title }} + {{ range .Params.tags }} + &lt;li&gt; &lt;a href=&quot;{{ $baseurl }}/tags/{{ . | urlize }}&quot;&gt;{{ . }}&lt;/a&gt; - {{ $title }} &lt;/li&gt; + {{ end }} +</code></pre> +<p>Notice how once we have entered the loop the value of {{ . }} has changed. We +have defined a variable outside of the loop so we have access to it from within +the loop.</p> +<h1 id="hugo-parameters">Hugo Parameters</h1> +<p>Hugo provides the option of passing values to the template language +through the site configuration (for sitewide values), or through the meta +data of each specific piece of content. You can define any values of any +type (supported by your front matter/config format) and use them however +you want to inside of your templates.</p> +<h2 id="using-content-page-parameters">Using Content (page) Parameters</h2> +<p>In each piece of content you can provide variables to be used by the +templates. This happens in the <a href="https://sjtug.org/content/front-matter">front matter</a>.</p> +<p>An example of this is used in this documentation site. Most of the pages +benefit from having the table of contents provided. Sometimes the TOC just +doesn&rsquo;t make a lot of sense. We&rsquo;ve defined a variable in our front matter +of some pages to turn off the TOC from being displayed.</p> +<p>Here is the example front matter:</p> +<pre><code>--- +title: &quot;Permalinks&quot; +date: &quot;2013-11-18&quot; +aliases: + - &quot;/doc/permalinks/&quot; +groups: [&quot;extras&quot;] +groups_weight: 30 +notoc: true +--- +</code></pre><p>Here is the corresponding code inside of the template:</p> +<pre><code> {{ if not .Params.notoc }} + &lt;div id=&quot;toc&quot; class=&quot;well col-md-4 col-sm-6&quot;&gt; + {{ .TableOfContents }} + &lt;/div&gt; + {{ end }} +</code></pre> +<h2 id="using-site-config-parameters">Using Site (config) Parameters</h2> +<p>In your top-level configuration file (eg, <code>config.yaml</code>) you can define site +parameters, which are values which will be available to you in chrome.</p> +<p>For instance, you might declare:</p> +<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#f92672">params</span>: + <span style="color:#f92672">CopyrightHTML</span>: <span style="color:#e6db74">&#34;Copyright &amp;#xA9; 2013 John Doe. All Rights Reserved.&#34;</span> + <span style="color:#f92672">TwitterUser</span>: <span style="color:#e6db74">&#34;spf13&#34;</span> + <span style="color:#f92672">SidebarRecentLimit</span>: <span style="color:#ae81ff">5</span> +</code></pre></div><p>Within a footer layout, you might then declare a <code>&lt;footer&gt;</code> which is only +provided if the <code>CopyrightHTML</code> parameter is provided, and if it is given, +you would declare it to be HTML-safe, so that the HTML entity is not escaped +again. This would let you easily update just your top-level config file each +January 1st, instead of hunting through your templates.</p> +<pre><code>{{if .Site.Params.CopyrightHTML}}&lt;footer&gt; +&lt;div class=&quot;text-center&quot;&gt;{{.Site.Params.CopyrightHTML | safeHtml}}&lt;/div&gt; +&lt;/footer&gt;{{end}} +</code></pre><p>An alternative way of writing the &ldquo;if&rdquo; and then referencing the same value +is to use &ldquo;with&rdquo; instead. With rebinds the context <code>.</code> within its scope, +and skips the block if the variable is absent:</p> +<pre><code>{{with .Site.Params.TwitterUser}}&lt;span class=&quot;twitter&quot;&gt; +&lt;a href=&quot;https://twitter.com/{{.}}&quot; rel=&quot;author&quot;&gt; +&lt;img src=&quot;/images/twitter.png&quot; width=&quot;48&quot; height=&quot;48&quot; title=&quot;Twitter: {{.}}&quot; + alt=&quot;Twitter&quot;&gt;&lt;/a&gt; +&lt;/span&gt;{{end}} +</code></pre><p>Finally, if you want to pull &ldquo;magic constants&rdquo; out of your layouts, you can do +so, such as in this example:</p> +<pre><code>&lt;nav class=&quot;recent&quot;&gt; + &lt;h1&gt;Recent Posts&lt;/h1&gt; + &lt;ul&gt;{{range first .Site.Params.SidebarRecentLimit .Site.Recent}} + &lt;li&gt;&lt;a href=&quot;{{.RelPermalink}}&quot;&gt;{{.Title}}&lt;/a&gt;&lt;/li&gt; + {{end}}&lt;/ul&gt; +&lt;/nav&gt; +</code></pre> + + + + \ No newline at end of file diff --git a/tags/themes/page/1/index.html b/tags/themes/page/1/index.html new file mode 100644 index 00000000..4868a4e7 --- /dev/null +++ b/tags/themes/page/1/index.html @@ -0,0 +1 @@ +https://sjtug.org/tags/themes/ \ No newline at end of file