Skip to content

Instantly share code, notes, and snippets.

View wuriyanto48's full-sized avatar

wuriyanto wuriyanto48

View GitHub Profile
@wuriyanto48
wuriyanto48 / setup.md
Last active November 14, 2024 06:05
Create Mock Server using Prism

Install Prism

npm install -g @stoplight/prism-cli

Create Mockup Json File using OpenApi spec

{
    "openapi": "3.0.0",
    "info": {
@wuriyanto48
wuriyanto48 / main.go
Last active November 4, 2024 10:20
image compression Golang
package main
import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"image"
"image/jpeg"
_ "image/png"
@wuriyanto48
wuriyanto48 / enc_dec_pentaho_pass.ktr
Created October 15, 2024 15:36
encrypt decrypt Pentaho Password
<?xml version="1.0" encoding="UTF-8"?>
<transformation>
<info>
<name>enc_dec_password</name>
<description/>
<extended_description/>
<trans_version/>
<trans_type>Normal</trans_type>
<directory>/</directory>
<parameters>
@wuriyanto48
wuriyanto48 / Install_pentaho.md
Created October 8, 2024 14:56
Install Pentaho Mac M1

Install Pentaho Mac M1

Install Homebrew

Check Xcode Command Line tools

xcode-select -v

If you see a response with ‘xcode-select version’, it’s already installed.

@wuriyanto48
wuriyanto48 / main.md
Last active August 20, 2024 16:56
SQL Pagination

Bagaimana Pagination pada Database bekerja.

Data

id sku name quantity
1 001 A 10
2 002 B 10
3 003 C 10
4 004 D 10
@wuriyanto48
wuriyanto48 / s3.py
Created August 16, 2024 04:11
upload and download stream data from S3 and S3 Compatible with Python
import os
import shutil
from minio import Minio
from minio.datatypes import Object
from minio.helpers import ObjectWriteResult
from zipfile import ZipFile
S3_ENDPOINT = 's3.ap-southeast-3.amazonaws.com'
S3_CLIENT_ID = 'ABC'
S3_CLIENT_SECRET = 'BBB'
@wuriyanto48
wuriyanto48 / main.js
Last active August 25, 2024 07:06
Pixel Size formula Conv Neural Network
function calcOut(wh, padding, kernelSize, stride) {
return ((wh + 2*padding - kernelSize ) / stride) + 1;
}
// for image file 32x32 pixels
console.log(calcOut(32, 1, 3, 1)); // conv1 = 32
console.log(calcOut(32, 1, 3, 1)); // conv2 = 32
console.log(calcOut(32, 0, 2, 2)); // maxpool1 = 16
console.log(16*16*32); // flattening result = 8192
console.log("----------------");
@wuriyanto48
wuriyanto48 / main.go
Created July 14, 2024 18:27
Golang Authenticator Time Based (you can use it with Authenticator App. Eg: Google Authenticator)
package main
import (
"encoding/base64"
"fmt"
"time"
"github.com/skip2/go-qrcode"
"github.com/xlzd/gotp"
)
@wuriyanto48
wuriyanto48 / email.txt
Created July 9, 2024 15:10
send email command line
From: "User Name" <[email protected]>
To: "John Smith" <[email protected]>
Subject: This is a test
Hi John,
I’m sending this mail with curl thru my gmail account.
Bye!
@wuriyanto48
wuriyanto48 / index.html
Last active June 26, 2024 17:04
Bezier Curves in Javascript
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<canvas id="myCanvas" width="800" height="400" style="border:1px solid #000000;">
Your browser does not support the HTML canvas tag.
</canvas>