big sur – How to setup Disk Quotas on macOS Big Sur?

You would need to install quota-tools from Homebrew and then use that to configure your disk quotas.

Install Homebrew (if you haven’t done so already)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then install quota-tools.

brew install quota-tools

Afterwards edit your /etc/fstab to enable disk quotas for the file sytem

/dev/rdisk0 /home apfs defaults,usrquota 0 2

Then run edquota to add disk quotas for the individual users:

sudo edquota -p user1 user2

After that restart the system to have the disk remounted and disk quota to take effect.

information – How to display quotas to my user without using currency?

Sorry if the tagging is bad that’s my first question here I don’t know what tag I could use.

I’m part of the development team of a GIS (geographic information system) cloud platform (https://sepal.io),. We provide to our user access to storage and supercomputer for free. To avoid that they overload the service we provide we set up a quota system that prevent a regular user to use all our resources ( because of course in the end WE pay for the AWS machines). If a advanced user require more computation we gladely increase it’s quota.

At the moment the quotas is displayed as foolowed to the user :

enter image description here

Some of our user complained that we use the $ sylbol and unit to measure quotas as it make them think that they will need to pay.

How could we display such an information without making people think that we are asking for money ?

note

We cannot move directly to “%” because the “budget d’instance” is not consumed at the same speed with respect to the size of the computer you’re using each machine will use your budget at a different speed:

enter image description here

design – How to reliably implement disk space quotas in an application?

Suppose we have a service which allows users to store files on a disk. The service should keep track of disk space used by a user and enforce a limit on the available space. Google Drive or Dropbox are obvious examples of such services.

But furthermore suppose that size is tracked recursively for all of the user’s directories. Effectively, such a service caches / pre-computes the result of du for all directories.

What are some good designs to keep track of disk usage per directory? I am especially interested in trade-offs involving atomicity and consistency.

Some ideas:

  1. Keep the directory size in a dedicated, hidden file in that directory (e.g. .__size__). When adding / subtracting bytes from a directory, modify sizes of all parent directories as well. The downside of this would be a lack of atomicity if the application fails halfway through modifying parent directory sizes.
  2. As a fix to aforementioned lack of atomicity and therefore possible inconsistencies, run a worker which traverses the directory tree, checking and fixing sizes. This would ensure eventual consistency.
  3. Emit domain events when bytes are written / deleted, e.g. to a message broker, and process those events asynchronously to update sizes. This would ensure eventual consistency, but how would we ensure atomicity or idempotence on retries when processing such events?
  4. Keep directory sizes in a relational database and update within a transaction.

Any thoughts?
3.

web development – Media storage management in chat application (quotas ?)

I’m building another of those in-browser web chat application as a side project and I’m coming to a point where I want users to be able to exchange media (picture, video and audio files) directly inside their messages.

As I build my project to be scalable, I wanted to create some API that can run in another server and will only be responsible for storing those medias file when a user post it and returning an url where the file is accessible to be able to store it the way I want. Directly on the storage api server at the begenning and then using a famous CDN.

But I want to implement some sort of restriction, to avoid users spaming the API and fill up the server. I thought about a quotas system : each user can store X amount of Mo/Go. As the users number goes up, I can have an estimation of how many space I need. Of course, I enforce a per file size limitation as I don’t want my chat to become a file exchange plateforme.

There are my question :

If a user hit the quotas limit, how to handle the “you must remove precedent medias to be able to share a new one” thing ? I thought about automaticaly removing messages after X time (something like several months as chat history is not very important for this chat application), but they still can hit the quotas in few months…

Building a “media management panel” for users seems wrong to me, as it’s counter-intuitive for the final user to have to remove previous messages in order to be able to share new ones…

How would you manage this kind of problem ? Does it makes sense to implements quotas like this or is there another way to control abuses and not become a strange file server exhange plateform ? May I handle it as snapshat does : limited lifetime medias ? But the quotas limit can, again, be hit in that time interval…

At what stage of the design process we use the instructions "How could we" and "As a user"

This may seem pretty obvious to some. I am a self-trained designer. I always try to find out and fill in my knowledge gaps.

In which phase of the design process we use.

  1. "How could we" statement
  2. Instructions as a user

To my understanding, HMWs are used to encourage creative thinking for brainstorming sessions, and user stories are used as user statements to be designed and developed.

Am I correct and where else can these be used? Of course, no design process is the same, but I'm excited to see how and where you use it.

8 – How do I render content "as is" from a custom controller

I created a custom controller that gets content from another node (the body). This content is defined in the node as raw HTML.

  public function page(Request $request): array {

    $nid = $request->attributes->get('_nid');
    $node_storage = $this->entityTypeManager()->getStorage('node');
    $node = $node_storage->load($nid);
    $content = $node->get('field_content')->value;

    // Load Entity using passed NID from key.
    $build = $content;
    // Return new Response($build);
    $render_array('snippet') = (
      '#theme' => 'webpart_snippet',
      '#content' => $build,
      '#prefix' => '
', '#suffix' => '
', ); return $render_array; }

I want to render this content as if it were a native symfony response. (e.g. correctly analyze and HTML tags and scripts)

For example, in the knot I'm in, I have

This is text

and that's exactly what the site shows

It should be

I have defined a custom theme and a branch template

/**
 * Implements hook_theme().
 * Declare a new theme
 */
function custom_webpart_snippet_theme() {
  return (
    'webpart_snippet' => (
      'variables' => (
        'content' => '',
      ),
    ),
  );
}

migration – Getting Error: "You must declare" ids "as a unique array of fields in your source settings." while trying to migrate for sales in Drupal 8

I created a yml configuration for migrating CSV sources to Drupal with Composer. After running the "drush migrate: import mbe_book_paragharphsenter code hereMsgstr "" "I am getting the error message because you have to declare" ids "as a unique field array in your source settings.

I am using migrate_source_csv 8.x-3.1

id: mbe_book_paragharphs

migration_group: mbe_migrations
Name: & # 39; Import book paragraph & # 39;
Source:
Plugin: csv
Path: & # 39; /var/www/html/drupal/author.csv'
Separator: & # 39;, & # 39;
Enclosure: & # 39; "& # 39;
header_row_count: 1
ids: https://drupal.stackexchange.com/q/290630
Process:
field_mbe_title: title
field_mbe_author: author
Aim:
Plugin: & # 39; entity_reference_revisions: paragraph & # 39;
default_bundle: mbe_book
migration_dependencies: null

I need help solving this problem

configurable product – How can I remove "As low as" in Magento 2.3.1 if all prices of the variants are the same?

How can I remove "as low as" if all prices of the configurable product variants are the same? It makes no sense for me to show "as low as" when all colors and sizes are equally expensive. I have some products that have different prices for the sizes, so they are absolutely correct with the addition "as low as". Simply the ability to turn it off with display at all: None is not my goal. Help appreciated!