This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
// Modify your settings.json to add these. Customize further how you prefer. | |
{ | |
"workbench.editor.highlightModifiedTabs": true, | |
"workbench.editor.tabCloseButton": "off", | |
"workbench.colorCustomizations": { | |
"editor.lineHighlightBackground": "#ffffff06", | |
"editor.foreground": "#acb3db", | |
"selection.background": "#89DDFF", | |
"progressBar.background": "#89DDFF", | |
"textLink.foreground": "#89DDFF", |
# source: https://towardsdatascience.com/search-algorithm-breadth-first-search-with-python-50571a9bb85e | |
def generateAdjacencyLst(edges): | |
adjacencyList = defaultdict(list) | |
for u, v in edges: | |
adjacencyList[u].append(v) | |
adjacencyList[v].append(u) | |
return adjacencyList | |
edges = [['A', 'B'], ['A', 'C'], ['B', 'D'], ['B', 'E'], ['C', 'F'], ['C', 'G'], ['D', 'H'], ['D', 'I'], ['E', 'J'], ['E', 'K'], ['F', 'L'], ['F', 'M']] |
import React, { useReducer, useState } from "react"; | |
const initialTodos = [ | |
{ | |
id: "a", | |
task: "Learn React", | |
complete: false, | |
}, | |
{ | |
id: "b", |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
// here is the source | |
// https://stackoverflow.com/a/41407246/7516735 | |
console.log("\x1b[36m%s\x1b[0m", "I am cyan"); //cyan | |
console.log("\x1b[33m%s\x1b[0m", stringToMakeYellow); | |
const Reset = "\x1b[0m"; | |
const Bright = "\x1b[1m"; | |
const Dim = "\x1b[2m"; | |
const Underscore = "\x1b[4m"; |
const res = await client | |
.db("daniel_is_here") | |
.collection("test") | |
.find({}) | |
.toArray(); | |
console.log(res); |
const arrays = [[10], 50, [100, [2000, 3000, [40000]]]]; | |
console.log(arrays.flat(Infinity)); |
let input1 = [1, 2, 3, 3, 3, 2, 3, 1, 5]; | |
const findOdd2 = (xs) => xs.reduce((a, b) => a ^ b); | |
console.log(findOdd2(input1)); |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |