Show newer
王小美 boosted

GitHub 上一个「满分作文生成器」这两天又火了…
该工具通过将专业术语与名人名言以随机的方式填入模板,生成一篇只有 “聪明人” 才能看懂的满分作文!
作文模板来 2020 浙江省高考语文满分作文,大家可自行体验下 [吃瓜]
在线体验: :sys_link: 网页链接 t.cn/A6U6P8dZ GitHub: :sys_link: 网页链接 t.cn/A6UxhodQ
:icon_weibo: weibo.com/5722964389/Jfsq1rIbe

王小美 boosted

#
2020夏季系列活动Part.1——Sidestory「火蓝之心」轻量化复刻现已开启!

:sys_bilibili: t.bilibili.com/422173831839058

好突然,不过我早就都有了,没那种惊喜的感觉,我现在只想要风笛 :02nom:

推荐几个今天发现的方便开发的网站:

正则检测神器

另一个正则检测工具

ruby playground

还有这篇 Rails信条 看的有点感动,决定好好学学 :icon_ruby_on_rails: :meowtea:

支持全套 啦!

概要

经过两天折腾终于把坑踩完了。实现方案:Kramdown 转换 Markdown + Rouge 渲染代码高亮 + images.weserv.nl 代理外部图片。

可以在这条嘟文查看本站 Markdown 效果: :icon_markdown: Markdown指南,本站用户可以直接在网页端看到效果,外站用户请到本站网页上查看,暂不清楚第三方 APP 兼容性。

本站代码已开源, :icon_github: mashirozx/mastodon,可以无缝和官方最新版对接,没有对数据库结构做过任何改动!Docker 镜像在此,请使用 alpha 版本: :icon_docker: Docker Hub

Markdown 介绍

Markdown 是一种轻量级标记语言,创始人为约翰·格鲁伯(John Gruber)。它允许人们“使用易读易写的纯文本格式编写文档,然后转换成有效的 XHTML(或者 HTML)文档”。这种语言吸收了很多在电子邮件中已有的纯文本标记的特性。

它的优点:

  • 它基于纯文本,方便修改和共享;
  • 几乎可以在所有的文本编辑器中编写;
  • 有众多编程语言的实现,以及应用的相关扩展;
  • 在 GitHub 等网站中有很好的应用;
  • 很容易转换为 HTML 文档或其他格式;
  • 适合用来编写文档、记录笔记、撰写文章。

Markdown 的中文使用说明见:Markdown 入门参考

本站适配介绍

本站使用的是 Kramdown 转换器,其实还能实现更多 Markdown 标准之外的特性,比如自定义插图样式:

Here is an inline ![smiley](smiley.png){:height="36px" width="36px"}.

And here is a referenced ![smile]

[smile]: smile.png
{: height="36px" width="36px"}

Here is an inline smileyMedia: smiley.

具体见:Kramdown Syntax

一点疑问

目前对图片代理的解决方案还不是特别满意,因为依赖的是第三方的图片代理,希望能用到 Mastodon 自己的 LinkCrawlWorkerMediaDownloadedWorker,但是我太菜了没找到入口。Mastodon 本身有一个 media_proxy 路由,好像可以临时代理图片,也不清楚应该怎么调用?

未测试内容及优化方向

目前还没有进行严格的测试,包括且不限于 XSS 隐患、外站兼容性、转换器本身稳定性。

在开发过程中,发现 Mastodon 的 Formatter 类(app/lib/formatter.rb)似乎是实时渲染的,也就是说每访问一次内容都要走一遍渲染流程,这次我的 Markdown parser 正好就是加在这个过程上的,是否会增加服务器负担有待观察,我想如果能直接存进数据库或者有什么方法缓存一下会更合理。

Kramdown 还支持 LaTeX 渲染数学公式,但目前我没有启用,后续会适配这个功能的。

还有如你所见,Markdown 转出来的东西,在网页上样式还不是太完美,等后续慢慢优化,当然,你也可以帮我, :icon_css: CSS 或者 :icon_sass: SCSS 样式发给我就可以啦 😁

关于网站关闭一整天的解释

