Selasa, 27 September 2022

DRAWIO-linux docker



https://git.ecdf.ed.ac.uk/jcumby/drawio/-/tree/v13.5.5/etc/docker

12.1.4 release
David Benson [draw.io] authored 
d42ae42d
NameLast commitLast update
..
drawio-export11.3.1 release
Dockerfile9.0.2 release
README.md12.1.4 release

Our collection of docker images and docker-compose files are in jgraph/docker-drawio repository

In that repository:

  • draw.io docker image that is always up-to-date with draw.io releases
  • draw.io export server image which allow exporting draw.io diagrams to pdf and images
  • docker-compose to run draw.io with the export server
  • docker-compose to run draw.io integrated within nextcloud
  • docker-compose to run draw.io with PlantUML support
  • docker-compose to run draw.io self-contained without any dependency on draw.io website (with the export server, plantUml, Google Drive support, OneDrive support, and EMF conversion support (for VSDX export)

HTTPS SSL Certificate via Let's Encrypt

Prerequisites:

  1. A Linux machine connected to the Internet with ports 443 and 80 open
  2. A domain/subdomain name pointing to this machine's IP address. (e.g., drawio.example.com)

Method:

  1. Using jgraph/drawio docker image, run the following command docker run -it -m1g -e LETS_ENCRYPT_ENABLED=true -e PUBLIC_DNS=drawio.example.com --rm --name="draw" -p 80:80 -p 443:8443 jgraph/drawio Notice that mapping port 80 to container's port 80 allows certbot to work in stand-alone mode. Mapping port 443 to container's port 8443 allows the container tomcat to serve https requests directly.

Changing draw.io configuration

Method 1 (Build you custom image with setting pre-loaded)

  1. Edit PreConfig.js & PostConfig.js files (next to Dockerfile in debian or alpine folders)
  2. Build the docker image

Method 2 (Using existing running docker container)

  1. Edit PreConfig.js & PostConfig.js files (next to Dockerfile in debian or alpine folders)
  2. Copy these files to docker container
docker cp PreConfig.js draw:/usr/local/tomcat/webapps/draw/js/
docker cp PostConfig.js draw:/usr/local/tomcat/webapps/draw/js/

Method 3 (Bind configuration files into the container when started)

  1. This method allows changing the configuration files directly on the host without invoking any other docker commands. It can be used for testing
  2. Edit PreConfig.js & PostConfig.js files (next to Dockerfile in debian or alpine folders)
  3. From within the directory that contained the configuration files, run the following command to start docker container
  4. Note: self-contained docker-compose file already mount the configuration files into the container
docker run -it  --rm --name="draw" --mount type=bind,source="$(pwd)"/PreConfig.js,target=/usr/local/tomcat/webapps/draw/js/PreConfig.js --mount type=bind,source="$(pwd)"/PostConfig.js,target=/usr/local/tomcat/webapps/draw/js/PostConfig.js -p 8080:8080 -p 8443:8443 fjudith/draw.io

====================================================

https://hub.docker.com/r/jonberenguer/draw.io

https://www.youtube.com/watch?v=QvYZO0h1j20 

draw.io is an online diagramming web site that delivers the source in this project.

draw.io uses the mxGraph library as the base of the stack, with the GraphEditor example from mxGraph as the base of the application part. The mxGraph library build used is stored under /etc/mxgraph/mxClient.js.

License

draw.io is licensed under the GPL v3.

Development

A development guide is being started on the GitHub project wiki. There is a draw.io tag on Stack Overflow currently, please make sure any questions adhere to their guidelines for question.

The mxGraph documentation provides a lot of the docs for the bottom part of the stack. There is an mxgraph tag on SO.

Docker

docker pull jonberenguer/draw.io
docker run -p 8080:80 -d jonberenguer/draw.io

Go to: http://localhost:8080/draw.io/war/index.html?offline=1

Note: offline=1 is to run draw.io offline without any cloud storage support.

Running

The simplest way to run draw.io initially is to fork this project, publish the master branch to GitHub pages and the pages sites will have the full editor functionality (sans the integrations).

Supported Browsers

draw.io supports IE 9+, Chrome 30+, Firefox 31+, Safari versions actively patched by Apple (6.2.x, 7.1.x, 8.0.x and 9.x at time of writing), Opera 20+, Native Android browser 5.x+, the default browser in the current and previous major iOS versions (e.g. 9.x and 8.x) and Edge 20+

Senin, 26 September 2022

UBUNTU 22.04-resize partisi

dbsa@dbsa-X406UA:~$ ssh -v -oHostKeyAlgorithms=+ssh-rsa root@172.16.30.97
OpenSSH_8.9p1 Ubuntu-3, OpenSSL 3.0.2 15 Mar 2022
root@ubuntu:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              796M  1.2M  794M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   97G  6.6G   86G   8% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  126M  1.7G   7% /boot
tmpfs                              796M  4.0K  796M   1% /run/user/0
root@ubuntu:~# lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop0                       7:0    0   62M  1 loop /snap/core20/1587
loop1                       7:1    0 79.9M  1 loop /snap/lxd/22923
loop2                       7:2    0   47M  1 loop /snap/snapd/16292
sda                         8:0    0  200G  0 disk  
├─sda1                      8:1    0    1M  0 part  
├─sda2                      8:2    0    2G  0 part /boot
└─sda3                      8:3    0  198G  0 part  
 └─ubuntu--vg-ubuntu--lv 253:0    0   99G  0 lvm  /
sr0                        11:0    1 1024M  0 rom   
root@ubuntu:~# lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
 Size of logical volume ubuntu-vg/ubuntu-lv changed from <99.00 GiB (25343 extents) to <198.00 GiB (50687 extents).
 Logical volume ubuntu-vg/ubuntu-lv successfully resized.
root@ubuntu:~# resize2fs /dev/ubuntu-vg/ubuntu-lv
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required
old_desc_blocks = 13, new_desc_blocks = 25
The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 51903488 (4k) blocks long.

root@ubuntu:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              796M  1.2M  794M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  195G  6.6G  179G   4% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
/dev/sda2                          2.0G  126M  1.7G   7% /boot
tmpfs                              796M  4.0K  796M   1% /run/user/0
root@ubuntu:~#

 

===============================

Menambah Ukuran Partisi LVM di Ubuntu Server

Rabu, 19 Agustus 2020

Menambah Ukuran Partisi LVM di Ubuntu Server. Ketika saya melakukan instalasi Ubuntu Server dengan mode guided partitioning with LVM, ternyata ukuran partisi sistemnya nya hanya sekitar seperempat dari total kapasitas hardisk yang tersedia. Nah, di artikel ini saya akan sharing bagaimana cara menambah ukuran partisi di sistem, yang dalam kasus ini saya akan menggunakan seluruh sisa kapasitas yang belum terpakai.


Jika kalian tidak mengubah pengaturan default saat instalasi, nama logical group dan logical volumenya harusnya sama dengan screenshot diatas.

Untuk meresize partisi LVM di Ubuntu Server jalankan perintah
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
resize2fs /dev/ubuntu-vg/ubuntu-lv
Sekarang cek lagi partisi sistem di Ubuntu kalian, harusnya sudah bertambah.

Oke itu saja artikel kali ini.

Rabu, 21 September 2022

LARAVEL-dashboard

 

   CARA MENGGABUNGKAN TEMPLATE LAIN (ADMINLTE) KE LARAVEL 5


https://gilacoding.com/read/cara-menggabungkan-template-lain-adminlte-ke-laravel-5

Cara Menggabungkan Template lain (adminlte) ke Laravel 5

Halo sobat gilacoding,

Kali ini saya hadir dengan 2 versi, yaitu web dan youtube dan saya membuat judul ini sesuai dengan request sobat – sobat di email saya jadi jika ada yang mau request apa saja bisa email ya, saya list kan dulu ke daftar tutor yang akan dibuat.

Youtube gilacoding : https://youtu.be/czzMreU0NSk

Saya berbagi pengalaman saya biasanya saja, jika ada terdapat kesalahan kalian bisa komentar nanti saya akan revisi karena kita masih sama – sama belajar juga hehe

Mungkin masih pada bingung kalau di PHP biasa langsung deh ganti di html ke php untuk memanggil template – template nya, tetapi di Laravel lumayan berbeda. Kita harus menaruh file pendukung dari template tersebut dulu ke dalam folder publicnya Laravel misal nya JS dan CSS nya si template.

Okay cara ini bisa untuk kalian gunakan di semua versi Laravel 5++ (sekarang saya pakai Laravel 5.7) dan semua template juga, untuk list template yang sudah saya coba :

Harap dibaca dan jangan di skip baca nya ya, nanti kelewatan bisa bikin pusing lo.

Pertama, Install Laravel dulu seperti biasa :

  • Buat yang belum tau cara install bisa klik disini.

Cari template nya (saya pakai adminLTE) :

Setelah itu, Copy File yang diperlukan oleh template nya

  • Disini yang diperlukan yaitu bower_components dan folder dist
  • Taroh di folder public laravel boleh langsung paste atau buat foder baru lagi
  • Kalau saya buat folder baru lagi dengan nama adminlte

Buka file index.html si template tersebut , karena disini terdapat beberapa bagian jadi kita pisah aja biar lebih mudah custom nya nanti sob (pengalaman loh ini). Jadi bagian – bagian nya yaitu :

  • Header
  • Sidebar
  • Content
  • Footer

Biar enak aja nanti kalau ngerjain nya, ubah khusus sidebar ya di layout sidebar aja, ubah header ya di layout header. Coba aja nanti kalian akan merasakan nya kalau kerja bikin program tiap hari sob hehe

Okay lanjuut, saya pecah dulu ini bagian dari header.blade.php

<header class="main-header">
    <!-- Logo -->
    <a href="index2.html" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>A</b>LT</span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>GILACODING</b></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- User Account: style can be found in dropdown.less -->
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <img src="{{url('adminlte/dist/img/user2-160x160.jpg')}}" class="user-image" alt="User Image">
              <span class="hidden-xs">Alexander Pierce</span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
                <img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">

                <p>
                  Alexander Pierce - Web Developer
                  <small>Member since Nov. 2012</small>
                </p>
              </li>
              <!-- Menu Body -->
              <li class="user-body">
                <div class="row">
                  <div class="col-xs-4 text-center">
                    <a href="#">Followers</a>
                  </div>
                  <div class="col-xs-4 text-center">
                    <a href="#">Sales</a>
                  </div>
                  <div class="col-xs-4 text-center">
                    <a href="#">Friends</a>
                  </div>
                </div>
                <!-- /.row -->
              </li>
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-left">
                  <a href="#" class="btn btn-default btn-flat">Profile</a>
                </div>
                <div class="pull-right">
                  <a href="#" class="btn btn-default btn-flat">Sign out</a>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
  </header>
  

Simpan di Resources > View > layouts (ini folder baru) beri nama header.blade.php

 

Bagian sidebar.blade.php

<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- Sidebar user panel -->
      <div class="user-panel">
        <div class="pull-left image">
          <img src="{{url('adminlte/dist/img/user2-160x160.jpg')}}" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
          <p>Gilacoding</p>
          <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
        </div>
      </div>
      <!-- search form -->
      <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="Search...">
          <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
        </div>
      </form>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="header">MAIN NAVIGATION</li>
        <li class="active treeview">
          <a href="#">
            <i class="fa fa-dashboard"></i> <span>Dashboard</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li class="active"><a href="index.html"><i class="fa fa-circle-o"></i> Dashboard v1</a></li>
            <li><a href="index2.html"><i class="fa fa-circle-o"></i> Dashboard v2</a></li>
          </ul>
        </li>
        <li class="treeview">
          <a href="#">
            <i class="fa fa-files-o"></i>
            <span>Layout Options</span>
            <span class="pull-right-container">
              <span class="label label-primary pull-right">4</span>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="pages/layout/top-nav.html"><i class="fa fa-circle-o"></i> Top Navigation</a></li>
            <li><a href="pages/layout/boxed.html"><i class="fa fa-circle-o"></i> Boxed</a></li>
            <li><a href="pages/layout/fixed.html"><i class="fa fa-circle-o"></i> Fixed</a></li>
            <li><a href="pages/layout/collapsed-sidebar.html"><i class="fa fa-circle-o"></i> Collapsed Sidebar</a></li>
          </ul>
        </li>
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

 

Bagian footer.blade.php

  <footer class="main-footer">
    <div class="pull-right hidden-xs">
      <b>Version</b> 2.4.0
    </div>
    <strong>Copyright &copy; 2014-2016 <a href="https://adminlte.io">Gilacoding</a>.</strong> All rights
    reserved.
  </footer>

Bagian index.html tadi sisa ini :

 

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Dashboard</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/bootstrap/dist/css/bootstrap.min.css')}}">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/font-awesome/css/font-awesome.min.css')}}">
  <!-- Ionicons -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/Ionicons/css/ionicons.min.css')}}">
  <!-- Theme style -->
  <link rel="stylesheet" href="{{url('adminlte/dist/css/AdminLTE.min.css')}}">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="{{url('adminlte/dist/css/skins/_all-skins.min.css')}}">
  <!-- Morris chart -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/morris.js/morris.css')}}">
  <!-- jvectormap -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/jvectormap/jquery-jvectormap.css')}}">
  <!-- Date Picker -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css')}}">
  <!-- Daterange picker -->
  <link rel="stylesheet" href="{{url('adminlte/bower_components/bootstrap-daterangepicker/daterangepicker.css')}}">
  <!-- bootstrap wysihtml5 - text editor -->
  <link rel="stylesheet" href="{{url('adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}">

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
  @section('css')
  @show
  <!-- Google Font -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
  @include('layouts.header')


  @include('layouts.sidebar')

  <div class="content-wrapper">
      @yield('content')
  </div>

