Skip to content

Instantly share code, notes, and snippets.

View QGB's full-sized avatar
💭
unhappy=

Too large to fit in the margin QGB

💭
unhappy=
  • Please
  • Follow me
View GitHub Profile
@QGB
QGB / YouTube
Created November 3, 2021 08:37
$("video.html5-main-video").ontimeupdate=function(){
console.log(arguments,document.querySelector("video.html5-main-video").currentTime)
}
ƒ (){
console.log(arguments,document.querySelector("video.html5-main-video").currentTime)
}
VM5557:2 Arguments [Event, callee: ƒ, Symbol(Symbol.iterator): ƒ] 290.331737
VM5557:2 Arguments [Event, callee: ƒ, Symbol(Symbol.iterator): ƒ] 290.427104
VM5557:2 Arguments [Event, callee: ƒ, Symbol(Symbol.iterator): ƒ] 290.632047
VM5557:2 Arguments [Event, callee: ƒ, Symbol(Symbol.iterator): ƒ] 290.800068
@QGB
QGB / gist:7ff7b21efec89b338a460ab208a716d5
Created August 18, 2021 07:25
leetcode print-zero-even-odd
import threading
cz= threading.Condition()
cq= threading.Condition()
ce= threading.Condition()
class ZeroEvenOdd:
def __init__(self, n):
self.n = n
self.q=1
self.e=2
@QGB
QGB / git.py
Created January 30, 2020 08:38
import sys;'qgb.U' in sys.modules or sys.path.append('C:/qgb/');from qgb import *
import dulwich
import dulwich.client
from dulwich.repo import Repo
from dulwich import index
import os
import shutil
def clone(url,path=None):
{
"git.ignoreLegacyWarning": true,
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"window.zoomLevel": 1,
"editor.accessibilitySupport": "off",
"diffEditor.ignoreTrimWhitespace": true,
"files.autoSave": "afterDelay",
"rust.rustup": {
"toolchain": "nightly-x86_64-unknown-linux-gnu",
"nightlyToolchain": "nightly-x86_64-unknown-linux-gnu"
@QGB
QGB / asyncio_loops.py
Created November 20, 2019 12:12 — forked from lars-tiede/asyncio_loops.py
asyncio + multithreading: one asyncio event loop per thread
import asyncio
import threading
import random
def thr(i):
# we need to create a new loop for the thread, and set it as the 'default'
# loop that will be returned by calls to asyncio.get_event_loop() from this
# thread.
loop = asyncio.new_event_loop()
YandexBrowser browser://activation/ 不能乱点,这会 导致浏览器重新初始化,所有未同步的修改全部丢失!!所有设置重置
但是如果遇到无法登录同步的情况,重新初始化却能登录
登录同步之后,首先同步密码,只要几秒钟,
书签大约10分钟同步完成
同步扩展
@QGB
QGB / win10
Created November 2, 2019 09:02
C:\Windows\System32\OpenSSH\ssh.exe
必需同时正确提供 C:\Users\ \.ssh\id_rsa.pub C:\Users\ \.ssh\id_rsa.pub, 否则Permission denied
@QGB
QGB / Rust
Created October 31, 2019 04:54
3 | println!("[{}]", file_name[1..] );
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
println!("[{}]", &file_name[1..] ); // 借用
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = false
hideDotFiles = dotGitOnly
quotepath = false
autocrlf = false
load key bad permission
:直接在 vscode terminal 里 ssh-keygen,然后修改 IdentityFile ~/.ssh/id_rsa
[13:25:24.777]"install"terminal command done
[13:25:24.777]Install terminal quit with output:过程试图写入的管道不存在。
[13:25:24.778]Received install output:过程试图写入的管道不存在。
[13:25:24.779]Failed to parse remote port from server output
[13:25:24.780]Resolver error:
[13:25:24.782]TELEMETRY:{"eventName":"resolver","properties":