This file contains hidden or 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": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Build and debug a test", | |
"type": "go", | |
"request": "launch", | |
"mode": "test", | |
"remotePath": "", | |
"port": 2345, |
This file contains hidden or 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 { JungleBook, Node } from "../src/JungleBook"; | |
describe("Test", function () { | |
let jungle: JungleBook; | |
beforeEach(() => { | |
jungle = new JungleBook(); | |
}); | |
it("add an apex predator", function () { |
This file contains hidden or 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
let genRandom = (max = 10) => { | |
let exist = []; | |
const rand = () => Math.ceil(Math.random() * max); | |
return () => { | |
if (exist.length === max) { | |
return; | |
} | |
let n = rand(); | |
while (exist.includes(n)) { |
This file contains hidden or 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
let RIGHT = 'right'; | |
let BOTTOM = 'bottom'; | |
let LEFT = 'left'; | |
let TOP = 'top'; | |
function createMatrix(numOfRows, numOfColumns) { | |
return Array | |
.from({length: numOfRows}) | |
.map(row => Array.from({length: numOfColumns}).map(_ => 0)); |
This file contains hidden or 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
{ | |
"window.zoomLevel": 1, | |
"workbench.editor.enablePreview": false, | |
"editor.minimap.enabled": false, | |
"workbench.panel.defaultLocation": "right", | |
"terminal.integrated.scrollback": 1000000, | |
"workbench.iconTheme": "vscode-icons", | |
"gitlens.codeLens.enabled": false, | |
"gitlens.codeLens.authors.enabled": false, | |
"gitlens.currentLine.enabled": false, |
This file contains hidden or 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
[ | |
{ | |
"key": "ctrl+shift+x", | |
"command": "workbench.action.toggleMaximizedPanel" | |
}, | |
{ | |
"key": "ctrl+e", | |
"command": "-workbench.action.quickOpen", | |
}, |
This file contains hidden or 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
## Update packages then upgrade | |
echo "Update Ubuntu packages and followed by upgrading" | |
sudo apt update | |
sudo apt upgrade -y | |
## SSH Public Key | |
echo "Setting up ~/.ssh and ~/.ssh/authorized_keys" | |
cd ~ | |
mkdir .ssh |
This file contains hidden or 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 getRealmIdentifier(hostname, {defaultIdentifier = "gdis", baseDomain = "example.local"} = {}, debug = false) { | |
const _baseDomain = baseDomain.replace('.', '\\.'); | |
const pattern = new RegExp(`^(?:www\\.)?([^:\\/?\\n\\.]+)\\.${baseDomain}$`, 'i'); | |
const result = hostname.match(pattern); | |
debug && console.info(hostname, defaultIdentifier, baseDomain, pattern, result); | |
if (result === null) { | |
return defaultIdentifier; | |
} |
This file contains hidden or 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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEBGwz+nuvQPFJCWajM6UeT3en4Oil+ZPjuiYXXpcZnOULxgTbXFo+f0PGXdMbTh2muClZMtK7rXPpsu16N688CK1Ysa4u1/bI6lARwAtfzyovE12wQGLcxKF2bJHty+cjoPhPKco1ffOgIEKI1cW9PTbAmIQWwKkl0Q2em7QJkBwsKPMj/orSjtEET0hbqRSxQBo1ewublfGObjJFAFLAFtkXa/M905X9ZLX6RF7HWVCEB59RuUhZiH6vzAahlYc1a2GEfFHqi0k0M5hPzO3Qr2JY2ProRPM47bNmohGXLNEgNhqRMw+It8EXfQwpdHJKAA9ClcKjKXcGhP2ueV8l0owLuTBgGVZz6a2z4gHvjZEaE1lRaTo63fdOK6BJn5PPcf32WO2twp9++pOse8wo0OrvBug2/qRcSPNoAnQfSQNMD4jIJgB8uSzovHv9fnVhgXLaz36+7iiwdzfYTqg8nr3FgqTp4CX0TMeYX51inyt8a0qKQOuuLZhx7tid6JfIgoYY+M9atkOgy+ICMkX4KGr/Fb4wKGfUnsfFwz+UQKkIt0lLbB00xA0fcwMuIMz7Ik7gYzKgtIrEZsmc3SZk8FYnqBm5WjciX9IyCVSj7VETrs2EwgtJpDkmm+oqgC7btumY8MVb/NRLQwE35+wKF/7j/FVAnZy1RIcbldN3nw== [email protected] |
This file contains hidden or 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
[user] | |
name = Leonardo Situmorang | |
email = [email protected] | |
[alias] | |
gr = log --graph --decorate --oneline | |
[core] | |
editor = vim |
NewerOlder