foreach ($package in $(dotnet tool list --global | Select-Object -Skip 2)) {
Write-Host "dotnet tool update --global $($package.Split(" ", 2)[0])"
dotnet tool update --global $($package.Split(" ", 2)[0])
}
This file contains 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 os | |
import pathlib | |
import subprocess | |
def create_symbolic_link(link_path, target_path, is_directory=False): | |
cmd = ['mklink'] | |
if is_directory: | |
cmd.append('/D') | |
cmd.extend([link_path, target_path]) | |
flags = subprocess.CREATE_NEW_CONSOLE | subprocess.CREATE_NO_WINDOW |
This file contains 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
param ( | |
[Parameter(Mandatory=$true)][string]$BaseDir | |
) | |
# remove end Directory Separator Char | |
$BaseDir = $BaseDir.Trim('"', "'").TrimEnd([IO.Path]::DirectorySeparatorChar) | |
Write-Host "BaseDir: [${BaseDir}]" | |
Set-Location -Path $BaseDir | |
$ApiUrl = 'https://api.github.com/repos/blueloveTH/pocketpy/releases' |
This file contains 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
package main | |
import ( | |
"fmt" | |
"html/template" | |
"os" | |
) | |
func main() { | |
const parentTemplate = ` |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
This file contains 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
# -*- coding: utf-8 -*- | |
''' | |
convert bitmat to ico | |
ref: https://stackoverflow.com/questions/45507/is-there-a-python-library-for-generating-ico-files/62374154#62374154 | |
''' | |
import pathlib | |
from PIL import Image |
This file contains 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
# append to ~/.bashrc | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="${PS1:0:-1}\[\033[33m\]\$(parse_git_branch)\[\033[00m\] " |
This file contains 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 base64 | |
from io import BytesIO | |
from PIL import Image | |
def smallest_png_base64(): | |
with Image.new('RGBA', (1, 1), (0, 0, 0, 0)) as img: | |
with BytesIO() as buffer: | |
img.save(buffer, format='PNG') |
This file contains 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
# -*- coding: utf-8 -*- | |
# sudo apt-get install python3-tk python3-dev | |
# pip install pyautogui | |
import time | |
import pyautogui | |
print('自动移动鼠标,避免锁屏') | |
print('按 [Ctrl + C] 退出') | |
print('-' * 60) | |
screenWidth, screenHeight = pyautogui.size() |
This file contains 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
package main | |
import ( | |
"encoding/base64" | |
"net/http" | |
"net/http/httputil" | |
"github.com/astaxie/beego" | |
"github.com/astaxie/beego/context" | |
) |
NewerOlder