Skip to content

Instantly share code, notes, and snippets.

View Iamanaws's full-sized avatar
🎯
Focusing

Angel J Iamanaws

🎯
Focusing
View GitHub Profile
# prompt
if test -f ~/.config/git/git-prompt.sh
then
. ~/.config/git/git-prompt.sh
else
PS1='\[\033]0;Git Bash:$PWD\007\]' # set window title
PS1="$PS1"'\n\[\033[1;34m\]\w' # \n\[\033[32m\]\u\[\033[35m\]plays \[\033[1;36m\]\w'
if test -z "$WINELOADERNOEXEC"
then
GIT_EXEC_PATH="$(git --exec-path 2>/dev/null)"
@Iamanaws
Iamanaws / Schemas.json
Created November 12, 2021 16:53
Windows Terminal Schemas
{
//One Dark
"background": "#1E2127",
"black": "#000000",
"blue": "#61AFEF",
"brightBlack": "#5C6370",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
# prompt
PS1='\n\[\033[01;34m\]\w\[\033[00m\] \n\$ ' # \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] \n\$ '
# ${PWD#"${PWD%/*/*}/"}
PROMPT_DIRTRIM=2
@justjanne
justjanne / Price Breakdown.md
Last active April 5, 2025 08:10 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
@wojteklu
wojteklu / clean_code.md
Last active May 6, 2025 14:21
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@sivel
sivel / better-ssh-authorized-keys-management.md
Last active April 10, 2025 03:40
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@nhibberd
nhibberd / gist:9d78576aab943cdb0f6c
Created June 23, 2014 00:41
Zsh case insensitivity auto complete
## case-insensitive (uppercase from lowercase) completion
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
## case-insensitive (all) completion
#zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
## case-insensitive,partial-word and then substring completion
#zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'