Skip to content

Instantly share code, notes, and snippets.

View rwaddin's full-sized avatar
🖥️
Freelance Full-stack web developer

addin rwaddin

🖥️
Freelance Full-stack web developer
View GitHub Profile
@rwaddin
rwaddin / akses.php
Created December 27, 2023 05:11
sample limitasi menu permission
<?php
function akses ($title, $menu=false){
$mainmenu= [
"dashboard" => [
"performa_usaha" => [
"performa_toko.lihat",
"biaya.lihat",
"omset.lihat",
"dll.lihat",
@rwaddin
rwaddin / docker-compose-local.yml
Created July 17, 2023 07:55
sonarqube-docker
version: "3"
services:
sonarqube:
image: sonarqube:lts-community
container_name: sonarqube
depends_on:
- db
environment:
SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar

Beranda (pending)

  • 1.1 Beranda - Grafik
  • 1.2 Beranda - Ringkasan
  • 1.3 Beranda - Transaksi
  • 1.4 Beranda - Konsumen butuh bantuan

Performa Usaha

  • 2.1 Performa Usaha - Performa Toko
  • 2.2 Performa Usaha - Performa Karyawan
  • 2.3 Performa Usaha - Grafik Omset
@rwaddin
rwaddin / cek-tarif.js
Created March 1, 2023 08:39
cek ongkir
(function ($) {
"use strict";
function autocomplete(inp, arr) {
/*the autocomplete function takes two arguments,
the text field element and an array of possible autocompleted values:*/
var currentFocus;
/*execute a function when someone writes in the text field:*/
inp.addEventListener("input", function (e) {
var a,
<template>
<vue-qrcode value="https://addin.my.id" />
</template>
<script>
import VueQrcode from 'vue-qrcode'
export default {
components: {
VueQrcode,
},
@rwaddin
rwaddin / component-watch-store.vue
Last active October 27, 2022 04:14
Vue3 Composition Api watch store value
<template>
<!-- trigger change value -->
<button @click="onChange">💎</button>
{{myvalue}} <!-- listen value terbaru -->
</button>
</template>
<script>
import {computed} from "vue";
import {useStore} from "vuex";
@rwaddin
rwaddin / watch-store.js
Created October 27, 2022 04:01
Vue3 Composition Api watch store value
export default {
state: {
_epochtime: null
},
getters: {
fetchEpoch: (state) => state._epochtime
},
actions: {
},
@rwaddin
rwaddin / Ratingexcel.php
Last active August 31, 2022 04:57
embeed medium - create export excel with phpspreadsheet
<?php if( ! defined('BASEPATH')) exit('No direct script access allowed');
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
class Ratingexcel extends CI_controllers
{
public function index()
{
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
@rwaddin
rwaddin / date-baseon-defined.php
Last active August 31, 2022 03:39
embed medium
<?php
# mengurangi hari
$tgl = "2022-03-02";
$date = date("Y-m-d", strtotime($tgl."-10 days"));
echo $date; // 2022-02-20
# menambah hari
$tgl = "2022-03-02";
$date = date("Y-m-d", strtotime($tgl."+10 days"));
@rwaddin
rwaddin / date-baseon-today.php
Last active August 31, 2022 03:36
embed medium add & substrac date
<?php
# mengurangi tanggal 7 hari
$date = date("Y-m-d", strtotime("-7 days"));
echo $date;
# menambah tanggal 7 hari
$date = date("Y-m-d", strtotime("+7 days"));
echo $date;