@include('layouts.footer')
</div>
<!-- ./wrapper -->

<!-- jQuery 3 -->
<script src="{{url('adminlte/bower_components/jquery/dist/jquery.min.js')}}"></script>
<!-- jQuery UI 1.11.4 -->
<script src="{{url('adminlte/bower_components/jquery-ui/jquery-ui.min.js')}}"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.7 -->
<script src="{{url('adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js')}}"></script>
<!-- Morris.js charts -->
<script src="{{url('adminlte/bower_components/raphael/raphael.min.js')}}"></script>
<script src="{{url('adminlte/bower_components/morris.js/morris.min.js')}}"></script>
<!-- Sparkline -->
<script src="{{url('adminlte/bower_components/jquery-sparkline/dist/jquery.sparkline.min.js')}}"></script>
<!-- jvectormap -->
<script src="{{url('adminlte/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js')}}"></script>
<script src="{{url('adminlte/plugins/jvectormap/jquery-jvectormap-world-mill-en.js')}}"></script>
<!-- jQuery Knob Chart -->
<script src="{{url('adminlte/bower_components/jquery-knob/dist/jquery.knob.min.js')}}"></script>
<!-- daterangepicker -->
<script src="{{url('adminlte/bower_components/moment/min/moment.min.js')}}"></script>
<script src="{{url('adminlte/bower_components/bootstrap-daterangepicker/daterangepicker.js')}}"></script>
<!-- datepicker -->
<script src="{{url('adminlte/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js')}}"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="{{url('adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>
<!-- Slimscroll -->
<script src="{{url('adminlte/bower_components/jquery-slimscroll/jquery.slimscroll.min.js')}}"></script>
<!-- FastClick -->
<script src="{{url('adminlte/bower_components/fastclick/lib/fastclick.js')}}"></script>
<!-- AdminLTE App -->
<script src="{{url('adminlte/dist/js/adminlte.min.js')}}"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="{{url('adminlte/dist/js/pages/dashboard.js')}}"></script>
<!-- AdminLTE for demo purposes -->
<script src="{{url('adminlte/dist/js/demo.js')}}"></script>

 @section('js')
 
  @show
