This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import os | |
| import subprocess | |
| import sys | |
| import wave | |
| def check_ffmpeg(): | |
| """Check if ffmpeg is installed.""" | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var FindProxyForURL = function(init, profiles) { | |
| return function(url, host) { | |
| "use strict"; | |
| var result = init, scheme = url.substr(0, url.indexOf(":")); | |
| do { | |
| if (!profiles[result]) return result; | |
| result = profiles[result]; | |
| if (typeof result === "function") result = result(url, host, scheme); | |
| } while (typeof result !== "string" || result.charCodeAt(0) === 43); | |
| return result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "defaultGridEnabled": false, | |
| "defaultPageVisible": false, | |
| "customFonts": [ | |
| "Inter", | |
| "pingfang sc" | |
| ], | |
| "defaultVertexStyle": { | |
| "strokeWidth": 2, | |
| "fontSize": 16, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias proxy="export http_proxy='socks://127.0.0.1:10808';export https_proxy='socks://127.0.0.1:10808'" | |
| alias unproxy="export http_proxy='';export https_proxy=''" | |
| alias vim='/c/Program\ Files/Neovim/bin/nvim.exe' | |
| alias sudo='/c/Program\ Files\ \(x86\)/gsudo/sudo.exe' | |
| # >>> conda initialize >>> | |
| # !! Contents within this block are managed by 'conda init' !! | |
| if [ -f '/c/Users/lingn/miniconda3/Scripts/conda.exe' ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Write-Host ("Current time: " + (Get-Date -Format "yyyy-MM-dd HH:mm:ss")) | |
| # Import-Module posh-git # select posh-git or oh-my-posh | |
| oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\pure.omp.json" | Invoke-Expression | |
| #Invoke-Expression (&starship init powershell) | |
| Import-Module PSReadLine | |
| Set-PSReadLineKeyHandler -Key Ctrl+Shift+c -Function Copy | |
| Set-PSReadLineKeyHandler -Key Ctrl+v -Function Paste | |
| #Set-PSReadLineOption -EditMode Emacs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import os | |
| one = re.compile(r'(\t )+') | |
| two = re.compile(r'(\t\t )+') | |
| three = re.compile(r'(\t\t\t )+') | |
| four = re.compile(r'(\t\t\t\t )+') | |
| five = re.compile(r'(\t\t\t\t\t )+') | |
| six = re.compile(r'(\t\t\t\t\t\t\t )+') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/python3.8 | |
| #!conding=utf8 | |
| import os | |
| from datetime import date | |
| # ==== Config ==== | |
| qgpath = "/Users/sansui233/Library/Mobile Documents/com~apple~CloudDocs/App备份/五笔/qgdict.txt" | |
| lgpath = "/Users/sansui233/Library/Mobile Documents/com~apple~CloudDocs/App备份/五笔/output.txt" | |
| outpath = "/Users/sansui233/Library/Mobile Documents/com~apple~CloudDocs/App备份/五笔/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func main() { | |
| // IEEE is crc32b, which is used to hash bilibili uid | |
| // Encode | |
| uid := "21670130" | |
| h := fmt.Sprintf("%x", crc32.ChecksumIEEE([]byte(uid))) | |
| fmt.Printf("Encoding of %s: %s\n", uid, h) | |
| // Decode | |
| hashed := "6acc8733" | |
| fmt.Printf("Start Decoding... \n") | |
| for i := 1; i < 500000000; i++ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # https://www.nginx.com/resources/wiki/start/ | |
| # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ | |
| # https://wiki.debian.org/Nginx/DirectoryStructure | |
| # | |
| # In most cases, administrators will remove this file from sites-enabled/ and | |
| # leave it as reference inside of sites-available where it will continue to be | |
| # updated by the nginx packaging team. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo "Fix your images width into 640px" | |
| path=$(pwd) | |
| cd $path | |
| echo "\033[34m[Info] Workdir: $path" $(tput sgr0) | |
| files=$(ls $path) | |
| for filename in $files | |
| do | |
| echo "\033[34m[Info] Converting $filename ........." $(tput sgr0) | |
NewerOlder