Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
sync from private
Browse files Browse the repository at this point in the history
  • Loading branch information
likhner committed Feb 19, 2024
0 parents commit fbf84d2
Show file tree
Hide file tree
Showing 89 changed files with 19,869 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Node.js & TypeScript",
"image": "mcr.microsoft.com/devcontainers/typescript-node",
"forwardPorts": [
3000
],
"postCreateCommand": "npm install",
"postAttachCommand": "npm run start -- --host 0.0.0.0",
"customizations": {
"vscode": {
"settings": {
"files.autoSave": "afterDelay",
"editor.wordWrap": "on",
"files.eol": "\n",
"update.showReleaseNotes": false,
"workbench.startupEditor": "none",
"editor.inlineSuggest.enabled": true,
"git.enableSmartCommit": true,
"git.autofetch": true,
"editor.tabSize": 2,
"languageToolLinter.serviceType": "public",
"diffEditor.ignoreTrimWhitespace": false,
"markdownlint.config": {
"MD033": false,
"MD031": false
}
},
"extensions": [
"github.copilot",
"davidlday.languagetool-linter",
"yzhang.markdown-all-in-one",
"DavidAnson.vscode-markdownlint"
]
}
}
}
207 changes: 207 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################

# Auto detect
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto

# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text
*.css text diff=css
*.htm text diff=html
*.html text diff=html
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.ls text
*.map text -diff
*.od text
*.onlydata text
*.php text diff=php
*.pl text
*.ps1 text eol=crlf
*.py text diff=python
*.rb text diff=ruby
*.sass text
*.scm text
*.scss text diff=css
*.sh text eol=lf
.husky/* text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text diff=html

# Docker
Dockerfile text

# Documentation
*.ipynb text eol=lf
*.markdown text diff=markdown
*.md text diff=markdown
*.mdwn text diff=markdown
*.mdown text diff=markdown
*.mkd text diff=markdown
*.mkdn text diff=markdown
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text

# Templates
*.dot text
*.ejs text
*.erb text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.svelte text
*.tmpl text
*.tpl text
*.twig text
*.vue text

# Configs
*.cnf text
*.conf text
*.config text
.editorconfig text
.env text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text -diff
package.json text eol=lf
package-lock.json text eol=lf -diff
pnpm-lock.yaml text eol=lf -diff
.prettierrc text
yarn.lock text -diff
*.toml text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text

# Heroku
Procfile text

# Graphics
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.gifv binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary

# Audio
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary

# Video
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.avi binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary

# Archives
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary

# Fonts
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary

# Executables
*.exe binary
*.pyc binary

# RC files (like .babelrc or .eslintrc)
*.*rc text

# Ignore files (like .npmignore or .gitignore)
*.*ignore text
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and Deploy to GitHub Pages

on:
push:
paths-ignore:
- '.devcontainer'
- '.github/dependabot.yml'
- '.gitattributes'
- '.gitignore'
- '.imgbotconfig'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Master
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build Docusaurus
run: npm run build

- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: build
fqdn: nng.alonas.lv
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
build
.docusaurus
4 changes: 4 additions & 0 deletions .imgbotconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"minKBReduced": 0,
"aggressiveCompression": true
}
89 changes: 89 additions & 0 deletions admins/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
sidebar_position: 3
---

# 🗄 API

Небольшая часть публичного API для тех, кто хочет работать с нашими списками.

:::caution Внимание
У API тоже есть свои лимиты, поэтому оптимизируйте запросы так, чтобы не флудить ими.
:::

## Методы

### groups

Позволяет получить список всех групп.

* Ссылка: `https://api.nng.alonas.lv/groups`
* Методы: `GET`
* Ответ:
```json
[
{
"group_id": 214447636, // ID группы
"screen_name": "ffnng" // Короткая ссылка группы
},
{
"group_id": 197691823,
"screen_name": "nngpub"
}
]
```

### bnnd

Позволяет получить список заблокированных.

* Ссылка: `https://api.nng.alonas.lv/users/bnnd`
* Методы: `GET`
* Ответ:
```json
[
{
"user_id": 533370070, // ID пользователя
"name": "Платон Боровенников", // Имя пользователя на момент блокировки
"violations": [
{
"group_id": 158785301, // ID группы, где было нарушено правило (отсутствует у старых записей)
"priority": "teal", // Приоритет блокировки на основе нарушения (green – Зелёный, teal – Бирюзовый, orange – Оранжевый, red – Красный)
"complaint": 527055305, // ID человека, пожаловшегося на пользователя
"date": "2020-02-29" // Дата нарушения (отсутствует у старых записей)
}
]
},
{
"user_id": 527055305,
"name": "Nikita Ivanov",
"violations": [
{
"group_id": null,
"priority": "red",
"complaint": null,
"date": null
}
]
}
]
```

### thx

Позволяет получить список приоритетных пользователей.

* Ссылка: `https://api.nng.alonas.lv/users/thx`
* Методы: `GET`
* Ответ:
```json
[
{
"name": "Александр Бергер", // Имя пользователя
"user_id": 183636229 // ID пользователя
},
{
"name": "Егор Гущин",
"user_id": 260905818
}
]
```
Loading

0 comments on commit fbf84d2

Please sign in to comment.