joe 1 jaar geleden
bovenliggende
commit
44a9995999

+ 38 - 0
content/middleware/postgresql_in_short.md

@@ -59,6 +59,44 @@ grant all privileges on database <database> to <username>;
 6. \du list all users
 7. \e open editor
 8. \conninfo: list database and connection info
+9. \password: modify password
+10. \z
+11. \dp [tablename]: 查看对象的访问权限列表
+```
+
+## 常用 SQL
+
+```sql
+-- 查看当前用户
+select user; 
+-- 当前数据库
+select current_database();
+-- 建表
+create table <schema>.<table>();
+-- 角色
+create role <role>;
+alter role <role> with CREATEDB;
+drop role <role>
+-- 能登录的用户
+select * from pg_user;
+-- 所有角色
+select * from pg_roles;
+-- 查看 guest 表权限
+select * from information_schema.role_table_grants where grantee='guest' group by table_name,table_schema;
+-- 查看表所属权限
+select * from information_schema.role_table_grants where table_name='tablename' group by grantee,table_schema;
+-- 查看用户表权限
+select * from information_schema.table_privileges where grantee='guest';
+-- 查看用户的 USAGE 权限
+select * from information_schema.usage_privileges where grantee='guest';
+-- 检查权限
+select has_database_privilege(<user>, <database>, <privilege>);
+select has_schema_privilege(<user>, <schema>, <privilege>);
+select has_table_privilege(<user>, <table>, <privilege>);
+-- 查看 schema 所有表
+\dt <schema>.*
+select * from information_schema.tables where table_schema='public';
+
 ```
 ### 
 #### 升级问题

+ 8 - 0
content/middleware/redis_dragonfly.md

@@ -0,0 +1,8 @@
+---
+title: "Redis Dragonfly"
+date: 2024-03-19T11:48:02+07:00
+draft: true
+---
+
+[dragonfly](https://github.com/dragonflydb/dragonfly)
+

+ 16 - 0
content/posts/telegram_webapp.md

@@ -0,0 +1,16 @@
+---
+title: "Telegram_webapp"
+date: 2024-02-05T16:40:05+07:00
+draft: true
+---
+
+## Terms
+
+- WebApp
+- ThemeParams
+- MainButton
+- WebAppInitData
+- events
+
+- custom themes
+- theme settings

+ 15 - 1
content/res/github_projects.md

@@ -137,6 +137,8 @@ draft: false
 - [nginx-ui](https://github.com/0xJacky/nginx-ui)
 - [muraena](https://github.com/muraenateam/muraena)
 > Muraena is an almost-transparent reverse proxy aimed at automating phishing and post-phishing activities.
+- [frankenphp](https://github.com/dunglas/frankenphp)
+> PHP 应用服务器。 golang 编写,支持一众 PHP 框架
 
 ### Python
 
@@ -158,7 +160,6 @@ draft: false
 > A fancy self-hosted monitoring tool
 - [react-admin](https://github.com/marmelab/react-admin)
 > 后台 admin 库
-<<<<<<< Updated upstream
 - [tremor](https://www.tremor.so/)
 > 後臺組件
 - [refine](https://refine.dev/)
@@ -169,6 +170,13 @@ draft: false
 > 前端库
 - [MUI](https://github.com/mui/material-ui)
 > 前端库
+- [primereact](https://primereact.org/)
+> 前端 UI 组建库(或许更多)
+>
+- [primeflex](https://primeflex.org/)
+> CSS 库,不包含组件
+- [purgecss](https://purgecss.com/)
+> CSS 库,不包含组件
 - [nginx-proxy-manager](https://github.com/NginxProxyManager/nginx-proxy-manager)
 > Docker container for managing Nginx proxy hosts with a simple, powerful interface
 - [stenciljs](https://stenciljs.com/)
@@ -223,6 +231,12 @@ draft: false
 - [rainloop-webmail](https://github.com/RainLoop/rainloop-webmail)
 > Simple, modern & fast web-based email client
 
+- [phpstan](https://github.com/phpstan/phpstan)
+> PHP Static Analysis Tool - discover bugs in your code without running it!
+
+- [psalm](https://github.com/vimeo/psalm)
+> A static analysis tool for finding errors in PHP applications
+
 ### Ruby
 
 - [mastodon](https://github.com/mastodon/mastodon)

+ 9 - 1
content/res/self-hosted.md

@@ -21,14 +21,22 @@ draft: false
 - [misskey](https://github.com/misskey-dev/misskey)
 - [humhub](https://github.com/humhub/humhub)
 - [forem](https://github.com/forem/forem)
+- [libarea](https://github.com/LibArea/libarea)
+> UI 很像 forem 的一個純 PHP 社區。貌似沒做前後端分離
+- [discuit](https://github.com/discuitnet/discuit)
+> golang + react 实现的类 forem 社区。
+- [geekr](https://github.com/jarvis394/geekr)
+> 前端很像 libarea 的一个社区应用,不知道是不是 libarea 的前端? TS 开发
 - [steem](https://github.com/steemit/steem)
 - [subsocial](https://github.com/dappforce/subsocial-node)
 - [gotosocial](https://github.com/superseriousbusiness/gotosocial)
 > 兼容 mastodon 的社区
 - [flat](https://github.com/netless-io/flat)
 > 在线教室
-- [answer](https://github.com/answerdev/answer)
+- [answer](https://github.com/apache/incubator-answer)
 > 问答系统
+- [waterholeforum](https://github.com/waterholeforum/core)
+> PHP 論壇,前後分離
 
 ## Dev