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 / static-web.md
Created July 3, 2024 03:27
membuat web statis dg nodejs + tailwind

Creating a static website with Node.js and Tailwind CSS involves several steps. Below is a step-by-step guide to help you set up your project.

Step 1: Set Up Your Project

  1. Install Node.js: Make sure you have Node.js and npm (Node Package Manager) installed. You can download and install Node.js from nodejs.org.

  2. Initialize Your Project: Open your terminal and run the following commands to create a new directory and initialize a Node.js project.

GitHub Search Syntax for Finding API Keys/Secrets/Tokens

As a security professional, it is important to conduct a thorough reconnaissance. With the increasing use of APIs nowadays, it has become paramount to keep access tokens and other API-related secrets secure in order to prevent leaks. However, despite technological advances, human error remains a factor, and many developers still unknowingly hardcode their API secrets into source code and commit them to public repositories. GitHub, being a widely popular platform for public code repositories, may inadvertently host such leaked secrets. To help identify these vulnerabilities, I have created a comprehensive search list using powerful search syntax that enables the search of thousands of leaked keys and secrets in a single search.

Search Syntax:

(path:*.{File_extension1} OR path:*.{File_extension-N}) AND ({Keyname1} OR {Keyname-N}) AND (({Signature/pattern1} OR {Signature/pattern-N}) AND ({PlatformTag1} OR {PlatformTag-N}))

Examples:

**1.

@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();