Skip to content

Instantly share code, notes, and snippets.

View luoxufeiyan's full-sized avatar

Hugh Gao luoxufeiyan

View GitHub Profile
@luoxufeiyan
luoxufeiyan / push_nuget.py
Created May 30, 2024 08:42
递归地检查目录及其子目录中是否存在NuGet文件,并在找到NuGet文件时将其推送到指定的源中
import os
import subprocess
def push_nuget_packages(directory, source):
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith(".nupkg"):
nuget_file_path = os.path.join(root, file)
command = f"dotnet nuget push {nuget_file_path} -s {source}"
try:
@luoxufeiyan
luoxufeiyan / unzip.php
Created September 17, 2021 11:40
Unzip compressed packages on shared hosting server without SSH access
<?php
$zip = new ZipArchive();
if ($zip->open('./mail.zip') === true) { // Change this to your zip name
if ($zip->extractTo('./') === true) {
$zip->close();
} else {
exit('Extract Error');
}
@luoxufeiyan
luoxufeiyan / china-list.pac
Created March 20, 2021 03:32
Proxy list for China streaming websites, used to access these websites overseas. Special thanks @unblock-youku
/*
Installing/using this software, you agree that this software is
only for study purposes and its authors and service providers
take no responsibilities for any consequences.
http://pac.uku.im/pac.pac
*/
function _check_regex_list(i,o){":80/"===o.slice(0,4)&&(o=o.slice(3));for(var c=0;c<i.length;c++)if(i[c].test(o))return!0;return!1}function _check_patterns(i,o,c,m){return!(!i.hasOwnProperty(o)||!_check_regex_list(i[o],c.slice(m+o.length)))||!!_check_regex_list(i.any,c.slice(m))}function _find_proxy(i,o,c,m){return _check_patterns(i.white,o,c,m)?"DIRECT":_check_patterns(i.proxy,o,c,m)?_proxy_str:"DIRECT"}function FindProxyForURL(i,o){var c=i.slice(0,6);return"http:/"===c?_find_proxy(_http_map,o,i,7):"https:"===c?_find_proxy(_https_map,o,i,8):"DIRECT"}var _http_map={white:{any:[],"bangumi.bilibili.com":[/^\/index\/ding\-count\.json$/i]},proxy:{any:[/^[^\/]*\.cupid\.iqiyi\.com\//i,/^[^\/]*\.video\.qq\.com\//i,/^[^\/]*\.dpool\.sina\.com\.cn\//i,/^[^\/]*\.letv\.com\//i,/^[^\/]*\.api\.tv\.itc\.cn\//i,/^
@luoxufeiyan
luoxufeiyan / rescale.sh
Last active February 22, 2020 01:54
Rescale between laptop built-in monitor and external hi-dpi monitor
#!/bin/bash
# Ref: https://plumz.me/archives/10034/
xrandr --query | grep ' connected' | grep 2560 > /dev/null
result=$?
if [ $result -ne 0 ]; then
# HD
# gsettings set org.gnome.nautilus.icon-view default-zoom-level standard
# gsettings set org.gnome.desktop.interface cursor-size 24
@luoxufeiyan
luoxufeiyan / dw-backup.sh
Created December 18, 2019 08:25
Automatically Backup Dokuwiki Data Using Shell Script
#!/bin/sh
# Automatically Backup Dokuwiki Data Using Shell Script
# $Id: dw-backup.sh 328 2004-12-22 13:15:20Z dp $
# Original script: https://www.dokuwiki.org/tips:backup_script
# Blog post: https://www.luoxufeiyan.com/?p=3949
# config
WIKIPATH="/var/www/wiki.luoxufeiyan.com/data" # path to your wiki data directory, no symbolic links are allowed!
# for debian etch: /var/lib/dokuwiki
@luoxufeiyan
luoxufeiyan / tv.bilibili.player.xml
Last active July 18, 2017 03:30
我的Bilibili屏蔽词列表,屏蔽刷屏及引战等弹幕,可以在HTML5播放器中直接导入。
<filters>
<item enabled="true">u=dbaa1002</item>
<item enabled="true">u=1834340f</item>
<item enabled="true">u=bd4f7193</item>
<item enabled="true">u=285a2b69</item>
<item enabled="true">u=0bdffb47</item>
<item enabled="true">r=失踪人口|人口回归|完结撒花|高产|^高产似|发来贺电$|报道$|火钳刘明|刘明$|先投再看|再看|个小伙伴|考古</item>
<item enabled="true">r=前方|高能|核能|屏蔽|弹幕|字幕|檀木</item>
<item enabled="true">r=空耳|空耳君|空耳菌</item>
<item enabled="true">r=我要学|^教练,我要学|我想学</item>

Keybase proof

I hereby claim:

  • I am luoxufeiyan on github.
  • I am lxfy (https://keybase.io/lxfy) on keybase.
  • I have a public key whose fingerprint is 212E B70D 968C 3E8D 54A1 4542 EFD9 13DE 2E8D D52F

To claim this, I am signing this object: