Skip to content

Instantly share code, notes, and snippets.

View encikpulasan's full-sized avatar
🕌
🏃🏻💨

encikpulasan

🕌
🏃🏻💨
  • Johor, Malaysia
View GitHub Profile
@encikpulasan
encikpulasan / Auth.postman_collection.json
Created August 8, 2024 05:23
Postman Request Collection for Auth
{
"info": {
"_postman_id": "c37aa390-aa58-48bc-9e53-8716daff537a",
"name": "Auth",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "34921941"
},
"item": [
{
"name": "User Registration",
@encikpulasan
encikpulasan / Procurement.postman_collection.json
Last active August 8, 2024 07:25
Collection of Procurement API request
{
"info": {
"_postman_id": "your-postman-id",
"name": "Procurement API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "base_url",
"value": "http://localhost:3000"
@encikpulasan
encikpulasan / app.js
Last active August 8, 2024 07:07
Procurement API using Express JS
const express = require("express");
const fs = require("fs");
const path = require("path");
const multer = require("multer");
const { v4: uuidv4 } = require("uuid");
const bcrypt = require("bcrypt");
const jwt = require("jsonwebtoken");
const cors = require("cors");
const app = express();
@encikpulasan
encikpulasan / calculator.wsdl
Created August 6, 2024 02:52
Calculator WSDL
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="CalculatorService"
targetNamespace="http://www.examples.com/wsdl/CalculatorService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.examples.com/wsdl/CalculatorService.wsdl"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<message name="AddRequest">
<part name="a" type="xsd:int"/>
@encikpulasan
encikpulasan / gauge.dart
Created September 2, 2021 05:28
Gauge chart implementing ChartFultter package
/// Gauge chart example, where the data does not cover a full revolution in the
/// chart.
/// Sample data type.
class GaugeSegment {
final String segment;
final double size;
final Color color;
final Icon icon;
@encikpulasan
encikpulasan / RecentTransaction Recursive
Created August 17, 2021 07:40
Exploring recursive implementation from for loop
/// Loop through RecentTransaction to perform specific function
void searchTransaction(Transaction transaction, void Function(int i, int j) function) {
for (var i = 0; i < recentTransactions!.dailyTransactions!.length; i++) {
DailyTransaction dailyTransaction = recentTransactions!.dailyTransactions![i];
for (var j = 0; j < dailyTransaction.transactions!.length; j++) {
Transaction trx = dailyTransaction.transactions![j];
if (trx.id == transaction.id) {
function(i, j);
}
}
@encikpulasan
encikpulasan / device_info_utils.dart
Created June 25, 2021 05:57
Flutter Device Info Utility Helper
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
class DeviceInfoUtils {
final DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
/// Info available for both iOS & Android OS
String? deviceId;
String? deviceName;
@encikpulasan
encikpulasan / expanded_card.dart
Created January 18, 2021 20:20
expanded card
AnimatedPadding(
duration: Duration(milliseconds: 300),
padding: EdgeInsets.only(top: 80),
child: GestureDetector(
onTap: this.onTap,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0),
child: Container(
width: double.infinity,
height: double.infinity,
extension CapExtension on String {
//first letter only
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
//all letter in string
String get allInCaps => this.toUpperCase();
//first letter for each word in a string
String get titleCase => this
.split(' ')
.map((word) => word[0].toUpperCase() + word.substring(1))
.join(' ');
@encikpulasan
encikpulasan / index.html
Created October 10, 2016 11:13
Siapa Hensem?
Akif Hensem