Skip to content

Instantly share code, notes, and snippets.

View bGZo's full-sized avatar
🚀
Focusing

菜就多練練 bGZo

🚀
Focusing
View GitHub Profile
@bGZo
bGZo / .bash_aliases
Last active July 2, 2024 15:24 — forked from vratiu/.bash_aliases
Git shell coloring
# Test gh-cli is working or not?
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@bGZo
bGZo / v2proxy.sh
Last active July 2, 2024 12:46
docs: proxy command references
# ____
# __ _|___ \ _ __ _ __ _____ ___ _
# \ \ / / __) | '_ \| '__/ _ \ \/ / | | |
# \ V / / __/| |_) | | | (_) > <| |_| |
# (_)_/ |_____| .__/|_| \___/_/\_\\__, |
# |_| |___/
# +---------------+---------------------------------------+
# | updated | 20230210 |
# | author | bGZo |
# | test command | curl www.google.com |
@bGZo
bGZo / oracle.sql
Last active July 2, 2024 12:50
docs: imu database course oracle backup
----------- Window Command Settings-------------
SET WRAP OFF
COL (COLUMN_NAME) FOR A20
set linesize 300
-- 1. make select beautiful :-)
-- 2. if set wrap off then maybe the truncating (as requested)
-- before column xxx
-- 3.rows are maybe be truncated and can't display.
@bGZo
bGZo / removeCards.js
Last active August 19, 2021 05:35
cnblogs self config
(function(window) {
//TODO:
//1. 移除评论, 推荐的多余显示.
var idArray=[
"footer", //页脚
"blog_nav_admin", //管理
"top_nav", //顶栏
"under_post_card1", //编辑推荐
"under_post_card2", //最新新闻
@bGZo
bGZo / fill-wenjuan.py
Last active July 2, 2024 15:23
script: wenjuan random select ans. =_=
#!/usr/bin/env python
#-*- coding: utf-8 -*-
""" 启发于 CSDN 上的不能用的代码, https://www.wenjuan.com, 问卷网, 脚本, -_-
+ 添加单选多选判断
+ 命令行调用/帮助
! 数据随机很均匀, 需要自己手动再调和一下
"""
__author__ = "bGZo"
$my_tasks = @(
"AppleMobileDeviceService.exe", # [Always] Apple
"ATService.exe", # AnyText
"BattMonSVC.exe", # BattMonUI
"crashpad_handler.exe", # IDGAF
"DTShellHlp.exe", # DAEMON Tools Lite
"Everything.exe", # Everything
"msedgewebview2.exe", # Microsoft Edge
"OriginWebHelperService.exe", # Game/Origin
"gamingservices.exe", # [ALWAYS] XBOX
var cover = document.getElementsByClassName("subjectCover");
for(var i = 0; i < cover.length; i++){
var your_gh = '';
var delete_href = cover[i].href+'/remove?gh=' + your_gh;
fetch(delete_href);
}
@bGZo
bGZo / custom.css
Last active May 31, 2023 07:11
Logseq solarized theme | Logseq 护眼色主题
/* Color begin via: [logseq/custom.css](https://gist.github.com/madawei2699/61cf9601a443df21a9fabb282723936c)
*/
:root{
--base03: #002b36;
--base02: #073642;
--base01: #586e75;
--base00: #657b83;
--base0: #839496;
--base1: #93a1a1;
--base2: #eee8d5;
@bGZo
bGZo / get_twitter_mastodon_content_with_logseq_format.py
Last active June 10, 2023 17:07
Get the content of Twitter/Mastodon with logseq format. The former service by tweetpik.com. The latter service by official API.
import json
import requests
import re
import argparse
from argparse import RawTextHelpFormatter
from datetime import datetime
from markdownify import markdownify as md
import datetime
def weeks_of_year(year):
# NOTE: https://stackoverflow.com/questions/29262859
last_week = datetime.date(year, 12, 28)
return last_week.isocalendar()[1]
def weeks_of_date(date):
year, week_num, day_of_week = date.isocalendar()
return week_num