服务器性能有限,而我目前必须在服务器的 Linux 环境上开发,所以就暂时把生产环境的网站关掉了。运营这个网站并没有盈利的目的,一切出于兴趣和热爱,所以虽然我无法提供服务 100% 稳定(稳定仅指网站的可访问性,网站数据我是每天自动备份的不可能有问题!!)的保证,但是我不会轻易放弃、跑路,否则我为什么要改这么多代码呢? :umaru_chan_002:

An h3 header

Now a nested list:

  1. First, get these ingredients:

    • carrots
    • celery
    • lentils
  2. Boil some water.

  3. Dump everything in the pot and follow
    this algorithm:

    find wooden spoon
    uncover pot
    stir
    cover pot
    balance wooden spoon precariously on pot handle
    wait 10 minutes
    goto first step (or shut off burner when done)
    

    Do not bump wooden spoon or it will fall.

Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).

Here’s a link to a website, to a local
doc
, and to a section heading in the current
doc
. Here’s a footnote 1.

Tables can look like this:

name age blog
Nick 12 Nick
Mike 32 Mike

A horizontal rule follows.


Here’s a definition list:

apples
Good for making applesauce.
oranges
Citrus!
tomatoes
There’s no “e” in tomatoe.

Again, text is indented 4 spaces. (Put a blank line between each
term/definition pair to spread things out more.)

and images can be specified like so:

example imageMedia: example image

Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:

\[I = \int \rho R^{2} dV\]

And note that you can backslash-escape any punctuation characters
which you wish to be displayed literally, ex.: `foo`, *bar*, etc.

  1. Footnote text goes here. 

Show thread

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, and monospace. Itemized lists
look like:

  • this one
  • that one
  • the other one

Note that — not considering the asterisk — the actual text
content starts at 4-columns in.

Block quotes are
written like so.

They can span multiple paragraphs,
if you like.

Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., “it’s all
in chapters 12–14”). Three dots … will be converted to an ellipsis.
Unicode is supported. ☺

An h2 header

Here’s a numbered list:

  1. first item
  2. second item
  3. third item

Delimited block for Pandoc to syntax highlight it:

import time
# Quick, count to ten!
for i in range(10):
    # (but not *too* quick)
    time.sleep(0.5)
    print i

An h3 header

Now a nested list:

  1. First, get these ingredients:

    • carrots
    • celery
    • lentils
  2. Boil some water.

  3. Dump everything in the pot and follow
    this algorithm:

    find wooden spoon
    uncover pot
    stir
    cover pot
    balance wooden spoon precariously on pot handle
    wait 10 minutes
    goto first step (or shut off burner when done)
    

    Do not bump wooden spoon or it will fall.

Notice again how text always lines up on 4-space indents (including
that last line which continues item 3 above).

Here’s a link to a website, to a local
doc
, and to a section heading in the current
doc
. Here’s a footnote 1.

  1. Footnote text goes here. 

王小美 boosted
王小美 boosted
王小美 boosted

#科技 #36kr 最前线丨郭明錤:若苹果全球下架微信,iPhone出货量或降30% 36kr.com/p/831635863265921

王小美 boosted
王小美 boosted

藏在高高的草丛中的狮子幼崽,博茨瓦纳卡拉哈里沙漠 (© Jami Tarris/Getty Images)
:icon_bing: u.2heng.xin/ezB3nz

王小美 boosted

两分钟修改你在本站的头像框:

1、 创建一个 Github 账号,注册教程:shouyishe.com/archives/2081

2、打开 github.com/mashirozx/hello_rob

3、点击右上角 `Edit this file in your fork of this project` 按键(图一)

4、参照文件上链接里的说明,添加你的配置(图二),编辑好后在页面最后面添加说明并点击绿色按键提交

5、下一个页面上点击绿色按键`Create pull requset` 之后会让编辑 pull request 信息,再次点击 `Create pull requset` 就可以了(图三)

6、最后可以看到你的 pull request 页面(图四),这就提交好了,等管理员稍后同意合并就可以啦,如果长时间没有处理请 @mashiro 提醒一下~

原来相邻的emoji之间可以不加空格 :ac_classic01:

:nyancat_rainbow::nyancat_rainbow::nyancat_rainbow::nyancat_rainbow::nyancat_body::nyancat_face:

有点厉害哈哈哈

//金正恩罕见亲驾SUV奔赴灾区 朝央视曝车型引关注(图)(含视频)_手机新浪网
news.sina.cn/gj/2020-08-08/det

王小美 boosted
王小美 boosted
Show older
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。