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 assert = require('assert') | |
let LRUCache = function (capacity) { | |
this.capacity = capacity; | |
this.cache = {}; | |
this.head = null; | |
this.tail = null; | |
this.size = 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
select * from mytable where category LIKE 'search%' AND client_timestamp BETWEEN timestamp '2020-11-17T00:00:00' AND timestamp '2020-11-18T09:59:29' |
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
// As of 1st Feb 2022, the VSCode JS Debugger stopped detecting the node version selected using NVM | |
// Had to install and use NVS | |
// export NVS_HOME="$HOME/.nvs" | |
// git clone https://github.com/jasongin/nvs "$NVS_HOME" | |
// . "$NVS_HOME/nvs.sh" install | |
// nvs use 14 | |
// Based on the comments here: https://github.com/microsoft/vscode/issues/133521#issuecomment-956108829 | |
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. |
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
openssl rand -base64 32 | |
date +%s | sha256sum | base64 | head -c 32 ; echo | |
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo; |
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
#Reference - https://github.com/json-schema-org/json-schema-spec/issues/348#issuecomment-322940347 | |
folderDeleted: | |
allOf: | |
- $ref: '#/components/schemas/folderCommon' | |
properties: | |
deletedCollectionItems: | |
type: array | |
items: | |
$ref: '#/components/schemas/collectionItem' | |
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
#List all instances of MySQL that exists by running | |
brew services | |
# Remove each instance by running | |
brew uninstall <instance_name> | |
#Delete the MySQL directory in /usr/local/var/mysql: | |
rm -rf /usr/local/var/mysql | |
# Might need to run brew update here if brew has not been updated for a while |
OlderNewer