Skip to content

Instantly share code, notes, and snippets.

View kukiron's full-sized avatar
🚀
I do stuff.

Kafil Uddin Kiron kukiron

🚀
I do stuff.
View GitHub Profile
@kukiron
kukiron / ts-boilerplate.md
Created November 25, 2024 01:55 — forked from silver-xu/ts-boilerplate.md
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@kukiron
kukiron / parse-json.ts
Created October 8, 2024 15:14
Complete a flat or nested JSON (without arrays). Default to "VALUE" for a missing key value.
const partialJson = `{"a1":"v1","a2":{"a3":"v3","a4":{"a5":"v5","a6"`;
// const partialJson = `{"a1":"v1","a2":{"a3":"v3","a4":{"a5`;
// const partialJson = `{"a1":"v1","a2":{"a3":"v3","a4":{"a5":"v5"}`;
const removeQuote = (str: string) => str.replace(/"/g, '');
const findSubstringAtIndex = (json: string) => (index: number) =>
json.substring(index + 1);
const insertClosingBrackets = (json: string) => {
@kukiron
kukiron / reinstall_git_brew.md
Created September 29, 2024 04:10 — forked from brandonsimpson/reinstall_git_brew.md
Re-installing Git on Mac OSX with Brew

Re-installing Git on Mac OSX with Brew

This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.

Uninstall git if installed manually

  1. Check which git you're running:
    which git
    
@kukiron
kukiron / settings.json
Created August 21, 2023 01:41
Latest VS Code Settings JSON
{
"auto-rename-tag.activationOnLanguage": [
"html",
"xml",
"php",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
],
@kukiron
kukiron / vscode-settings.json
Created August 6, 2023 14:30
VS Code settings for Misty Meadows
"workbench.colorCustomizations": {
"focusBorder": "#8695b777",
"foreground": "#8695b7",
"widget.shadow": "#00030F",
"selection.background": "#8695b777",
"descriptionForeground": "#d7dce2",
"errorForeground": "#ef6b73",
"textBlockQuote.background": "#2f3b54",
"textBlockQuote.border": "#2f3b54",
"textCodeBlock.background": "#171c28",
@kukiron
kukiron / crew-schedule-module.ts
Last active October 20, 2023 03:14
Vessel centric view utils
import differenceBy from 'lodash/differenceBy';
import flatten from 'lodash/flatten';
import partition from 'lodash/partition';
import moment from 'moment';
import { getTimelineMonths } from '../helpers';
import {
CrewSchedule,
FormattedSchedules,
RowSegment,
@kukiron
kukiron / airports.ts
Created February 6, 2023 17:53
List of airports with iata code & name
{
"AAA":{
"municipality":"",
"iataCode":"AAA",
"name":"Anaa Airport"
},
"AAB":{
"municipality":"",
"iataCode":"AAB",
"name":"Arrabury Airport"
@kukiron
kukiron / multiple_ssh_setting.md
Created February 2, 2022 10:26 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@kukiron
kukiron / mime.csv
Created April 9, 2020 23:18 — forked from jimschubert/mime.csv
List of more common mime types from MDN, in CSV and TSV
Name MIMEType Extension Description
aac audio/aac .aac AAC audio file
abw application/x-abiword .abw AbiWord document
arc application/octet-stream .arc Archive document (multiple files embedded)
avi video/x-msvideo .avi AVI: Audio Video Interleave
azw application/vnd.amazon.ebook .azw Amazon Kindle eBook format
bin application/octet-stream .bin Any kind of binary data
bz application/x-bzip .bz BZip archive
bz2 application/x-bzip2 .bz2 BZip2 archive
csh application/x-csh .csh C-Shell script
@kukiron
kukiron / SharedFileList.js
Created April 9, 2020 08:30
Component to show shared file list between users or in groups
import flatten from 'lodash/flatten';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import {
StyleSheet,
FlatList,
SectionList,
TouchableOpacity,
ActivityIndicator,