const greeting: string = "Hello typescript";
const year: number = 2022;
const addTwoNumber = (a:number, b:number): number => a + b;
function addTwoNumber(a: number, b:number): number {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aliases | |
alias c="clear" | |
export NODE_ENV=local | |
alias dnpm='docker-compose up -d scripts && docker-compose exec scripts npm | |
run ts:build && docker-compose exec scripts npm ' | |
#export NODE_PATH=$(npm root -g) | |
# Git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colors.sh | |
# This is the custom theme template for gitprompt.sh | |
# These are the defaults from the "Default" theme | |
# You just need to override what you want to have changed | |
function prompt_callback { | |
gp_set_window_title ${PWD} | |
} | |
override_git_prompt_colors() { | |
GIT_PROMPT_THEME_NAME="Custom" | |
# Time12a="\$(date +%H:%M)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"name":"p2","settings":"{\"settings\":\"{\\n /**\\n * Better Defaults\\n **/\\n \\\"editor.copyWithSyntaxHighlighting\\\": false,\\n \\\"diffEditor.ignoreTrimWhitespace\\\": false,\\n \\\"editor.emptySelectionClipboard\\\": false,\\n \\\"workbench.editor.enablePreview\\\": false,\\n \\\"window.newWindowDimensions\\\": \\\"inherit\\\",\\n \\\"editor.multiCursorModifier\\\": \\\"ctrlCmd\\\",\\n \\\"files.trimTrailingWhitespace\\\": true,\\n \\\"diffEditor.renderSideBySide\\\": false,\\n \\\"editor.snippetSuggestions\\\": \\\"none\\\",\\n \\\"editor.detectIndentation\\\": false,\\n \\\"files.insertFinalNewline\\\": true,\\n \\\"files.trimFinalNewlines\\\": true,\\n\\n /**\\n * Hide Everything\\n */\\n //\\\"workbench.activityBar.location\\\": \\\"hidden\\\",\\n \\\"workbench.sideBar.location\\\": \\\"right\\\", //here\\n \\\"editor.minimap.enabled\\\": false,\\n \\\"editor.lineNumbers\\\": \\\"off\\\",\\n \\\"editor.guides.indentation\\\": false,\\n\\n /**\\n * Silence The Noise\\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class T { | |
constructor(endTime, roomId) { | |
this.endTime = endTime; | |
this.roomId = roomId; | |
} | |
} | |
class PriorityQueueTest { | |
constructor(comparator = (a, b) => a - b) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MinHeap { | |
constructor(data = []) { | |
this.data = data; | |
this.comparator = (a, b) => a - b; | |
this.heapify(); | |
} | |
heapify() { | |
if (this.size < 2) return; | |
for (let i = 1; i < this.size; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
content: [ | |
"./pages/**/*.{js,ts,jsx,tsx}", | |
"./components/**/*.{js,ts,jsx,tsx}", | |
], | |
theme: { | |
extend: { | |
fontFamily: { | |
sans: ["Lato", "sans-serif"], | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
// https://stackoverflow.com/questions/63597602/javascript-regex-to-limit-number-of-characters-per-line | |
// Regex https://regex101.com/r/lOI5to/1 :- /^.{0,10}(?:\n.{0,10}){0,1}$/ | |
/* | |
.App { | |
font-family: sans-serif; | |
text-align: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function base_converter(nbasefrom, basefrom, baseto) { | |
var SYMBOLS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
if (basefrom<=0 || basefrom>SYMBOLS.length || baseto<=0 || baseto>SYMBOLS.length) { | |
console.log("Base unallowed"); | |
return null; | |
} | |
var i, nbaseten=0; | |
if (basefrom!=10) { | |
var sizenbasefrom = nbasefrom.length; | |
for (i=0; i<sizenbasefrom; i++) { |
Primitive types
undefined string number boolean object symbol
null
NewerOlder