Skip to content

Instantly share code, notes, and snippets.

View qfdk's full-sized avatar
😃

qfdk

😃
View GitHub Profile
@qfdk
qfdk / lvim-cursor-fix.md
Created May 22, 2023 20:40 — forked from nishantwrp/lvim-cursor-fix.md
Fixing cursor change in lunar vim

Problem

Entering lunarvim changes the default cursor type of terminal.

Solution:

Add the following lines to your config.lua

lvim.autocommands = {
  {
 "VimLeave",
{
"api": {
"id": null,
"worker-id": null
},
"http": {
"enabled": false,
"host": "127.0.0.1",
"port": 0,
"access-token": null,
@qfdk
qfdk / cert_cleanup.py
Last active September 10, 2020 15:41 — forked from ronaldgrn/cert_cleanup.py
lua-resty-auto-ssl: Delete expired (or near expired) certs from redis
import redis
import json
from datetime import datetime, timedelta
from redis.exceptions import ResponseError
r = redis.Redis(host='localhost', port=6379, db=0, decode_responses=True)
now = datetime.now()
# 过期天数
three_days_from_now = now + timedelta(days=30)

Keybase proof

I hereby claim:

  • I am qfdk on github.
  • I am qfdk (https://keybase.io/qfdk) on keybase.
  • I have a public key ASDnfUchyTz29XLAfo9MS0vhwabTT7Q26eWYWIkfLnd1tAo

To claim this, I am signing this object:

@qfdk
qfdk / fileServer.py
Created July 29, 2017 12:18
树洞外链python 上传方案
#!/usr/bin/python
'''
SDshare Server Script For Python
Ver:1.0
E-mail:[email protected]
'''
from flask import Flask,request,make_response,abort
from werkzeug import secure_filename
import json,base64,hashlib,time,random,os
from os.path import join, getsize