Postingan

Menampilkan postingan dari 2018

Pelatihan Linux 3

ip addr : cek ip kita vim /etc/httpd/conf/httpd.conf systemctl enable httpd ip addr cd /etc/sysconfig/network-scripts/ ls ifcfg-* vim ifcfg-Wired_connection_1 nmcli connection reload nmcli connection show nmcli connection up Wired\ connection\ 1 ipaddr show history : untuk lihat perintah terakhir kita systemctl restart httpd.service getenforce : cek aktif keamanan getsebool -a | grep httpd : cek untuk pengaktifan getenforce (httpd_enable_homedirs --> , httpd_read_user_content --> ) setsebool -P httpd_enable_homedirs on setsebool -P httpd_read_user_content on http://localhost/~student25/ : untuk melihat web yang di buat oleh user lain ls -ld $HOME : menampilkan dan keterangan suata file vim userdir.conf : untuk mengaktifkan public_html vim /etc/hosts : untuk membuat alias untuk di alamat web dan di redirect ke ip mkdir -p /var/www/{default,aliaswww}

Pelatihan Linux 2

touch file{1..7} : membuat file dari file 1 sampai 7 mkdir -p data1/pegawai/2018 : dengan cek parrent folder jika tidak ada langsung bikin cd ./episode : masuk dengan relatife cd /episode : dengan absolute tanpa pakai titik cd ~namauser : untuk ke home user lain, syarat nya harus ada permisions rmdir data1/pegawai/2018 data1/pegawai data1 : delete dari child ke parent ls [fF]* : buka file yang awal nya f besar atau f kecil dan ujung nya bebas ls f??e* :huruf awal f kecil, huruf ke dua bebas, huruf ke 3 bebas, huruf ke empat e, dan ke 5 bebas chmod u=rw,g=,o= fi : mengubah akses menjadi kosong semua terkecuali user (u) chgrp = merubah group chown student(nama user):student(group) /home/student/f1 : merubah akses user dan grup chown :student(group) /home/student/f1 : merubah akses grup saja ls -i z2 (z2 adalah file) : untuk melihat nomor inux dari suatu file find . -inum 350082738 -exec ls -l {} \; : mencari dengan nomor inux echo "New File" >> /home/student/z2 : membu...

Pelatihan Linux 1

Sesi console - F1 GUI - F2 - F6 console terminal : tty : cek session posisi user dimana ssh student@localhost : remote ke diri sendiri who : cek aktivitas user id : untuk cek dengan user siapa kita login echo $TERM : untuk cek layar kita(sinkron untuk clear screen) w : aktivitas secara detail kita who -u : mengeluarkan aktivitas id nya, untuk memberhentikan proses (task manajer) man man : membuka kamus per bab bertanya ke man man passwd : default bab man 5 passwd : menentukan bab man -k zip : find kamus yang berhubungan dengan kata zip updatedb : untuk mengupdate database lokal (kamus) su - mandb : sama seperti updatedb, lebih fokus cp /etc/passwd(folde yang akan di copy) pass(folder baru) : cara copy cp -i /etc/passwd(folde yang akan di copy) pass(folder baru) : cara copy dengan alert alias cp="cp -i" file : untuk membaca propertis file grep user(katauser) backup/fi(file nya) grep -i user(katauser) backup/fi(file nya) tidak mengaharaukan besar kecil grep -iv user(katauser)...

script elasticsearch : tambah hapus lihat (add delete)

elasticsearch 2.4 : - per id : http://localhost:9200/index(index)/pemda(document)/D489(id)?pretty - per document : http://localhost:9200/index/aktivitas_realisasi/_search - limit record/page : http://localhost:9200/index/aktivitas_pp/_search?from=0&size=20 - melihat semua document : http://localhost:9200/index/_mapping?pretty=true - membuat index baru : http://localhost:9200/index_test?pretty=true (method put) - hapus satu index : http://localhost:9200/index_test?pretty=true (method delete) - membuat document : http://localhost:9200/index_test_lagi/document?1pretty=true (method pos) - memeriksa satu document : http://localhost:9200/index_test_lagi/document/1?pretty=true - menghapus 1 document : http://localhost:9200/index_test_lagi/document/1=true (method delete) - insert bulk : http://localhost:9200/index_test_lagi/document/_bulk?pretty&refresh (post) - count jumlah semua index : http://localhost:9200/index_test_lagi/_count?pretty=1 - memeriksa semua ...

cara limit string dengan css (how to limit string user css)

p.test { border: 1px solid #000000; white-space: nowrap; overflow: hidden; }

work purchasing lancar

Gambar

Play Framework cara save data ke file text (how to save data on file text play framework)

save data dengan menambahkan garis baru : Writer output = new BufferedWriter( new FileWriter( "e-katalog-5/public/chat/chat-XbGjF6QV.txt" , true )) ; output.append(txtnama+ " : " +txtpesan+ " ; \n \r " ) ; output.close() ; save data ke file dengan replace data, tanpa garis baru : PrintWriter writer = new PrintWriter( "e-katalog-5/public/chat/chat-XbGjF6QV.txt" , "UTF-8" ) ; writer.println(txtnama+ " : " +txtpesan+ " \n " ) ; writer.close() ;

Play Framework Membuat pop up sederhana (create simple pop up)

<script>     window.alert(5 + 6); </script>

Play Framework Cara membuat CRUD Dasar (How to create basic CRUD)

route : # Latih GET / cms / latih cms.Latih.index GET / cms / create cms.Latih.create GET / cms / latih / edit cms.Latih.edit GET / cms / latih / delete / {id} cms.Latih.delete controller : package controllers.cms ; import controllers.BaseController ; import controllers.security. AllowAccess ; import models.cms.LatihMdl ; import models.secman.Acl ; import play.i18n.Messages ; public class Latih extends BaseController { @AllowAccess ({Acl. COM_BERITA }) public static void index () { render () ; } @AllowAccess ({Acl. COM_BERITA_ADD }) public static void create (){ render ( "cms/Latih/create.html" ) ; } public static void createSubmit (String form_nama_lengkap , String form_alamat) { LatihMdl latih = new LatihMdl() ; latih. nama_lengkap = form_nama_l...