Skip to content

Instantly share code, notes, and snippets.

View Suvink's full-sized avatar
🏢
Working from office

Suvin Nimnaka Suvink

🏢
Working from office
View GitHub Profile
@Suvink
Suvink / README.md
Created December 1, 2025 04:30
Check Release Dates of Your Dependancies

NPM Package Version Date Checker

A simple Node.js script to check when your package dependencies were published to npm registry.

Purpose

This tool helps you verify if the versions of packages in your package.json were released before a specific date (November 20, 2025 by default).

Requirements

🚀 OpenChoreo Deployment Challenge

Welcome! Complete all 6 steps to deploy your first component on OpenChoreo and win a prize! 🎁


Before You Start

  1. Tell the booth staff your name to start your session
  2. They will run: choreo-challenge start "Your Name"
@Suvink
Suvink / auth_code_test_postman.json
Created September 5, 2024 03:50
Test Authorization Code Flow with Postman
{
"info": {
"_postman_id": "2ad90d8a-ae8c-4a2d-b5e4-eb01a55dd257",
"name": "Auth Code Flow Test",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "18458193"
},
"item": [
{
"name": "2. Authorize call",
{
"labels": {
"l1" : "v1",
"l2" : "v2",
"l3" : "v3",
"observability":"true"
}
}
@Suvink
Suvink / MetadataFilter.java
Last active April 2, 2024 05:41
Spring Authorization Sample Thread Local Context
public class MetadataFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
try {
String tenantId = request.getHeader('X-Tenant-Id');
TenantContextHolder.getContext().setTenantId(tenantId);
filterChain.doFilter(request, response);
<?xml version="1.0" encoding="utf-8"?>
<profiles version="21">
<profile kind="CodeFormatterProfile" name="wso2_code_style" version="21">
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
// TODO: make `pages` optional and measure the div when unspecified, this will
// allow more normal document flow and make it easier to do both mobile and
// desktop.
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
@Suvink
Suvink / data_model.json
Created November 12, 2022 06:29
The data model. Ref: Mapping the Employer and Employee: a Visualization based Approach
{
"basic_information": {
"name": "Suvin Kodituwakku",
"birthday": "21/11/1998",
"email": "hello@suvin.me",
"phone_number": "+94771655198",
"home_address": "35B, Kitulampitiya Rd, Kalegana, Galle, Sri Lanka.",
"website": "https://suvin.me",
"external_links": [
"https://github.com/Suvink",
@Suvink
Suvink / hyper.js
Created November 4, 2022 14:32
My personal Hyper configuration. (More at https://hyper.is)
"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@Suvink
Suvink / processes.json
Created October 8, 2022 08:17
Git auto deploy script for Express JS with PM2
{
"apps": [
{
"name": "Sample App Name",
"script": "index.js",
"watch": "./",
"log_date_format": "YYYY-MM-DD HH:mm Z"
}
]
}