Skip to content

Instantly share code, notes, and snippets.

View wuhan005's full-sized avatar
🐦
Noob

E99p1ant wuhan005

🐦
Noob
View GitHub Profile
@wuhan005
wuhan005 / README.md
Created September 10, 2023 05:14
Repair UptimeKuma SQLite Database
  1. Backup the old database.
cp kuma.db kuma.bak.db
  1. Fix the old database tables, excepts setting table.
sqlite3 kuma.db ".dump api_key monitor_tag docker_host monitor_tls_info group notification heartbeat notification_sent_historyincident proxy maintenance maintenance_status_page status_page monitor status_page_cname monitor_group tag monitor_maintenance user monitor_notification" | sed -e 's|^ROLLBACK;\( -- due to errors\)*$|COMMIT;|g' | sqlite3 recover.db
@wuhan005
wuhan005 / gist:fe3365ab81ca5036d923bfd468d9e1f8
Created October 18, 2022 17:01
CouchDB read only design document
{
"_id": "_design/_auth",
"language": "javascript",
"validate_doc_update": "function(newDoc, oldDoc, userCtx, secObj) { if(userCtx.roles.indexOf('_admin') !== -1){ return true; } else { throw({forbidden : 'read only'}); } }"
}

Keybase proof

I hereby claim:

  • I am wuhan005 on github.
  • I am e99p1ant (https://keybase.io/e99p1ant) on keybase.
  • I have a public key whose fingerprint is 0FCF 3C27 9D46 BD84 6F55 6BD5 0FED 108F C764 D2CA

To claim this, I am signing this object:

@wuhan005
wuhan005 / B★RS.gif
Last active May 13, 2020 17:06
B★RS
B★RS.gif
@wuhan005
wuhan005 / ❤️Gopher.GIF
Last active May 13, 2020 17:14
I ❤️Gopher
❤️Gopher.GIF