Postingan

Cara Install opencode ai

 sudo apt update && sudo apt install -y curl git ca-certificates && curl -fsSL https://opencode.ai/install | bash && echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.bashrc && export PATH="$HOME/.opencode/bin:$PATH" && opencode --version Jika menggunakan distro fedora, rh dan semisalnya cukup ganti 'apt' menjadi dnf

Cara Update Drupal Core dengan Drush

To upgrade Drupal core (say for a new security release) while running Aegir stable, this method should work, but make sure to test on a development instance before running on your production environment: 1. Become the Aegir user.     * sudo -Hsu aegir 2. Upgrade Drupal core.     * drush @hostmaster pm-updatecode drupal 3. Verify the upgraded platform.     * drush @platform_hostmaster provision-verify 4. Verify the Hostmaster site.     * drush @hostmaster provision-verify

Views konten sesuai kategori user dan konten

  Here is a slightly different approach: * Create a  user  view. * Add a contextual filter on user: uid. If no filter value is present, build a default value using the currently logged in user. (This will give you exactly one user object in your view -- the logged in user.) * Add a relationship, using the relevant taxonomy reference field on the user accounts. This will bring you information about the "interest" term for the logged in user. * Add another relationship, called "term: nodes marked with term" (or something like that). This will bring you information about all nodes marked with the interest term for the logged in user. * Either set the view to display node teasers, or select a number of fields to display. * Add a display as usual. Done! Two things to note: 1) I haven't actually done this myself, so I *might* be missing something. It should work, though. 2) "Contextual filters" are called "arguments" in previous versions of Views. ...

Menampilkan User and Flagged content

Gambar
  order by                             active                           oldest                           votes                       Up vote 0 Down vote I had the same issue where I wanted to show the title of the content flagged with a certain flag by each user. I solved it as follows: Created 2 views - 1 of users and another of content In the user view, add 'Flags: User's flaggings' relationship ( Refer attachment user_view ) In the content view, add 'Flags: Node flag' relationship and 'Flags: User uid' contextual filter ( Refer attachment content_view ) Select 'Display contents of "No results found"' for 'WHEN THE FILTER VALUE IS NOT IN THE URL' in the co...

Menampilkan author name pada views drupal

Pada tab 'Relationships' di 'Advanced' options and click 'add' Select the option 'Content: Author' and apply Now when you go to add fields you will notice several new fields, including 'User: Name' When configuring 'User: Name' make sure that the relationship field matches what was set as the identifier under the 'Relationship'. If you have only one relationship set then it should be selected automatically.

Cara menambahkan user dengan akses root dan copy ssh key root

Di debian 10 1. #adduser masmalik 2. #usermod -aG sudo masmalik 3. #mkdir /home/masmalik/.ssh 4. #touch /home/masmalik/.ssh/authorized_keys 5. #cat /root/.ssh/authorized_keys > /home/masmalik/.ssh/authorized_keys 4. #chown -R masmalik:masmalik /home/masmalik/ 5. #chown root:root /home/masmalik 6. #chmod 700 /home/masmalik/.ssh 7. #chmod 644 /home/masmalik/.ssh/authorized_keys