-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ae22058
Showing
26 changed files
with
1,582 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dh=1f526289182e6f75ac4606f01aa656ae9b2a14a2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!doctypehtml><title>AutumnVN (1kb)</title><link href=data:, rel=icon><body alink=#77f bgcolor=#222 link=#adf vlink=#adf><font color=#fff face=Inter,system-ui,sans-serif size=4><table align=center><tr><td><h1>AutumnVN</h1><p>Hi! I'm AutumnVN, a dude from Vietnam. Nice to meet you :3<p>an epic 1kb site<h3>You can find me on</h3><ul><li><a href=/github>GitHub</a><li><a href=/dm>Discord</a><li><a href=/facebook>Facebook</a><li><a href=/youtube>Youtube</a><li><a href=/twitter>Twitter</a><li><a href=/osu>osu!</a></ul><h3>Projects</h3><ul><li><a href=//github.com/AutumnVN/chino.pages.dev>chino.pages.dev</a><li><a href=//github.com/AutumnVN/debloat-premid>debloat-premid</a><li><a href=//github.com/AutumnVN/loli>loli</a><li><a href=//github.com/Vendicated/Vencord>Vencord</a> (contributor)</ul><p>Email: <a href=mailto:[email protected]>[email protected]</a></p><br><p align=center>read if cute • <a href=/ >main site</a></table></font> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 AutumnVN | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/akatsuki https://akatsuki.gg/u/102756 301 | ||
/bsky https://bsky.app/profile/chino.id.vn 301 | ||
/bot https://discord.com/oauth2/authorize?client_id=833707580593143841&permissions=8&scope=bot 301 | ||
/chess https://www.chess.com/member/autumnvn 301 | ||
/codeberg https://codeberg.org/AutumnVN 301 | ||
/crowdin https://crowdin.com/profile/AutumnVN 301 | ||
/discord https://discord.com/users/393694671383166998 301 | ||
/dm https://discord.com/users/393694671383166998 301 | ||
/facebook https://www.facebook.com/autumnvnchino 301 | ||
/genshin https://enka.network/u/829753707 301 | ||
/github https://github.com/AutumnVN 301 | ||
/lastfm https://www.last.fm/user/AutumnVN 301 | ||
/osu https://osu.ppy.sh/users/26086345 301 | ||
/pixiv https://www.pixiv.net/users/54279342 301 | ||
/reddit https://www.reddit.com/user/AutumnVN 301 | ||
/rickroll https://www.youtube.com/watch?v=dQw4w9WgXcQ 301 | ||
/ripple https://ripple.moe/u/128582 301 | ||
/spotify https://open.spotify.com/user/31x3ktny3mzvdu5kob47r6oceyiq 301 | ||
/steam https://steamcommunity.com/id/AutumnVN 301 | ||
/twitch https://www.twitch.tv/autumnvn 301 | ||
/twitter https://twitter.com/autumnvnchino 301 | ||
/youtube https://www.youtube.com/@AutumnVN 301 | ||
/wysi https://www.youtube.com/watch?v=AaAF51Gwbxo&t=62s 301 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export async function onRequestGet() { | ||
const max = 267; | ||
return new Response(await fetch(`https://raw.githubusercontent.com/AutumnVN/chino.webp/main/${Math.ceil(Math.random() * max)}.webp`).then(r => r.blob()), { | ||
headers: { | ||
'content-type': 'image/webp', | ||
'cache-control': 'no-cache, max-age=0' | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export async function onRequestGet({ env, waitUntil }) { | ||
const value = + await env.COUNT.get('count') + 1 || 1; | ||
|
||
waitUntil(await env.COUNT.put('count', value)); | ||
|
||
return new Response(generateSvg(String(value).padStart(7, '0')), { | ||
headers: { | ||
'content-type': 'image/svg+xml', | ||
'cache-control': 'no-cache, max-age=0' | ||
} | ||
}); | ||
} | ||
|
||
function generateSvg(str) { | ||
const font = 24; | ||
const size = 29; | ||
const margin = 32; | ||
let text = ''; | ||
|
||
for (let i = 0; i < str.length; i++) { | ||
text += `<rect x="${i * margin}" y="0.5"/><text><tspan x="${i * margin + 7}" y="22">${str[i]}</tspan></text>`; | ||
} | ||
|
||
return `<svg xmlns="http://www.w3.org/2000/svg" width="${margin * str.length}" height="30"><style>rect {fill: #000;width: ${size}px;height: ${size}px;}text {font: ${font}px Courier;fill: #0f1;}</style><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">${text}</g></svg>`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export async function onRequestGet({ env, waitUntil }) { | ||
const value = Number((await env.COUNT.get('count')) || 0) + 1; | ||
|
||
const originSvg = await fetch('https://lanyard.cnrad.dev/api/393694671383166998?showDisplayName=true&bg=0d1117&idleMessage=https://chino.pages.dev').then(r => r.text()); | ||
|
||
const newSvg = originSvg.replace(/( width=")410((px)?" )/g, '$1350$2') | ||
.replace(/width: 400px;/g, 'width: 340px;') | ||
.replace(/width: 279px;/, 'width: 219px;') | ||
.replace(/border: solid 0.5px #222;/, '$& object-fit: cover;') | ||
.replace(/height="210px">/, 'height="265px">') | ||
.replace(/<\/svg>/, generateCountSvg(String(value).padStart(7, '0')) + '$&'); | ||
|
||
waitUntil(await env.COUNT.put('count', value)); | ||
|
||
return new Response(newSvg, { | ||
headers: { | ||
'content-type': 'image/svg+xml', | ||
'cache-control': 'no-cache, max-age=0' | ||
} | ||
}); | ||
} | ||
|
||
function generateCountSvg(str) { | ||
const y = 215; | ||
const font = 37; | ||
const size = 45; | ||
const margin = 50; | ||
let text = ''; | ||
|
||
for (let i = 0; i < str.length; i++) { | ||
text += `<rect x="${i * margin}" y="0.5"/><text><tspan x="${i * margin + 11}" y="34">${str[i]}</tspan></text>`; | ||
} | ||
|
||
return `<g transform="translate(0,${y})"><style>rect {fill: #0d1117;width: ${size}px;height: ${size}px;}text {font: ${font}px Courier;fill: #0f1;}</style><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">${text}</g></g>`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
export async function onRequestGet({ env }) { | ||
const query = `{ | ||
a: repository(owner: "AutumnVN", name: "chino.pages.dev") { stargazers { totalCount } forks { totalCount } } | ||
b: repository(owner: "AutumnVN", name: "debloat-premid") { stargazers { totalCount } forks { totalCount } } | ||
c: repository(owner: "AutumnVN", name: "loli") { stargazers { totalCount } forks { totalCount } } | ||
d: repository(owner: "AutumnVN", name: "highlight") { stargazers { totalCount } forks { totalCount } } | ||
e: repository(owner: "Vendicated", name: "Vencord") { stargazers { totalCount } forks { totalCount } } | ||
f: repository(owner: "Vencord", name: "vencord.dev") { stargazers { totalCount } forks { totalCount } } | ||
g: repository(owner: "ppy", name: "osu-wiki") { stargazers { totalCount } forks { totalCount } } | ||
z: user(login: "AutumnVN") { | ||
repositories(first: 100, ownerAffiliations: OWNER) { | ||
nodes { | ||
stargazerCount | ||
forkCount | ||
} | ||
} | ||
contributionsCollection { | ||
totalCommitContributions | ||
} | ||
pullRequests(first: 1) { | ||
totalCount | ||
} | ||
issues(first: 1) { | ||
totalCount | ||
} | ||
repositoriesContributedTo(first: 1, contributionTypes: [COMMIT, ISSUE, PULL_REQUEST, REPOSITORY]) { | ||
totalCount | ||
} | ||
} | ||
}`; | ||
|
||
const { data } = await fetch('https://api.github.com/graphql', { | ||
method: 'POST', | ||
headers: { | ||
'accept': 'application/json', | ||
'authorization': `bearer ${env.GITHUB_TOKEN}`, | ||
'user-agent': 'AutumnVN' | ||
}, | ||
body: JSON.stringify({ query }) | ||
}).then(r => r.json()); | ||
|
||
const repos = Object.values(data); | ||
const stats = repos.pop(); | ||
|
||
const statsArr = [ | ||
stats.repositories.nodes.reduce((a, b) => a + b.stargazerCount, 0), | ||
stats.repositories.nodes.reduce((a, b) => a + b.forkCount, 0), | ||
stats.contributionsCollection.totalCommitContributions, | ||
stats.pullRequests.totalCount, | ||
stats.issues.totalCount, | ||
stats.repositoriesContributedTo.totalCount | ||
]; | ||
|
||
const res = repos.map(i => ([ | ||
i.stargazers.totalCount, | ||
i.forks.totalCount | ||
])); | ||
|
||
res.push(statsArr); | ||
|
||
return new Response(JSON.stringify(res), { | ||
headers: { | ||
'content-type': 'application/json', | ||
'cache-control': 'public, max-age=3600' | ||
} | ||
}); | ||
} |
Binary file not shown.
Oops, something went wrong.