全部 新建

user:thomas 由使用者建立的 Gists

title:mygist Gists 的標題

filename:myfile.txt Gists 的檔案名稱

extension:yml Gists 的副檔名

language:go Gists 的程式語言

登錄


全部 新建 登錄
's Avatar

airikr

加入 1714036833

倒序排序 創建
順序排序 創建
倒序排序 更新
順序排序 更新
所有 Gists 12
airikr's Avatar

airikr / Useful bash scripts

0 喜歡
0 分支
1 檔案
最後活躍 1741877163
These are my number one bash scripts. I can't live without them.
1 alias install_no="sudo pacman -Sy"
2 alias install_ya="yay -S --noconfirm"
3 alias backupvps="rsync -avhzr --delete --progress --rsh='ssh -p22' user@ip:/ --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/swapfile","/boot/*"} /to/dir/"
4
5
6 # Compress a video with CUDA acceleration (GPU from NVIDIA is required)
7 function reducevideo {
8 ffmpeg -hwaccel cuda -i "$1" -c:v libx265 -vtag hvc1 -c:a copy "$2"
9 }
airikr's Avatar

airikr / age

0 喜歡
0 分支
1 檔案
最後活躍 1714041313
Calculate the age of someone or something.
1 <?php
2
3 # Add the time for a more accurate calculation.
4 # The time format must be a string if it begins with a zero (0)
5
6 function age($year, $month, $day, $time = null) {
7 if(!is_numeric($year) OR !is_numeric($month) OR !is_numeric($day)) {
8 return 'XX';
9
10 } else {
上一頁 下一頁

由 Opengist 提供支持 ⋅ Load: 41ms⋅

繁體中文
Čeština Deutsch English Español Français Magyar Italiano Português Русский Türkçe Українська 中文 繁體中文