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
| #!/user/bin/python | |
| #!conding=utf8 | |
| import os | |
| g = os.walk("$HOME/RightFont/Font Library.rightfontlibrary/fonts") | |
| for path,folder,filelist in g: | |
| # print "===Dir List===",folder; | |
| for filename in filelist: | |
| src = os.path.join(path, filename) | |
| dst = os.path.join("$HOME/Library/Fonts/", filename) |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key><string>autodarkmode</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>$HOME/Developer/shell/tools/autodarkmode.sh</string> | |
| </array> |
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
| #!bin/bash | |
| if [ $# -eq 0 ]; then | |
| echo "-l launch" | |
| echo "-k kill" | |
| echo "-a launch and autostart" | |
| echo "-u kill and unset autostart" | |
| echo "-h help" | |
| exit 0 | |
| fi |
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
| #!/bin/bash | |
| user=postgres | |
| if [ $# -eq 0 ]; then | |
| echo "-start|-stop" | |
| exit 0 | |
| fi | |
| case "$1" in | |
| -start) | |
| sudo -u $user pg_ctl -D /Library/PostgreSQL/13/data start | |
| exit 0 |
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) | |
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
| 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
| #!/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
| 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
| 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 |
OlderNewer