</body>
</html>

Kalian simpan ditempat yang sama dan beri nama app.blade.php

 

Untuk masalah @section, @yield dsb.. saya sudah jelaskan ya ditutorial sebelum nya

 

Pada app.blade.php , jangan lupa untuk mengganti url nya sob dengan {{url(‘isi dari css dan js’)}} lengkap nya kalian bisa lihat pada video ya yang saya maksud. Berfungsi juga untuk pemanggilan gambar ya

 

Lalu kita buat 1 contoh sebagai blank page, beri nama dashboard.blade.php , isi nya hanya seperti ini :

 

@extends('layouts.app')


@section('content')
<section class="content-header">
      <h1>
        GILACODING
        <small>it all starts here</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Examples</a></li>
        <li class="active">Blank page</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">

      <!-- Default box -->
      <div class="box">
        <div class="box-header with-border">
          <h3 class="box-title">Title</h3>

          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip"
                    title="Collapse">
              <i class="fa fa-minus"></i></button>
            <button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
              <i class="fa fa-times"></i></button>
          </div>
        </div>
        <div class="box-body">
          Start creating your amazing application!
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
          Footer
        </div>
        <!-- /.box-footer-->
      </div>
      <!-- /.box -->

    </section>
@endsection

 
jadi ini merupakan isi konten sob, kalian hanya perlu rubah isi dari dashboard.blade.php saja untuk membuat view – view lainnya.

Baiklah sekian tutorial yang berdasarkan pengalaman saya, sekali lagi jika terdapat kesalahan baik text dan penyebutan bisa kalian komen dibawah

Demi kemajuan web dan youtube gilacoding, mohon untuk subscribe dan bagikan ke teman – teman kalian sob. Agar saya bisa konsisten untuk upload tutorial sesuai dengan request kalian.

Untuk yang mau download langsung bisa di github saya, dan video nya bisa kalian lihat disini :

Github Gilacoding

Terimakasih sobat!

 

laravel gilacoding adminlte