Skip to content

Instantly share code, notes, and snippets.

View tristone13th's full-sized avatar
🎯
Focusing

Leinux tristone13th

🎯
Focusing
View GitHub Profile
@tristone13th
tristone13th / set_default_kernel.py
Created August 8, 2022 01:15
This snippet can help you change your grub default kernel when booting up.
import subprocess
import os
import sys
import re
if os.geteuid() != 0:
subprocess.call(['sudo', 'python3', *sys.argv])
sys.exit()
output = subprocess.check_output(
@tristone13th
tristone13th / lsp.log
Last active March 22, 2022 16:20
lsp.log
[START][2022-03-15 05:42:01] LSP logging initiated
[START][2022-03-16 00:15:24] LSP logging initiated
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.850] clangd version 10.0.0-4ubuntu1 \nI[00:15:24.851] PID: 272776\nI[00:15:24.851] Working directory: /home/sdp/projects/pks-upstream\nI[00:15:24.851] argv[0]: clangd\nI[00:15:24.851] Starting LSP over stdin/stdout\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.867] <-- initialize(1)\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.895] --> reply:initialize(1) 28 ms\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.896] <-- initialized\nI[00:15:24.896] unhandled notification initialized\nI[00:15:24.897] <-- textDocument/didOpen\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.901] Failed to find compilation database for /home/sdp/projects/pks-upstream/
@tristone13th
tristone13th / lsp.log
Created March 22, 2022 16:20
lsp.log
[START][2022-03-15 05:42:01] LSP logging initiated
[START][2022-03-16 00:15:24] LSP logging initiated
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.850] clangd version 10.0.0-4ubuntu1 \nI[00:15:24.851] PID: 272776\nI[00:15:24.851] Working directory: /home/sdp/projects/pks-upstream\nI[00:15:24.851] argv[0]: clangd\nI[00:15:24.851] Starting LSP over stdin/stdout\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.867] <-- initialize(1)\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.895] --> reply:initialize(1) 28 ms\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.896] <-- initialized\nI[00:15:24.896] unhandled notification initialized\nI[00:15:24.897] <-- textDocument/didOpen\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.901] Failed to find compilation database for /home/sdp/projects/pks-upstream/
@tristone13th
tristone13th / lsp.log
Created March 22, 2022 16:20
lsp.log
[START][2022-03-15 05:42:01] LSP logging initiated
[START][2022-03-16 00:15:24] LSP logging initiated
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.850] clangd version 10.0.0-4ubuntu1 \nI[00:15:24.851] PID: 272776\nI[00:15:24.851] Working directory: /home/sdp/projects/pks-upstream\nI[00:15:24.851] argv[0]: clangd\nI[00:15:24.851] Starting LSP over stdin/stdout\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.867] <-- initialize(1)\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.895] --> reply:initialize(1) 28 ms\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.896] <-- initialized\nI[00:15:24.896] unhandled notification initialized\nI[00:15:24.897] <-- textDocument/didOpen\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.901] Failed to find compilation database for /home/sdp/projects/pks-upstream/
@tristone13th
tristone13th / lsp.log
Created March 22, 2022 16:20
lsp.log
[START][2022-03-15 05:42:01] LSP logging initiated
[START][2022-03-16 00:15:24] LSP logging initiated
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.850] clangd version 10.0.0-4ubuntu1 \nI[00:15:24.851] PID: 272776\nI[00:15:24.851] Working directory: /home/sdp/projects/pks-upstream\nI[00:15:24.851] argv[0]: clangd\nI[00:15:24.851] Starting LSP over stdin/stdout\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.867] <-- initialize(1)\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.895] --> reply:initialize(1) 28 ms\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.896] <-- initialized\nI[00:15:24.896] unhandled notification initialized\nI[00:15:24.897] <-- textDocument/didOpen\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.901] Failed to find compilation database for /home/sdp/projects/pks-upstream/
@tristone13th
tristone13th / lsp.log
Created March 22, 2022 16:20
lsp.log
[START][2022-03-15 05:42:01] LSP logging initiated
[START][2022-03-16 00:15:24] LSP logging initiated
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.850] clangd version 10.0.0-4ubuntu1 \nI[00:15:24.851] PID: 272776\nI[00:15:24.851] Working directory: /home/sdp/projects/pks-upstream\nI[00:15:24.851] argv[0]: clangd\nI[00:15:24.851] Starting LSP over stdin/stdout\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.867] <-- initialize(1)\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.895] --> reply:initialize(1) 28 ms\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.896] <-- initialized\nI[00:15:24.896] unhandled notification initialized\nI[00:15:24.897] <-- textDocument/didOpen\n"
[ERROR][2022-03-16 00:15:24] .../vim/lsp/rpc.lua:420 "rpc" "clangd" "stderr" "I[00:15:24.901] Failed to find compilation database for /home/sdp/projects/pks-upstream/
@tristone13th
tristone13th / gist:690f226b3af0c95f3deae87aef44bb8f
Created December 17, 2021 17:50
解决 GitHub 提交过慢问题
git config --global http.proxy 'socks5://127.0.0.1:7890'
git config --global https.proxy 'socks5://127.0.0.1:7890'
git config --global http.sslVerify false
git config --global https.sslVerify false