ro 4.2.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +29 -8
- data/LICENSE +1 -1
- data/README.md +274 -111
- data/Rakefile +2 -2
- data/lib/ro/_lib.rb +18 -6
- data/lib/ro/asset.rb +23 -13
- data/lib/ro/collection.rb +47 -4
- data/lib/ro/config.rb +4 -0
- data/lib/ro/error.rb +5 -2
- data/lib/ro/html.rb +23 -0
- data/lib/ro/html_safe.rb +143 -0
- data/lib/ro/methods.rb +95 -38
- data/lib/ro/node.rb +78 -35
- data/lib/ro/path.rb +4 -0
- data/lib/ro/template.rb +62 -22
- data/lib/ro/text.rb +120 -0
- data/lib/ro.rb +4 -0
- data/public/api/ro/index-1.json +997 -79
- data/public/api/ro/index.json +997 -79
- data/public/api/ro/nerd/fastest-possible-embeddings/index.json +90 -0
- data/public/api/ro/nerd/ima/index.json +49 -0
- data/public/api/ro/nerd/index/index.json +74 -0
- data/public/api/ro/nerd/index-1.json +204 -0
- data/public/api/ro/nerd/index.json +194 -0
- data/public/api/ro/pages/about/index.json +60 -0
- data/public/api/ro/pages/contact/index.json +50 -0
- data/public/api/ro/pages/cv/index.json +49 -0
- data/public/api/ro/pages/disco/index.json +117 -0
- data/public/api/ro/pages/index/index.json +30 -0
- data/public/api/ro/pages/index-1.json +366 -0
- data/public/api/ro/pages/index.json +356 -0
- data/public/api/ro/pages/jess/index.json +62 -0
- data/public/api/ro/pages/now/index.json +43 -0
- data/public/api/ro/posts/almost-died-in-an-ice-cave/index.json +265 -0
- data/public/api/ro/posts/facebook-and-global-extremism/index.json +90 -0
- data/public/api/ro/posts/index-1.json +461 -79
- data/public/api/ro/posts/index.json +461 -79
- data/public/api/ro/posts/lemmings-considered-harmful/index.json +49 -0
- data/public/api/ro/posts/lost-in-the-desert/index.json +49 -0
- data/public/api/ro/posts/mission/index.json +49 -0
- data/public/api/ro/posts/return-your-laptop/index.json +61 -0
- data/public/ro/nerd/fastest-possible-embeddings/assets/giraffe.jpeg +0 -0
- data/public/ro/nerd/fastest-possible-embeddings/assets/let-me-in.jpg +0 -0
- data/public/ro/nerd/fastest-possible-embeddings/assets/src/fastembed.js +70 -0
- data/public/ro/nerd/fastest-possible-embeddings/assets/src/fastembed.rs +68 -0
- data/public/ro/nerd/fastest-possible-embeddings/assets/terminal.jpg +0 -0
- data/public/ro/nerd/fastest-possible-embeddings/attributes.yml +7 -0
- data/public/ro/nerd/fastest-possible-embeddings/body.md +266 -0
- data/public/ro/nerd/ima/assets/og.jpeg +0 -0
- data/public/ro/nerd/ima/attributes.yml +8 -0
- data/public/ro/nerd/ima/body.md +22 -0
- data/public/ro/nerd/index/assets/giraffe.jpeg +0 -0
- data/public/ro/nerd/index/assets/let-me-in.jpg +0 -0
- data/public/ro/nerd/index/assets/terminal.jpg +0 -0
- data/public/ro/nerd/index/attributes.yml +7 -0
- data/public/ro/nerd/index/body.md +130 -0
- data/public/ro/pages/about/assets/og.jpeg +0 -0
- data/public/ro/pages/about/assets/speak-english-pulp-fiction.gif +0 -0
- data/public/ro/pages/about/body.md +40 -0
- data/public/ro/pages/contact/assets/giraffe.jpeg +0 -0
- data/public/ro/pages/contact/attributes.yml +7 -0
- data/public/ro/pages/contact/body.md +9 -0
- data/public/ro/pages/cv/assets/ara.jpg +0 -0
- data/public/ro/pages/cv/attributes.yml +6 -0
- data/public/ro/pages/cv/body.md +122 -0
- data/public/ro/pages/disco/assets/disco.jpg +0 -0
- data/public/ro/pages/disco/assets/disco.png +0 -0
- data/public/ro/pages/disco/assets/speak-english-pulp-fiction.gif +0 -0
- data/public/ro/pages/disco/assets/src/environment.md +2354 -0
- data/public/ro/pages/disco/assets/src/fortune-500.md +2518 -0
- data/public/ro/pages/disco/assets/src/greed.md +2703 -0
- data/public/ro/pages/disco/assets/src/up-at-night.md +2337 -0
- data/public/ro/pages/disco/attributes.yml +9 -0
- data/public/ro/pages/disco/body.md +99 -0
- data/public/ro/pages/disco/samples/environment.md +2354 -0
- data/public/ro/pages/disco/samples/fortune-500.md +2518 -0
- data/public/ro/pages/disco/samples/greed.md +2703 -0
- data/public/ro/pages/disco/samples/up-at-night.md +2337 -0
- data/public/ro/pages/index/attributes.yml +1 -0
- data/public/ro/pages/index/body.md +15 -0
- data/public/ro/pages/jess/assets/og.jpg +0 -0
- data/public/ro/pages/jess/assets/speak-english-pulp-fiction.gif +0 -0
- data/public/ro/pages/jess/attributes.yml +7 -0
- data/public/ro/pages/jess/body.md +3 -0
- data/public/ro/pages/now/assets/speak-english-pulp-fiction.gif +0 -0
- data/public/ro/pages/now/attributes.yml +1 -0
- data/public/ro/pages/now/body.md +24 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image1.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image10.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image11.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image12.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image13.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image14.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image15.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image2.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image3.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image4.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image5.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image6.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image7.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image8.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/image9.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/josh-pointing.jpg +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/levi-rawr.png +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/og.jpg +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/assets/purple-heart.jpg +0 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/attributes.yml +6 -0
- data/public/ro/posts/almost-died-in-an-ice-cave/body.md +419 -0
- data/public/ro/posts/facebook-and-global-extremism/assets/background.html +125 -0
- data/public/ro/posts/facebook-and-global-extremism/assets/background.md +95 -0
- data/public/ro/posts/facebook-and-global-extremism/assets/og.jpg +0 -0
- data/public/ro/posts/facebook-and-global-extremism/assets/prompt.txt +122 -0
- data/public/ro/posts/facebook-and-global-extremism/assets/results.md +183 -0
- data/public/ro/posts/facebook-and-global-extremism/assets/survey.txt +190 -0
- data/public/ro/posts/facebook-and-global-extremism/attributes.yml +7 -0
- data/public/ro/posts/facebook-and-global-extremism/body.md +393 -0
- data/public/ro/posts/lemmings-considered-harmful/assets/lemming.jpeg +0 -0
- data/public/ro/posts/lemmings-considered-harmful/attributes.yml +6 -0
- data/public/ro/posts/lemmings-considered-harmful/body.md +43 -0
- data/public/ro/posts/lost-in-the-desert/assets/og.jpg +0 -0
- data/public/ro/posts/lost-in-the-desert/attributes.yml +6 -0
- data/public/ro/posts/lost-in-the-desert/body.md +7 -0
- data/public/ro/posts/mission/assets/og.jpg +0 -0
- data/public/ro/posts/mission/attributes.yml +6 -0
- data/public/ro/posts/mission/body.md +4 -0
- data/public/ro/posts/return-your-laptop/assets/og.jpg +0 -0
- data/public/ro/posts/return-your-laptop/assets/return-your-laptop.png +0 -0
- data/public/ro/posts/return-your-laptop/attributes.yml +6 -0
- data/public/ro/posts/return-your-laptop/body.md +58 -0
- data/ro.gemspec +178 -49
- data/scripts/speedtest.rb +324 -0
- data/tmp/gem-details.oe +0 -0
- metadata +157 -33
- data/public/api/ro/posts/first_post/index.json +0 -52
- data/public/api/ro/posts/second_post/index.json +0 -51
- data/public/api/ro/posts/third_post/index.json +0 -51
- data/public/ro/posts/first_post/assets/foo/bar/baz.jpg +0 -0
- data/public/ro/posts/first_post/assets/foo.jpg +0 -0
- data/public/ro/posts/first_post/assets/src/foo/bar.rb +0 -3
- data/public/ro/posts/first_post/attributes.yml +0 -2
- data/public/ro/posts/first_post/blurb.erb.md +0 -7
- data/public/ro/posts/first_post/body.md +0 -16
- data/public/ro/posts/first_post/testing.txt +0 -3
- data/public/ro/posts/second_post/assets/foo/bar/baz.jpg +0 -0
- data/public/ro/posts/second_post/assets/foo.jpg +0 -0
- data/public/ro/posts/second_post/assets/src/foo/bar.rb +0 -3
- data/public/ro/posts/second_post/attributes.yml +0 -2
- data/public/ro/posts/second_post/blurb.erb.md +0 -5
- data/public/ro/posts/second_post/body.md +0 -16
- data/public/ro/posts/third_post/assets/foo/bar/baz.jpg +0 -0
- data/public/ro/posts/third_post/assets/foo.jpg +0 -0
- data/public/ro/posts/third_post/assets/src/foo/bar.rb +0 -3
- data/public/ro/posts/third_post/attributes.yml +0 -2
- data/public/ro/posts/third_post/blurb.erb.md +0 -5
- data/public/ro/posts/third_post/body.md +0 -16
@@ -0,0 +1,58 @@
|
|
1
|
+
following is an AI generated summary of this article, so you won't have to read it!
|
2
|
+
|
3
|
+
> ### "
|
4
|
+
> A user on LinkedIn suggested that terminated employees should **always**
|
5
|
+
> return thier laptops, and that issue was cut and dried.
|
6
|
+
>
|
7
|
+
> [disco](/disco), a tool for bringing real human subjectivity to AI was then
|
8
|
+
> used to examine public sentiment about this statement.
|
9
|
+
>
|
10
|
+
> The responses varied, with some people feeling that employees should keep the
|
11
|
+
> laptops as a small consolation or to help with job searching, while others felt
|
12
|
+
> that keeping company property was unethical or a security risk.
|
13
|
+
>
|
14
|
+
> Some people suggested that companies offer a buyout option for the laptops,
|
15
|
+
> while others felt that a clean break was best.
|
16
|
+
>
|
17
|
+
> The responses highlight the complex and multifaceted nature of the issue, with
|
18
|
+
> no easy answers or universal agreement.
|
19
|
+
> ### "
|
20
|
+
|
21
|
+
i recently saw this unsolicited and undirected "suggestion" on linked-in (home
|
22
|
+
of the weak sauce), suggesting that the **only** ethical move is to return your
|
23
|
+
laptop when you've been fired.
|
24
|
+
|
25
|
+

