Array.from(document.querySelectorAll('a[id^="commit-details-"]')).map(i => i.textContent.replaceAll("\n"," ").replaceAll(" ",""))- Shell script that searches through all files in a specified directory (recursively) for occurrences of a given string e.g.
FOOBAR. - This script can be customized by changing the
SEARCH_STRINGvariable. - The script uses
grepto find the string and ignores binary files usingfile -I.
To isolate user-defined properties in the window object, you can compare the current keys of window against a "clean" iframe context. This effectively filters out all browser-native APIs and built-ins.
Here is a concise snippet you can paste directly into your console:
((win) => {
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
document.body.appendChild(iframe);
const nativeProps = Object.getOwnPropertyNames(iframe.contentWindow);To sync your VS Code workbench theme with your operating system's light or dark mode, you need to enable the auto-detect setting.
- Open the Command Palette by pressing
Ctrl + Shift + P(Windows/Linux) orCmd + Shift + P(macOS).- Open User Settings (JSON) and press Enter.
- Add the following lines to your configuration.
Product walks in with ✨vibes✨ and not a plan, give them this
| <script> | |
| fetch("data.json") | |
| .then(response => response.json()) | |
| .then(json => { | |
| // Filter only "Electronic Technology" stocks | |
| const data = json.data | |
| .filter(d => d.d[21] === "Electronic Technology") | |
| .map(d => ({ | |
| symbol: d.s, | |
| company: d.d[27], |
This all looks like rookie stuff. Solve it how an enterprise solution saas company for code diffs would have done or something better than that.
| // https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ | |
| // "abcabcbb" ==> 3 | |
| // "bbbbb" ==> 1 | |
| // "pwwkew" ==> 3 | |
| function LongestNonRepeatedSubstringLength(str) { | |
| let h = new Map(); | |
| let left = 0; | |
| let maxLength = 0; | |
| for (let right = 0; right < str.length; right++) { |
A long, comprehensive JSON example of frequently used VS Code settings that developers often configure in their settings.json.
I’ve included a wide range of categories:
- editor behavior,
- formatting,
- UI customization,
- For funky vscode themes, refer https://gist.github.com/tangoabcdelta/235764d1c234020c26644387b77f6629
- This gist contains changes to be done in
settings.jsonfor editor UI customization
- language-specific settings,