Skip to content

Instantly share code, notes, and snippets.

View manustays's full-sized avatar
🌌
Exploring

Kumar Abhishek manustays

🌌
Exploring
View GitHub Profile
@manustays
manustays / having-multiple-jdk-macos.md
Created September 21, 2024 18:55 — forked from gramcha/having-multiple-jdk-macos.md
Managing multiple Java versions in MacOS

Installing different versions of open jdk through Homebrew(assuming already installed) and already having Java 8.

We need to install a tool called jenv - Java version manager which is similar to nvm(nodeJs version manager).

brew install jenv

Export the jenv path to .bash_profile or .zshrc - whatever you are using. I am using .zshrc

@manustays
manustays / bookmarks-to-notion.js
Last active July 25, 2022 14:19 — forked from unrevised6419/bookmarks-to-notion.js
Export browser bookmarks, import them in Notion as a database
(function bookmarksExportToCsv() {
/**
* 1. Export bookmarks from browser (supported any Chromium based browsers and Safari) (chrome://bookmarks)
* 2. Open exported html file again in the browser
* 3. Copy paste this entire file in console, and execute it (hit enter)
* 4. You will be prompted to save a CSV file. Save it.
* 5. Open Notion. Click Import -> CSV
* 6. Select saved CSV file. Wait for import
* 7. You have a new database with all your bookmarks
*/
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Basic usage */
@keyframes name-of-animation-1 {
0%, 100% { opacity: 0; }
50% { opacity: 1; }
}
@keyframes name-of-animation-2 {
from {
transform: rotate(0deg);
}
/* Define the "system" font family */
@font-face {
font-family: system;
font-style: normal;
font-weight: 300;
src: local(".SFNSText-Light"), local(".HelveticaNeueDeskInterface-Light"), local(".LucidaGrandeUI"), local("Ubuntu Light"), local("Segoe UI Light"), local("Roboto-Light"), local("DroidSans"), local("Tahoma");
}
/* Apply it on the elements */
body {
@manustays
manustays / README.md
Created June 6, 2021 08:28
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.7.5+commit.eb77ed08.js&optimize=false&runs=200&gist=

REMIX EXAMPLE PROJECT

Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. It contains 3 directories:

  1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
  2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
  3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.

SCRIPTS

@manustays
manustays / oneliners.js
Created April 3, 2019 05:28 — forked from mikowl/oneliners.js
👑 Awesome one-liners you might find useful while coding.
// By @coderitual
// https://twitter.com/coderitual/status/1112297299307384833
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// Type this in your code to break chrome debugger in that line.