|
26
|
+
|
27
|
+
while i do not condone brazen theft or just being a jerk, i personally
|
28
|
+
considered this post astonishingly tone deaf, in light of the fear so many who
|
29
|
+
have recently been laid off are feeling. for many, a computer, and the
|
30
|
+
internet, are their only lifelines to a potential future.
|
31
|
+
|
32
|
+
this situation is one i have experienced personally. i've been laid off, a
|
33
|
+
few years back, and went through a very, very difficult period (still to some
|
34
|
+
degree) where getting a job was a strangely recursive scenario - that is to
|
35
|
+
say, i needed money to buy a computer capable enough, to keep up with the
|
36
|
+
times, to stay sharp, to get a job. this is a real phenomenon experienced by
|
37
|
+
many. a nice laptop for a developer costs a cool $4k.
|
38
|
+
|
39
|
+
dan seemed pretty sure of himself so, i decided to run his theory through my
|
40
|
+
new thing, which i am calling [disco](/disco). as you can read for yourself,
|
41
|
+
i think the issue is more nuanced than he suggests, and that, in this period
|
42
|
+
of history, considering the massive ill will the general public is
|
43
|
+
snowballing, and getting ready to toss at corporations, it's worth seeing what
|
44
|
+
others might think. fwiw, [disco](/disco) lets you ask any question, and then
|
45
|
+
get back answers that are informed by real human beings, at scale.
|
46
|
+
|
47
|
+
it's my little attempt to use their weapons against them.
|
48
|
+
|
49
|
+
take some time, to review [these results](https://gist.github.com/ahoward/9696f63c118f7b9f102b04e5b4196ca5)
|
50
|
+
|
51
|
+
[what do you think?](/contact)
|
52
|
+
|
53
|
+
ps. in a future post, i'll show you how you can do way, way, way better with
|
54
|
+
your development environment by ditching apple, microsoft, etc. and moving to
|
55
|
+
linux and a chromebook. my current dev box costs me $320 at best buy and i'm
|
56
|
+
more productive than ever.
|
57
|
+
|
58
|
+

|
data/ro.gemspec
CHANGED
@@ -3,12 +3,12 @@
|
|
3
3
|
|
4
4
|
Gem::Specification::new do |spec|
|
5
5
|
spec.name = "ro"
|
6
|
-
spec.version = "4.
|
6
|
+
spec.version = "4.4.0"
|
7
7
|
spec.required_ruby_version = '>= 3.0'
|
8
8
|
spec.platform = Gem::Platform::RUBY
|
9
9
|
spec.summary = "all your content in github, as god intended"
|
10
|
-
spec.description = "
|
11
|
-
spec.license = "
|
10
|
+
spec.description = "the worlds tiniest, bestest, most minmialist headless cms - powered by github\n\nro is a minimalist toolkit for managing heterogeneous collections of rich web\ncontent on github, and providing both programatic and api access to it with zero\nheavy lifting"
|
11
|
+
spec.license = "Nonstandard"
|
12
12
|
|
13
13
|
spec.files =
|
14
14
|
["Gemfile",
|
@@ -29,6 +29,8 @@ Gem::Specification::new do |spec|
|
|
29
29
|
"lib/ro/collection/list.rb",
|
30
30
|
"lib/ro/config.rb",
|
31
31
|
"lib/ro/error.rb",
|
32
|
+
"lib/ro/html.rb",
|
33
|
+
"lib/ro/html_safe.rb",
|
32
34
|
"lib/ro/klass.rb",
|
33
35
|
"lib/ro/methods.rb",
|
34
36
|
"lib/ro/model.rb",
|
@@ -45,60 +47,183 @@ Gem::Specification::new do |spec|
|
|
45
47
|
"lib/ro/template",
|
46
48
|
"lib/ro/template.rb",
|
47
49
|
"lib/ro/template/rouge_formatter.rb",
|
50
|
+
"lib/ro/text.rb",
|
48
51
|
"public",
|
49
52
|
"public/api",
|
50
53
|
"public/api/ro",
|
51
54
|
"public/api/ro/index-1.json",
|
52
55
|
"public/api/ro/index.json",
|
56
|
+
"public/api/ro/nerd",
|
57
|
+
"public/api/ro/nerd/fastest-possible-embeddings",
|
58
|
+
"public/api/ro/nerd/fastest-possible-embeddings/index.json",
|
59
|
+
"public/api/ro/nerd/ima",
|
60
|
+
"public/api/ro/nerd/ima/index.json",
|
61
|
+
"public/api/ro/nerd/index",
|
62
|
+
"public/api/ro/nerd/index-1.json",
|
63
|
+
"public/api/ro/nerd/index.json",
|
64
|
+
"public/api/ro/nerd/index/index.json",
|
65
|
+
"public/api/ro/pages",
|
66
|
+
"public/api/ro/pages/about",
|
67
|
+
"public/api/ro/pages/about/index.json",
|
68
|
+
"public/api/ro/pages/contact",
|
69
|
+
"public/api/ro/pages/contact/index.json",
|
70
|
+
"public/api/ro/pages/cv",
|
71
|
+
"public/api/ro/pages/cv/index.json",
|
72
|
+
"public/api/ro/pages/disco",
|
73
|
+
"public/api/ro/pages/disco/index.json",
|
74
|
+
"public/api/ro/pages/index",
|
75
|
+
"public/api/ro/pages/index-1.json",
|
76
|
+
"public/api/ro/pages/index.json",
|
77
|
+
"public/api/ro/pages/index/index.json",
|
78
|
+
"public/api/ro/pages/jess",
|
79
|
+
"public/api/ro/pages/jess/index.json",
|
80
|
+
"public/api/ro/pages/now",
|
81
|
+
"public/api/ro/pages/now/index.json",
|
53
82
|
"public/api/ro/posts",
|
54
|
-
"public/api/ro/posts/
|
55
|
-
"public/api/ro/posts/
|
83
|
+
"public/api/ro/posts/almost-died-in-an-ice-cave",
|
84
|
+
"public/api/ro/posts/almost-died-in-an-ice-cave/index.json",
|
85
|
+
"public/api/ro/posts/facebook-and-global-extremism",
|
86
|
+
"public/api/ro/posts/facebook-and-global-extremism/index.json",
|
56
87
|
"public/api/ro/posts/index-1.json",
|
57
88
|
"public/api/ro/posts/index.json",
|
58
|
-
"public/api/ro/posts/
|
59
|
-
"public/api/ro/posts/
|
60
|
-
"public/api/ro/posts/
|
61
|
-
"public/api/ro/posts/
|
89
|
+
"public/api/ro/posts/lemmings-considered-harmful",
|
90
|
+
"public/api/ro/posts/lemmings-considered-harmful/index.json",
|
91
|
+
"public/api/ro/posts/lost-in-the-desert",
|
92
|
+
"public/api/ro/posts/lost-in-the-desert/index.json",
|
93
|
+
"public/api/ro/posts/mission",
|
94
|
+
"public/api/ro/posts/mission/index.json",
|
95
|
+
"public/api/ro/posts/return-your-laptop",
|
96
|
+
"public/api/ro/posts/return-your-laptop/index.json",
|
62
97
|
"public/ro",
|
98
|
+
"public/ro/nerd",
|
99
|
+
"public/ro/nerd/fastest-possible-embeddings",
|
100
|
+
"public/ro/nerd/fastest-possible-embeddings/assets",
|
101
|
+
"public/ro/nerd/fastest-possible-embeddings/assets/giraffe.jpeg",
|
102
|
+
"public/ro/nerd/fastest-possible-embeddings/assets/let-me-in.jpg",
|
103
|
+
"public/ro/nerd/fastest-possible-embeddings/assets/src",
|
104
|
+
"public/ro/nerd/fastest-possible-embeddings/assets/src/fastembed.js",
|
105
|
+
"public/ro/nerd/fastest-possible-embeddings/assets/src/fastembed.rs",
|
106
|
+
"public/ro/nerd/fastest-possible-embeddings/assets/terminal.jpg",
|
107
|
+
"public/ro/nerd/fastest-possible-embeddings/attributes.yml",
|
108
|
+
"public/ro/nerd/fastest-possible-embeddings/body.md",
|
109
|
+
"public/ro/nerd/ima",
|
110
|
+
"public/ro/nerd/ima/assets",
|
111
|
+
"public/ro/nerd/ima/assets/og.jpeg",
|
112
|
+
"public/ro/nerd/ima/attributes.yml",
|
113
|
+
"public/ro/nerd/ima/body.md",
|
114
|
+
"public/ro/nerd/index",
|
115
|
+
"public/ro/nerd/index/assets",
|
116
|
+
"public/ro/nerd/index/assets/giraffe.jpeg",
|
117
|
+
"public/ro/nerd/index/assets/let-me-in.jpg",
|
118
|
+
"public/ro/nerd/index/assets/terminal.jpg",
|
119
|
+
"public/ro/nerd/index/attributes.yml",
|
120
|
+
"public/ro/nerd/index/body.md",
|
121
|
+
"public/ro/pages",
|
122
|
+
"public/ro/pages/about",
|
123
|
+
"public/ro/pages/about/assets",
|
124
|
+
"public/ro/pages/about/assets/og.jpeg",
|
125
|
+
"public/ro/pages/about/assets/speak-english-pulp-fiction.gif",
|
126
|
+
"public/ro/pages/about/body.md",
|
127
|
+
"public/ro/pages/contact",
|
128
|
+
"public/ro/pages/contact/assets",
|
129
|
+
"public/ro/pages/contact/assets/giraffe.jpeg",
|
130
|
+
"public/ro/pages/contact/attributes.yml",
|
131
|
+
"public/ro/pages/contact/body.md",
|
132
|
+
"public/ro/pages/cv",
|
133
|
+
"public/ro/pages/cv/assets",
|
134
|
+
"public/ro/pages/cv/assets/ara.jpg",
|
135
|
+
"public/ro/pages/cv/attributes.yml",
|
136
|
+
"public/ro/pages/cv/body.md",
|
137
|
+
"public/ro/pages/disco",
|
138
|
+
"public/ro/pages/disco/assets",
|
139
|
+
"public/ro/pages/disco/assets/disco.jpg",
|
140
|
+
"public/ro/pages/disco/assets/disco.png",
|
141
|
+
"public/ro/pages/disco/assets/speak-english-pulp-fiction.gif",
|
142
|
+
"public/ro/pages/disco/assets/src",
|
143
|
+
"public/ro/pages/disco/assets/src/environment.md",
|
144
|
+
"public/ro/pages/disco/assets/src/fortune-500.md",
|
145
|
+
"public/ro/pages/disco/assets/src/greed.md",
|
146
|
+
"public/ro/pages/disco/assets/src/up-at-night.md",
|
147
|
+
"public/ro/pages/disco/attributes.yml",
|
148
|
+
"public/ro/pages/disco/body.md",
|
149
|
+
"public/ro/pages/disco/samples",
|
150
|
+
"public/ro/pages/disco/samples/environment.md",
|
151
|
+
"public/ro/pages/disco/samples/fortune-500.md",
|
152
|
+
"public/ro/pages/disco/samples/greed.md",
|
153
|
+
"public/ro/pages/disco/samples/up-at-night.md",
|
154
|
+
"public/ro/pages/index",
|
155
|
+
"public/ro/pages/index/attributes.yml",
|
156
|
+
"public/ro/pages/index/body.md",
|
157
|
+
"public/ro/pages/jess",
|
158
|
+
"public/ro/pages/jess/assets",
|
159
|
+
"public/ro/pages/jess/assets/og.jpg",
|
160
|
+
"public/ro/pages/jess/assets/speak-english-pulp-fiction.gif",
|
161
|
+
"public/ro/pages/jess/attributes.yml",
|
162
|
+
"public/ro/pages/jess/body.md",
|
163
|
+
"public/ro/pages/now",
|
164
|
+
"public/ro/pages/now/assets",
|
165
|
+
"public/ro/pages/now/assets/speak-english-pulp-fiction.gif",
|
166
|
+
"public/ro/pages/now/attributes.yml",
|
167
|
+
"public/ro/pages/now/body.md",
|
63
168
|
"public/ro/posts",
|
64
|
-
"public/ro/posts/
|
65
|
-
"public/ro/posts/
|
66
|
-
"public/ro/posts/
|
67
|
-
"public/ro/posts/
|
68
|
-
"public/ro/posts/
|
69
|
-
"public/ro/posts/
|
70
|
-
"public/ro/posts/
|
71
|
-
"public/ro/posts/
|
72
|
-
"public/ro/posts/
|
73
|
-
"public/ro/posts/
|
74
|
-
"public/ro/posts/
|
75
|
-
"public/ro/posts/
|
76
|
-
"public/ro/posts/
|
77
|
-
"public/ro/posts/
|
78
|
-
"public/ro/posts/
|
79
|
-
"public/ro/posts/
|
80
|
-
"public/ro/posts/
|
81
|
-
"public/ro/posts/
|
82
|
-
"public/ro/posts/
|
83
|
-
"public/ro/posts/
|
84
|
-
"public/ro/posts/
|
85
|
-
"public/ro/posts/
|
86
|
-
"public/ro/posts/
|
87
|
-
"public/ro/posts/
|
88
|
-
"public/ro/posts/
|
89
|
-
"public/ro/posts/
|
90
|
-
"public/ro/posts/
|
91
|
-
"public/ro/posts/
|
92
|
-
"public/ro/posts/
|
93
|
-
"public/ro/posts/
|
94
|
-
"public/ro/posts/
|
95
|
-
"public/ro/posts/
|
96
|
-
"public/ro/posts/
|
97
|
-
"public/ro/posts/
|
98
|
-
"public/ro/posts/
|
99
|
-
"public/ro/posts/
|
100
|
-
"public/ro/posts/
|
101
|
-
"ro.
|
169
|
+
"public/ro/posts/almost-died-in-an-ice-cave",
|
170
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets",
|
171
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image1.png",
|
172
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image10.png",
|
173
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image11.png",
|
174
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image12.png",
|
175
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image13.png",
|
176
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image14.png",
|
177
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image15.png",
|
178
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image2.png",
|
179
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image3.png",
|
180
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image4.png",
|
181
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image5.png",
|
182
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image6.png",
|
183
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image7.png",
|
184
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image8.png",
|
185
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/image9.png",
|
186
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/josh-pointing.jpg",
|
187
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/levi-rawr.png",
|
188
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/og.jpg",
|
189
|
+
"public/ro/posts/almost-died-in-an-ice-cave/assets/purple-heart.jpg",
|
190
|
+
"public/ro/posts/almost-died-in-an-ice-cave/attributes.yml",
|
191
|
+
"public/ro/posts/almost-died-in-an-ice-cave/body.md",
|
192
|
+
"public/ro/posts/facebook-and-global-extremism",
|
193
|
+
"public/ro/posts/facebook-and-global-extremism/assets",
|
194
|
+
"public/ro/posts/facebook-and-global-extremism/assets/background.html",
|
195
|
+
"public/ro/posts/facebook-and-global-extremism/assets/background.md",
|
196
|
+
"public/ro/posts/facebook-and-global-extremism/assets/og.jpg",
|
197
|
+
"public/ro/posts/facebook-and-global-extremism/assets/prompt.txt",
|
198
|
+
"public/ro/posts/facebook-and-global-extremism/assets/results.md",
|
199
|
+
"public/ro/posts/facebook-and-global-extremism/assets/survey.txt",
|
200
|
+
"public/ro/posts/facebook-and-global-extremism/attributes.yml",
|
201
|
+
"public/ro/posts/facebook-and-global-extremism/body.md",
|
202
|
+
"public/ro/posts/lemmings-considered-harmful",
|
203
|
+
"public/ro/posts/lemmings-considered-harmful/assets",
|
204
|
+
"public/ro/posts/lemmings-considered-harmful/assets/lemming.jpeg",
|
205
|
+
"public/ro/posts/lemmings-considered-harmful/attributes.yml",
|
206
|
+
"public/ro/posts/lemmings-considered-harmful/body.md",
|
207
|
+
"public/ro/posts/lost-in-the-desert",
|
208
|
+
"public/ro/posts/lost-in-the-desert/assets",
|
209
|
+
"public/ro/posts/lost-in-the-desert/assets/og.jpg",
|
210
|
+
"public/ro/posts/lost-in-the-desert/attributes.yml",
|
211
|
+
"public/ro/posts/lost-in-the-desert/body.md",
|
212
|
+
"public/ro/posts/mission",
|
213
|
+
"public/ro/posts/mission/assets",
|
214
|
+
"public/ro/posts/mission/assets/og.jpg",
|
215
|
+
"public/ro/posts/mission/attributes.yml",
|
216
|
+
"public/ro/posts/mission/body.md",
|
217
|
+
"public/ro/posts/return-your-laptop",
|
218
|
+
"public/ro/posts/return-your-laptop/assets",
|
219
|
+
"public/ro/posts/return-your-laptop/assets/og.jpg",
|
220
|
+
"public/ro/posts/return-your-laptop/assets/return-your-laptop.png",
|
221
|
+
"public/ro/posts/return-your-laptop/attributes.yml",
|
222
|
+
"public/ro/posts/return-your-laptop/body.md",
|
223
|
+
"ro.gemspec",
|
224
|
+
"scripts",
|
225
|
+
"scripts/speedtest.rb",
|
226
|
+
"tmp/gem-details.oe"]
|
102
227
|
|
103
228
|
spec.executables = ["ro"]
|
104
229
|
|
@@ -113,9 +238,13 @@ Gem::Specification::new do |spec|
|
|
113
238
|
|
114
239
|
spec.add_dependency(*["rouge", "~> 4.1", " >= 4.1.1"])
|
115
240
|
|
116
|
-
spec.add_dependency(*["
|
241
|
+
spec.add_dependency(*["front_matter_parser", "~> 1.0"])
|
117
242
|
|
118
|
-
spec.add_dependency(*["
|
243
|
+
spec.add_dependency(*["rinku", "~> 2.0"])
|
244
|
+
|
245
|
+
spec.add_dependency(*["image_size", "~> 3.4"])
|
246
|
+
|
247
|
+
spec.add_dependency(*["nokogiri", "~> 1"])
|
119
248
|
|
120
249
|
|
121
250
|
spec.extensions.push(*[])
|
@@ -0,0 +1,324 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
md = DATA.read
|
4
|
+
|
5
|
+
unless test(?d, './public/ro/speedtest')
|
6
|
+
FileUtils.mkdir_p('./public/ro/speedtest/')
|
7
|
+
|
8
|
+
1000.times do |i|
|
9
|
+
FileUtils.mkdir_p "./public/ro/speedtest/#{ i }"
|
10
|
+
IO.binwrite "./public/ro/speedtest/#{ i }/body.md", md
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
require_relative './lib/ro'
|
15
|
+
|
16
|
+
a = Time.now.to_f
|
17
|
+
|
18
|
+
ro = Ro.root
|
19
|
+
|
20
|
+
ro.posts.each(&:attributes)
|
21
|
+
ro.speedtest.each(&:attributes)
|
22
|
+
|
23
|
+
b = Time.now.to_f
|
24
|
+
|
25
|
+
puts((b - a).round(2))
|
26
|
+
|
27
|
+
__END__
|
28
|
+
|
29
|
+
# GitHub Markdown Kitchen Sink
|
30
|
+
|
31
|
+
A large collection of code samples which have been tested against GitHub's markdown parser... so you don't have to.
|
32
|
+
|
33
|
+
#### Resources
|
34
|
+
|
35
|
+
##### This Repo
|
36
|
+
|
37
|
+
- README.md ([preview](https://github.com/adamschwartz/github-markdown-kitchen-sink/blob/master/README.md), [raw](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/README.md)) – this file
|
38
|
+
- TEST.md ([preview](https://github.com/adamschwartz/github-markdown-kitchen-sink/blob/master/TEST.md), [raw](https://raw.github.com/adamschwartz/github-markdown-kitchen-sink/master/TEST.md)) — used to test the examples from this file, which are pre-generated
|
39
|
+
|
40
|
+
##### Markdown
|
41
|
+
|
42
|
+
- [Original Markdown Syntax](http://daringfireball.net/projects/markdown/syntax) from John Gruber
|
43
|
+
- [GitHub-Flavored Markdown](https://help.github.com/articles/github-flavored-markdown) from GitHub
|
44
|
+
|
45
|
+
## Code Examples with Preview
|
46
|
+
|
47
|
+
### Block Elements
|
48
|
+
|
49
|
+
<table>
|
50
|
+
<tr><td>Code</td><td>Preview</td></tr>
|
51
|
+
|
52
|
+
<!--- Paragraphs -->
|
53
|
+
<tr>
|
54
|
+
<td colspan="2">Paragraph</td>
|
55
|
+
</tr>
|
56
|
+
<tr>
|
57
|
+
<td>
|
58
|
+
<pre><code>This is a paragraph.</code></pre>
|
59
|
+
</td>
|
60
|
+
<td>This is a paragraph.</td>
|
61
|
+
</tr>
|
62
|
+
|
63
|
+
<!--- Headers -->
|
64
|
+
<tr>
|
65
|
+
<td colspan="2">Headers (Sextext-style)</td>
|
66
|
+
</tr>
|
67
|
+
<tr>
|
68
|
+
<td>
|
69
|
+
<pre><code>Header 1
|
70
|
+
========
|
71
|
+
|
72
|
+
Header 2
|
73
|
+
--------</code></pre>
|
74
|
+
</td>
|
75
|
+
<td>
|
76
|
+
<h1>Header 1</h1>
|
77
|
+
<h2>Header 2</h2>
|
78
|
+
</td>
|
79
|
+
</tr>
|
80
|
+
<tr>
|
81
|
+
<td colspan="2">Headers (Atx-style)</td>
|
82
|
+
</tr>
|
83
|
+
<tr>
|
84
|
+
<td>
|
85
|
+
<pre><code># Header 1
|
86
|
+
## Header 2
|
87
|
+
### Header 3
|
88
|
+
#### Header 4
|
89
|
+
##### Header 5
|
90
|
+
###### Header 6</code></pre>
|
91
|
+
</td>
|
92
|
+
<td>
|
93
|
+
<h1>Header 1</h1>
|
94
|
+
<h2>Header 2</h2>
|
95
|
+
<h3>Header 3</h3>
|
96
|
+
<h4>Header 4</h4>
|
97
|
+
<h5>Header 5</h5>
|
98
|
+
<h6>Header 6</h6>
|
99
|
+
</td>
|
100
|
+
</tr>
|
101
|
+
<tr>
|
102
|
+
<td colspan="2">Headers (Atx-style closed)</td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td>
|
106
|
+
<pre><code># Header 1 #
|
107
|
+
## Header 2 ##
|
108
|
+
### Header 3 ###
|
109
|
+
#### Header 4 ####
|
110
|
+
##### Header 5 #####
|
111
|
+
###### Header 6 #####</code></pre>
|
112
|
+
</td>
|
113
|
+
<td>
|
114
|
+
<h1>Header 1</h1>
|
115
|
+
<h2>Header 2</h2>
|
116
|
+
<h3>Header 3</h3>
|
117
|
+
<h4>Header 4</h4>
|
118
|
+
<h5>Header 5</h5>
|
119
|
+
<h6>Header 6</h6>
|
120
|
+
</td>
|
121
|
+
</tr>
|
122
|
+
|
123
|
+
<!--- Blockquotes -->
|
124
|
+
<tr>
|
125
|
+
<td colspan="2">Blockquote</td>
|
126
|
+
</tr>
|
127
|
+
<tr>
|
128
|
+
<td>
|
129
|
+
<pre><code>> Lorem ipsum dolor sit amet [...]</code></pre>
|
130
|
+
</td>
|
131
|
+
<td>
|
132
|
+
<blockquote>
|
133
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
134
|
+
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
|
135
|
+
viverra nec, fringilla in, laoreet vitae, risus.
|
136
|
+
</blockquote>
|
137
|
+
</td>
|
138
|
+
</tr>
|
139
|
+
<tr>
|
140
|
+
<td colspan="2">Blockquote with nested elements</td>
|
141
|
+
</tr>
|
142
|
+
<tr>
|
143
|
+
<td>
|
144
|
+
<!--- Code exmaple -->
|
145
|
+
<pre><code>> ## This is a header.
|
146
|
+
> 1. This is the first list item.
|
147
|
+
> 2. This is the second list item.
|
148
|
+
>
|
149
|
+
> Here's some example code:
|
150
|
+
>
|
151
|
+
> Markdown.generate();</code></pre>
|
152
|
+
<!--- End code exmaple -->
|
153
|
+
</td>
|
154
|
+
<td>
|
155
|
+
<blockquote>
|
156
|
+
<h2>This is a header.</h2>
|
157
|
+
<ol>
|
158
|
+
<li>This is the first list item.</li>
|
159
|
+
<li>This is the second list item.</li>
|
160
|
+
</ol>
|
161
|
+
<p>Here's some example code:</p>
|
162
|
+
<pre><code>Markdown.generate();</code></pre>
|
163
|
+
</blockquote>
|
164
|
+
</td>
|
165
|
+
</tr>
|
166
|
+
|
167
|
+
<!--- Lists -->
|
168
|
+
<tr>
|
169
|
+
<td colspan="2">List</td>
|
170
|
+
</tr>
|
171
|
+
<tr>
|
172
|
+
<td>
|
173
|
+
<table><tr><td>
|
174
|
+
<pre><code>- Red
|
175
|
+
- Green
|
176
|
+
- Blue</code></pre>
|
177
|
+
</td><td>
|
178
|
+
<pre><code>+ Red
|
179
|
+
+ Green
|
180
|
+
+ Blue</code></pre>
|
181
|
+
</td><td>
|
182
|
+
<pre><code>* Red
|
183
|
+
* Green
|
184
|
+
* Blue</code></pre>
|
185
|
+
</td></tr></table>
|
186
|
+
</td>
|
187
|
+
<td>
|
188
|
+
<ul>
|
189
|
+
<li>Red</li>
|
190
|
+
<li>Green</li>
|
191
|
+
<li>Blue</li>
|
192
|
+
</ul>
|
193
|
+
</td>
|
194
|
+
</tr>
|
195
|
+
<tr>
|
196
|
+
<td colspan="2">Ordered List</td>
|
197
|
+
</tr>
|
198
|
+
<tr>
|
199
|
+
<td>
|
200
|
+
<pre><code>1. Buy flour and salt
|
201
|
+
1. Mix together with water
|
202
|
+
1. Bake</code></pre>
|
203
|
+
</td>
|
204
|
+
<td>
|
205
|
+
<ol>
|
206
|
+
<li>Buy flour and salt</li>
|
207
|
+
<li>Mix together with water</li>
|
208
|
+
<li>Bake</li>
|
209
|
+
</ol>
|
210
|
+
</td>
|
211
|
+
</tr>
|
212
|
+
|
213
|
+
<!-- Code blocks -->
|
214
|
+
<tr>
|
215
|
+
<td colspan="2">Code Block</td>
|
216
|
+
</tr>
|
217
|
+
<tr>
|
218
|
+
<td>
|
219
|
+
<pre><code>Normal paragraph.
|
220
|
+
Code</code></pre>
|
221
|
+
</td>
|
222
|
+
<td>
|
223
|
+
<p>Normal paragraph.</p>
|
224
|
+
<pre><code>Code</code></pre>
|
225
|
+
</td>
|
226
|
+
</tr>
|
227
|
+
|
228
|
+
<!-- Horizontal rules -->
|
229
|
+
<tr>
|
230
|
+
<td colspan="2">Horizontal Rules</td>
|
231
|
+
</tr>
|
232
|
+
<tr>
|
233
|
+
<td>
|
234
|
+
<pre><code>* * *
|
235
|
+
|
236
|
+
***
|
237
|
+
|
238
|
+
*****
|
239
|
+
|
240
|
+
- - -
|
241
|
+
|
242
|
+
---------------------------------------</code></pre>
|
243
|
+
</td>
|
244
|
+
<td>
|
245
|
+
<hr/>
|
246
|
+
<hr/>
|
247
|
+
<hr/>
|
248
|
+
<hr/>
|
249
|
+
<hr/>
|
250
|
+
</td>
|
251
|
+
</tr>
|
252
|
+
</table>
|
253
|
+
|
254
|
+
### Inline Elements
|
255
|
+
|
256
|
+
<table>
|
257
|
+
<tr><td>Code</td><td>Preview</td></tr>
|
258
|
+
|
259
|
+
<!--- Links -->
|
260
|
+
<tr>
|
261
|
+
<td colspan="2">Links</td>
|
262
|
+
</tr>
|
263
|
+
<tr>
|
264
|
+
<td>
|
265
|
+
<pre><code>This is [an example](http://example.com "Example") link.
|
266
|
+
|
267
|
+
[This link](http://example.com) has no title attr.
|
268
|
+
|
269
|
+
This is [an example] [id] reference-style link.
|
270
|
+
|
271
|
+
[id]: http://example.com "Optional Title"</code></pre>
|
272
|
+
</td>
|
273
|
+
<td>
|
274
|
+
<p>This is <a href="http://example.com" title="Example">an example</a> link.</p>
|
275
|
+
<p><a href="http://example.com">This link</a> has no title attr.</p>
|
276
|
+
<p>This is <a href="http://example.com" title="Optional Title">an example</a> reference-style link.</p>
|
277
|
+
</td>
|
278
|
+
</tr>
|
279
|
+
|
280
|
+
<!--- Emphasis -->
|
281
|
+
<tr>
|
282
|
+
<td colspan="2">Emphasis</td>
|
283
|
+
</tr>
|
284
|
+
<tr>
|
285
|
+
<td>
|
286
|
+
<pre><code>*single asterisks*
|
287
|
+
|
288
|
+
_single underscores_
|
289
|
+
|
290
|
+
**double asterisks**
|
291
|
+
|
292
|
+
__double underscores__</td>
|
293
|
+
<td>
|
294
|
+
<p><em>single asterisks</em></p>
|
295
|
+
<p><em>single underscores</em></p>
|
296
|
+
<p><strong>double asterisks</strong></p>
|
297
|
+
<p><strong>double underscores</strong></p>
|
298
|
+
</td>
|
299
|
+
</tr>
|
300
|
+
|
301
|
+
<!--- Code -->
|
302
|
+
<tr>
|
303
|
+
<td colspan="2">Code</td>
|
304
|
+
</tr>
|
305
|
+
<tr>
|
306
|
+
<td>
|
307
|
+
<pre><code>This paragraph has some `code` in it.</td>
|
308
|
+
<td>
|
309
|
+
<p>This paragraph has some <code>code</code> in it.</p>
|
310
|
+
</td>
|
311
|
+
</tr>
|
312
|
+
|
313
|
+
<!--- Images -->
|
314
|
+
<tr>
|
315
|
+
<td colspan="2">Image</td>
|
316
|
+
</tr>
|
317
|
+
<tr>
|
318
|
+
<td>
|
319
|
+
<pre><code></td>
|
320
|
+
<td>
|
321
|
+
<p><img src="https://get.svg.workers.dev/?s=64&f=gray" title="Image Title" alt="Alt Text" /></p>
|
322
|
+
</td>
|
323
|
+
</tr>
|
324
|
+
</table>
|
data/tmp/gem-details.oe
ADDED
File without changes
|