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/zsh | |
| tmux_session_exists() { | |
| local session_name="$1" | |
| [[ -z "$session_name" ]] && return 1 | |
| tmux has-session -t "$session_name" 2> /dev/null | |
| } |
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/zsh | |
| defaults write com.apple.dock autohide-delay -float 0 | |
| defaults write com.apple.dock autohide-time-modifier -float 0 | |
| killall Dock |
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
| Get-ChildItem -Path . -Recurse -File -Force -Filter '.DS_Store' | ForEach-Object { | |
| Write-Output $_.FullName | |
| Remove-Item -LiteralPath $_.FullName -Force | |
| } |
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
| #include <string> | |
| #include <array> | |
| #include <sstream> | |
| #include <memory> | |
| #include <cstdio> | |
| #include <stdexcept> | |
| #include <iostream> | |
| auto execute_command = [](const std::string &command) -> std::string | |
| { |
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/zsh | |
| # ANSI color codes | |
| GREEN='\033[0;32m' | |
| RED='\033[0;31m' | |
| NC='\033[0m' # No Color | |
| for directory in */; do | |
| directory="${directory%/}" | |
| echo -n "Stowing $directory ... " |
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/bin/env python3 | |
| import os | |
| import sys | |
| def find_toml_files() -> list[str]: | |
| def find_toml_files_recursively(directory_path: str, found_toml_files: list[str]) -> None: | |
| def get_directory_entries(directory_path: str) -> list[str]: | |
| return list(map(lambda entry: os.path.join(directory_path, entry), |
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
| #include <iostream> | |
| void printArgs(const int argc, const char *argv[]) | |
| { | |
| std::cout << "argc: " << argc << "\n\n" | |
| << "argv:\n"; | |
| for (unsigned int i{}; i < static_cast<unsigned int>(argc); ++i) | |
| std::cout << "- " << argv[i] << '\n'; | |
| } |
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
| class Program | |
| { | |
| private static void PrintArgs(string[] args) | |
| { | |
| Console.WriteLine("argc: " + args.Length); | |
| if (args.Length > 0) | |
| { | |
| Console.WriteLine("\nargs:"); | |
| Console.WriteLine("- " + string.Join("\n- ", args)); | |
| } |
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/zsh | |
| OUTPUT='#!/bin/zsh\n\n# TODO' | |
| FILENAME='empty_script.sh' | |
| if [ $# -ne 0 ]; then | |
| if [[ "$*" == *.* ]]; then | |
| FILENAME="$*" | |
| else | |
| FILENAME="$*.sh" |
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
| root = true | |
| [*] | |
| indent_style = space | |
| indent_size = 2 | |
| end_of_line = lf | |
| charset = utf-8 | |
| trim_trailing_whitespace = true | |
| insert_final_newline = true |
NewerOlder