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
const fs = require("node:fs"); | |
const fsp = require("node:fs/promises"); | |
const os = require("node:os"); | |
function readInPosition(filename, start, end) { | |
const readStream = fs.createReadStream(filename, { | |
start, | |
end, | |
}); |
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
#include <bits/stdc++.h> | |
using namespace std; | |
unordered_map<int, int> hashMap; | |
// assumes 0 based indexing | |
char getElementByPos(vector<char> alpha, int eltPos) { | |
int currPos = 0; | |
for (int idx = 0; idx < alpha.size(); idx++) { | |
if (hashMap[idx]) continue; |
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
#!/bin/sh | |
RED="\033[1;31m" | |
GREEN="\033[1;32m" | |
NC="\033[0m" | |
linter_exit_code=1 | |
staged_js_files=$(git diff --cached --diff-filter=d --name-only | grep .js$) | |
./node_modules/.bin/eslint $staged_js_files --quiet --fix | |
linter_exit_code=$? | |
git add -f $staged_js_files | |
if [ $linter_exit_code -ne 0 ] |
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
version: "3.7" | |
services: | |
postgres: | |
image: postgres | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- '5432:5432' | |
volumes: |
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
{ | |
"root": true, | |
"parser": "@typescript-eslint/parser", | |
"plugins": ["@typescript-eslint", "prettier"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended", | |
"prettier" | |
], | |
"rules": { |
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
{"lastUpload":"2021-03-21T16:12:13.717Z","extensionVersion":"v3.4.3"} |
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
# Path to your oh-my-bash installation. | |
export OSH=/home/pranjal/.oh-my-bash | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-bash is loaded. | |
OSH_THEME="standard" | |
# Uncomment the following line to use case-sensitive completion. | |
# CASE_SENSITIVE="true" |
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 java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.StringTokenizer; | |
class SpaceshipTravel { | |
static class Graph { |
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
// 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', |
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
{ | |
"editor.snippetSuggestions": "top", | |
"workbench.iconTheme": "vscode-icons", | |
"editor.multiCursorModifier": "ctrlCmd", | |
"files.autoSave": "onFocusChange", | |
"editor.tabSize": 2, | |
"editor.fontSize": 18, | |
"editor.fontFamily": "Anonymous Pro", | |
"editor.formatOnPaste": false, | |
"editor.minimap.enabled": false, |
NewerOlder