varsock

joined 1 year ago
MODERATOR OF
[–] varsock 2 points 1 year ago

Youre right, The 2 port vaults are $176 which is almost double your budget. I figured you could find a used one for cheaper, but I just looked around and you cannot :(

You can check out ODROID. The ARM version for $83 and a x86 version for $129. You can play around with specs and models and get those numbers down lower. Pretty large community playing with them, BSD probably can support them or at least the info is most likely in a forum somewhere.

[–] varsock 24 points 1 year ago (5 children)

A step in the right direction but until there are more robust privacy laws in place, this will not go away.

If their gov is restricted on buying from data brokers, are other governments, foreign entities?

The inherit issue is the American's data can be harvested and sold. Setting up legal restrictions toward certain entities will just cause those entities to "legally self identify" as another entity. Or do business with an entity that is allowed access to American's data.

[–] varsock 9 points 1 year ago* (last edited 1 year ago)

i take a Phoenix approach with my dotfiles.

Once a decade when my computer crashes and burns, from the ashes emerges a blank slate of dotfiles that is purged of all unnecessary hacks that have accumulated. With a tear and a hopeful outlook, I rush to set the settings I am actually dependent on.

I really need to take more interest in backing up my dotfiles 😭

[–] varsock 1 points 1 year ago (2 children)

check out Protectli Vault. They have different hardware configuration options depending on what you need.

Protectli supports virtually anything you want to slap on it, be it BSD or Linux based. A popular approach is to put Opensense on it (BSD based firewall).

I can vouch for it, quality hardware and silent. Easy to repurposed.

[–] varsock 1 points 1 year ago* (last edited 1 year ago)

I posted interpretations to the remaining ones. I did not have time to massage the prompts or verify the answers. I assume you know what they do and can comment on the accuracy. I am rate limited and had to use a lower tier model, As free up more queries I can re-do some or have it expand on what it's purpose and usefulness might be.

[–] varsock 1 points 1 year ago (1 children)

set -- "${@[0,eoo]:/(#m)^-*/${MATCH:a}}" "${@[eoo+1,-1]:a}"

spoiler

The given script appears to be written in the Zsh shell syntax. Let's break it down step by step:

  1. set --: This command sets the positional parameters of the script. In Zsh, the -- option is used to signify the end of options and the beginning of positional parameters.

  2. "${@[0,eoo]:/(#m)^-*/${MATCH:a}}": This part refers to the expansion of the positional parameters, specifically targeting the elements from index 0 to the end of options offset (eoo). Here's what the individual components mean:

    • ${@[0,eoo]}: This refers to a sub-array of positional parameters from index 0 to eoo. It extracts the elements corresponding to command-line options.
    • /(#m)^-*: This is a pattern match within a substitution. It matches any occurrences of hyphens (-) at the beginning of each element. The (#m) flag enables multiline mode for pattern matching.
    • ${MATCH:a}: This is the replacement part of the substitution. It expands the matched pattern (${MATCH}) and applies the :a modifier, which removes leading hyphens from the matched string.

    In summary, this part removes leading hyphens from the command-line options.

  3. "${@[eoo+1,-1]:a}": This part refers to the expansion of the positional parameters, specifically targeting the elements from the end of options offset (eoo + 1) to the last element. Here's what the individual components mean:

    • ${@[eoo+1,-1]}: This refers to a sub-array of positional parameters from the end of options offset (eoo + 1) to the last element. It extracts the arguments that come after the command-line options.
    • :a: This applies the :a modifier, which removes leading hyphens from each element.

    In summary, this part removes leading hyphens from the command-line arguments that come after the options.

Overall, the script modifies the command-line options and arguments by removing leading hyphens. The modified values are then set as the new positional parameters using the set command. The exact purpose or context of the script can only be determined by understanding its broader context and usage.

[–] varsock 1 points 1 year ago (1 children)

[ "${(Oa@)argv[1,-2]}" "${argv[-1]//(#m)[[]]/${(#)$((6 ^ #MATCH))}}" # this one is definitely not useful

spoiler

The given shell script appears to be written in the Zsh shell syntax. Let's break it down step by step:

  1. [ "${(Oa@)argv[1,-2]}" "${argv[-1]//(#m)[\[\]]/${(#)$((6 ^ #MATCH))}}" ]: This line encloses the entire script within square brackets [ ]. In Zsh, square brackets are commonly used for conditional expressions.

  2. "${(Oa@)argv[1,-2]}": This part refers to an expansion of the argv array, which typically holds command-line arguments passed to the script. Here's what the individual components mean:

    • ${(Oa@)}: This is a parameter expansion flag in Zsh that sorts the elements of the array in ascending order and expands each element as separate words. The @ symbol is used to indicate the array variable argv.
    • argv[1,-2]: This is array slicing syntax that extracts a sub-array of elements from index 1 to the second-to-last element (-2). It excludes the last element, which is assumed to be the final argument.

    In summary, this part expands and sorts the elements of the argv array, excluding the last argument.

  3. "${argv[-1]//(#m)[\[\]]/${(#)$((6 ^ #MATCH))}}": This part refers to another expansion of the argv array, specifically targeting the last element (argv[-1]). Here's what the individual components mean:

    • "${argv[-1]//pattern/replacement}": This is a parameter expansion that performs pattern substitution within the last element of the argv array.
    • (#m): This is an extended globbing flag in Zsh that enables multiline mode for pattern matching. It allows patterns to match across multiple lines.
    • [\[\]]: This is the pattern to match. It matches any occurrence of square brackets ([ or ]).
    • /${(#)$((6 ^ #MATCH))}}: This is the replacement part of the substitution. It calculates the bitwise XOR (^) of 6 and the matched pattern (#MATCH), and uses (()) to perform arithmetic expansion. The (#) flag is used to indicate that the result should be expanded.

    In summary, this part performs a substitution on the last element of the argv array, replacing any occurrence of square brackets with the result of a bitwise XOR operation between 6 and the matched pattern.

Overall, the script appears to process command-line arguments, sort and manipulate them, and then enclose the result in a conditional expression for further evaluation or use. The exact purpose or context of the script can only be determined by understanding its broader context and usage.

[–] varsock 1 points 1 year ago (1 children)

print -rn $termcap[sc]${termcap[ch]//(%i|%p1|%d)}$termcap[ct]${(j::)s}$termcap[rc]

spoilerThe given shell script appears to be written in Zsh, a popular Unix shell. Let's break down the script step by step:

  1. print -rn: This command is used to print the output without a newline character (-n) and without interpreting any escape sequences (-r).

  2. $termcap[sc]: It refers to a termcap variable sc, which stands for "save cursor position." Termcap is a database and library used to control the behavior of terminals. $termcap[sc] saves the current cursor position.

  3. ${termcap[ch]//(\%i|\%p1|\%d)}: This part performs a substitution on the value of the termcap variable ch. The double slashes (//) indicate a global substitution, and the pattern (\%i|\%p1|\%d) matches any of the three percent sequences: %i, %p1, or %d. It replaces all occurrences of these sequences with an empty string.

  4. $termcap[ct]: It refers to the termcap variable ct, which stands for "clear to end of line." It clears everything from the cursor position to the end of the current line.

  5. ${(j::)s}: This uses parameter expansion to join the array variable s using colons (:) as separators. The (j::) flag indicates that colons should be used as separators.

  6. $termcap[rc]: It refers to the termcap variable rc, which stands for "restore cursor position." It restores the saved cursor position.

In summary, this shell script saves the cursor position, performs a substitution on the value of ch termcap variable, clears the current line from the cursor position to the end, prints the value of array variable s joined by colons, and finally restores the cursor position. The purpose and context of this script can only be determined based on the larger context or the values of the termcap variables sc, ch, ct, s, and rc.

[–] varsock 1 points 1 year ago (1 children)

local d=("${(@s[/])${(%):-%~}}")

spoilerThe given shell script is written in the Zsh shell syntax. It initializes a local array variable d with the expansion of a string. Let's break it down step by step:

  1. local d=: This line declares a local variable d. The local keyword is used to define variables with local scope, meaning they are only accessible within the current scope, such as within a function or a block of code.

  2. "${(%):-%~}": This part of the script performs string expansion and substitution to populate the array d.

    • %~ is a special parameter expansion in Zsh that expands to the current working directory (tilde expansion).

    • (%): is another parameter expansion flag that performs splitting and globbing on the value obtained from %~. It splits the resulting string into separate elements based on the / delimiter and performs globbing (filename expansion) on each element.

      For example, if the current working directory is /path/to/some/directory, then %~ expands to /path/to/some/directory, and (%): splits it into individual components: path, to, some, and directory. If there are any glob patterns present, such as * or ?, they would be expanded as well.

  3. ("${(@s[/])${(%):-%~}}"): This part surrounds the expanded string with parentheses to create an array and stores it in the variable d. The (@s[/]) syntax is an array flag in Zsh that splits the resulting string into separate elements based on the / delimiter. Each element represents a directory component obtained from the %~ expansion.

In summary, this script initializes the local array variable d with the directories present in the current working directory's path. Each directory is stored as a separate element in the array d.

[–] varsock 1 points 1 year ago (1 children)

typeset -a $1=("${(@ps[$2])"${2:-"$(<&0)"}"}")

spoilerSo, overall, this script reads input from $2 or stdin if $2 is not provided, splits it into an array based on the delimiter $2, and then assigns the array to the variable named $1. Note that this script only works in Zsh, not in Bash. Zsh has a more advanced parameter and array system than Bash, so this script can't be directly translated into Bash.

  1. typeset -a: This part declares an array variable.
    • -a flag specifies that the variable is an array.
  2. $1=("${(@ps[$2])"${2:-"$(<&0)"}"}"):
    • $1 refers to the first argument passed to the script.
    • "${2:-"$(<&0)"}" is an expansion that evaluates to the second argument passed to the script. If the second argument is not provided, it reads input from standard input (<&0 means read from stdin).
    • "${(@ps[$2])" is an expansion that performs parameter splitting.
    • @ specifies that the expansion should be split into separate array elements.
    • (ps[$2]) is a parameter expansion that performs word splitting on the second argument.
  3. The entire expression "${(@ps[$2])"${2:-"$(<&0)"}"}" is wrapped in parentheses and assigned to the variable specified by $1.

In summary, this script takes two arguments: $1 represents the name of the array variable, and $2 represents the values to be assigned to that array. It then assigns the array $2 to the variable named by $1 after performing parameter and word splitting on the second argument. If the second argument is not provided, it reads input from standard input.

[–] varsock 2 points 1 year ago

check out Kodi and Plasma Bigscreen. I am eager to set up plasma bigscreen bc it can work with KDE connect.

[–] varsock 2 points 1 year ago
view more: ‹ prev next ›