Skip to content

Commit

Permalink
remove unused resources
Browse files Browse the repository at this point in the history
  • Loading branch information
madawei2699 committed Jan 21, 2023
1 parent d5ce786 commit 6ebf8ee
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 37 deletions.
14 changes: 2 additions & 12 deletions content/dev/Coding-Anytime-Anywhere.en.md
Expand Up @@ -7,20 +7,10 @@ keywords: "elixir"
description: "Use Elixir write hello world"
---

## Coding Anytime Anywhere
## Coding Anytime Anywhere 💗 Elixir

```elixir
(for x <- [<<65>><>"ny"], y <- ~w(time where), do: x <> y)
|> Enum.reduce('Co'++~c(deing)--[101], &([&2|["\s"|&1]]))
|> IO.puts
```

## Data Transform
```elixir
File.read!("./data.txt")
|> String.split("\n")
|> Enum.map(fn x -> {:ok, date, _} = DateTime.from_iso8601("2019-08-12T" <> x <> "Z"); date end)
|> Enum.group_by(fn x -> x end)
|> Enum.map(fn {k, v} -> [k, length(v)] end)
|> Enum.sort(fn l, r -> l <= r end)
|> Enum.reduce("", fn x, acc -> d = Enum.at(x, 0); acc <> "#{d.year}/#{d.month}/#{d.day} #{d.hour}:#{d.minute}:#{d.second}" <> ", #{Enum.at(x, 1)}" <> "\n" end) |> (fn s -> File.write("./data.csv", s) end).()
```
3 changes: 0 additions & 3 deletions static/js/custom.js
Expand Up @@ -304,9 +304,6 @@ function webShare() {
function set_track_event() {
document.querySelector('a[href="https://twitter.com/madawei2699"]').onclick = () => umami('Twitter menu click');
document.querySelector('a[href="https://github.com/madawei2699"]').onclick = () => umami('GitHub menu click');
if (document.getElementById('follow-my-twitter') !== null) {
document.getElementById('follow-my-twitter').onclick = () => umami('Twitter follow click');
}
}

if( document.readyState !== 'loading' ) {
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-coder/layouts/dev/list.html
Expand Up @@ -8,8 +8,8 @@
{{$scratch.Add "total" (countwords .Content)}}
{{ end }}
<h1 class="title" style="font-size: 1.6rem !important;border-bottom:1px dotted #bf7326;padding-bottom:20px;">
{{ .Description }}
{{ if or (hasPrefix .RelPermalink "/dev/") (hasPrefix .RelPermalink "/self/") (hasPrefix .RelPermalink "/money/") }}
{{ .Description }}
<br>
<div style="text-align:left;font-size: 1.2rem !important;">共{{ len (where .Site.RegularPages "Section" "==" "dev") }}篇文章/总计{{$scratch.Get "total" }}字/浏览量<span id="dev-page-views"></span></div>
{{ end }}
Expand Down
1 change: 0 additions & 1 deletion themes/hugo-coder/layouts/dev/single.html
Expand Up @@ -87,7 +87,6 @@ <h1 class="title">{{ .Title }}</h1>
</div>

<div style="border-bottom-style: dashed;border-bottom-style: inset;border-bottom-width: 2px;width: 50%;margin: 0 auto;"></div>
<a id="follow-my-twitter" href="https://twitter.com/madawei2699"><img style="box-shadow:none !important;width: 200px;" src="https://img.shields.io/twitter/follow/madawei2699?style=social"></a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-coder/layouts/money/list.html
Expand Up @@ -8,8 +8,8 @@
{{$scratch.Add "total" (countwords .Content)}}
{{ end }}
<h1 class="title" style="font-size: 1.6rem !important;border-bottom:1px dotted #bf7326;padding-bottom:20px;">
{{ .Description }}
{{ if or (hasPrefix .RelPermalink "/dev/") (hasPrefix .RelPermalink "/self/") (hasPrefix .RelPermalink "/money/") }}
{{ .Description }}
<br>
<div style="text-align:left;font-size: 1.2rem !important;">共{{ len (where .Site.RegularPages "Section" "==" "money") }}篇文章/总计{{$scratch.Get "total" }}字/浏览量<span id="money-page-views"></span></div>
{{ end }}
Expand Down
1 change: 0 additions & 1 deletion themes/hugo-coder/layouts/money/single.html
Expand Up @@ -87,7 +87,6 @@ <h1 class="title">{{ .Title }}</h1>
</div>

<div style="border-bottom-style: dashed;border-bottom-style: inset;border-bottom-width: 2px;width: 50%;margin: 0 auto;"></div>
<a id="follow-my-twitter" href="https://twitter.com/madawei2699"><img style="box-shadow:none !important;width: 200px;" src="https://img.shields.io/twitter/follow/madawei2699?style=social"></a>
</div>
</div>

Expand Down
18 changes: 2 additions & 16 deletions themes/hugo-coder/layouts/partials/footer.html
@@ -1,16 +1,9 @@
<footer class="footer">
<div class="footer-taxonomy">
<div style="margin-bottom: 10px;">
<a href="https://wiki.bmpi.dev/">Wiki</a>
⚔️
<div>
<a href="/talk/">Talk</a>
<a href="https://money.bmpi.dev/">Invest</a>
⚔️
<a href="https://tg.bmpi.dev">Think</a>
</div>
<div>
<a href="https://note.bmpi.dev/#/all-pages">Note</a>
⚡️
<a href= {{ relLangURL "tool" }} >Tool</a>
⚡️
Expand All @@ -19,13 +12,6 @@
<a href="https://umami.bmpi.dev/share/ilNU9n5W/bmpi.dev">Stats</a>
</div>
</div>
<div class="footer-taxonomy">
<a href= {{ relLangURL "tags" }} style="color: #B36D61;">Tags</a>
👈
<a href= {{ relLangURL "categories" }} style="color: #FF8C31;">Categories</a>
👉
<a href= {{ relLangURL "series" }} style="color: #519A73;">Series</a>
</div>
<section class="container">
{{ with .Site.Params.footercontent | safeHTML }}
<p>{{.}}</p>
Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-coder/layouts/self/list.html
Expand Up @@ -8,8 +8,8 @@
{{$scratch.Add "total" (countwords .Content)}}
{{ end }}
<h1 class="title" style="font-size: 1.6rem !important;border-bottom:1px dotted #bf7326;padding-bottom:20px;">
{{ .Description }}
{{ if or (hasPrefix .RelPermalink "/dev/") (hasPrefix .RelPermalink "/self/") (hasPrefix .RelPermalink "/money/") }}
{{ .Description }}
<br>
<div style="text-align:left;font-size: 1.2rem !important;">共{{ len (where .Site.RegularPages "Section" "==" "self") }}篇文章/总计{{$scratch.Get "total" }}字/浏览量<span id="self-page-views"></span></div>
{{ end }}
Expand Down
1 change: 0 additions & 1 deletion themes/hugo-coder/layouts/self/single.html
Expand Up @@ -87,7 +87,6 @@ <h1 class="title">{{ .Title }}</h1>
</div>

<div style="border-bottom-style: dashed;border-bottom-style: inset;border-bottom-width: 2px;width: 50%;margin: 0 auto;"></div>
<a id="follow-my-twitter" href="https://twitter.com/madawei2699"><img style="box-shadow:none !important;width: 200px;" src="https://img.shields.io/twitter/follow/madawei2699?style=social"></a>
</div>
</div>

Expand Down

0 comments on commit 6ebf8ee

Please sign in to comment.