全部 新建

user:thomas 由使用者建立的 Gists

title:mygist Gists 的標題

description:sync gists with given description

filename:myfile.txt Gists 的檔案名稱

extension:yml Gists 的副檔名

language:go Gists 的程式語言

topic:homelab gists with given topic

all:systemctl search all fields

註冊

登錄

全部 新建 註冊 登錄

所有 Gists

倒序排序 創建
順序排序 創建
倒序排序 更新
順序排序 更新
rootiest's Avatar

rootiest / bash-script-hygeine.md

0 喜歡
0 分支
1 檔案
最後活躍 1 day ago

Bash Scripting Basic Hygiene Checklist

Task Recommendation Why?
The Shebang #!/usr/bin/env bash Maximum portability across different Unix-like systems.
Error Handling set -euo pipefail Ensures the script stops at the first sign of trouble.
Quoting "$VARIABLE" Prevents word splitting and globbing (essential for paths).
Variable Style local_var="value" Lowercase prevents overwriting system-wide environment variables.
Boilerplate readonly CONSTANT Prevents accidental modification of fixed values.
Extensions .sh or none Helps with syntax highlighting and identifying file types.
rootiest's Avatar

rootiest / hello-world.cpp

0 喜歡
0 分支
1 檔案
最後活躍 1 day ago
1 #include <iostream>
2 #include <string>
3 using namespace std;
4
5 int main() {
6 string name;
7 cout << "\nWhat is your name (first and last)? ";
8 getline(cin, name);
9 cout << "\nHello, " << name << endl;
10 return 0;
上一頁 下一頁

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

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