Skip to content

Instantly share code, notes, and snippets.

View mcnaveen's full-sized avatar

Naveen MC mcnaveen

View GitHub Profile
<nav className="flex transition-opacity duration-150 ease-out fixed sm:top-0 max-sm:bottom-0 max-sm:dark:bg-black/60 max-sm:bg-background/50 max-sm:h-[86px] z-10 justify-center sm:justify-between max-sm:px-4 sm:flex-col sm:min-h-dvh bottom-t sm:border-r sm:w-[70px] w-full border-border">
<div className="flex sm:flex-col items-center max-sm:pb-[calc(env(safe-area-inset-bottom)/3)] max-sm:gap-6 gap-3 text-primary">
className="active:opacity-85 mt-2 mb-2 hidden sm:block group"
<p>Nav Item</p>
<p>Nav Item</p>
/* Common */
"vsicons.dontShowNewVersionMessage": true,
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
/* Explorer */
"explorer.compactFolders": true,
"explorer.confirmDragAndDrop": false,
/* Window */

Keybase proof

I hereby claim:

  • I am mcnaveen on github.
  • I am mcnaveen ( on keybase.
  • I have a public key ASDzKr0MnqufT5irHvdpGlnh44qxByGTb618ESfeCRqb8wo

To claim this, I am signing this object:

const colorTableBody = document.querySelector('.color-table__body');
if (colorTableBody) {
const rows = colorTableBody.querySelectorAll('tr');
const colorNames = [];
rows.forEach(row => {
const colorNameElement = row.querySelector('.color-table__cell.color-table__cell--name');
if (colorNameElement) {
const colorName = colorNameElement.innerText;
mcnaveen / code.js
Created September 30, 2023 17:52
Add Copy Button to Ghost P Tag
document.addEventListener("DOMContentLoaded", function () {
var paragraphs = document.querySelectorAll(".gh-content p");
paragraphs.forEach(function (paragraph) {
var copyButton = document.createElement("button");
copyButton.className = "copy-btn";
copyButton.setAttribute("data-umami-event", "Copy button");
copyButton.innerHTML = "&#x1F4CB;";
# URL of the Android Studio download page
# CSS selector to target the element
# Use curl to fetch the web page content and pipe it to grep
# -s: Silent mode (suppresses progress meter)
mcnaveen /
Created August 18, 2023 05:44
Use MacBook in Camshell Mode (Lid Closed) without power adapter connected

Open the terminal and run the below command

pmset -g | grep hibernatemode

Note down the number in safe place, you'll need this later if you want to disable it

Now, run the below commands one by one.

Image will be uploaded
mcnaveen / findProperty.js
Created August 6, 2023 15:55
Notion Helper Function to find property value by name
const findPropertyValue = (results, propertyName) => {
const property = results.find((item: { properties: { Key: { title: { text: { content }; }[]; }; }; }) =>[0].text.content === propertyName);
return property ?[0].text.content : null;
// then just do
const somevar = findPropertyValue(response.results, "My Phone Number")
// Table should follow this structure