Skip to content

Instantly share code, notes, and snippets.

View ivryb's full-sized avatar

Ivan Rybnikov ivryb

View GitHub Profile
@ivryb
ivryb / zed-one-dark-ocean-darker.json
Created June 17, 2024 10:58
Put it in the ~/.config/zed/themes
{
"name": "One Dark Ocean",
"author": "",
"themes": [
{
"name": "One Dark Ocean",
"appearance": "dark",
"style": {
"border": "#0F111A60",
"border.variant": "#0F111A60",
@ivryb
ivryb / work-with-multiple-github-accounts.md
Created August 10, 2023 17:09 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@ivryb
ivryb / correct-selection-script.js
Created July 13, 2023 12:28
Correct selection with ChatGPT
/*
# Correct selection with ChatGPT
Fix grammar and spelling mistakes in any text field.
Highlight some text and press `cmd+option+g` to send it through ChatGPT to replace the text response.
*/
// Name: Correct selection
// Description: Fix grammar and spelling mistakes in any text field.
@ivryb
ivryb / paginateMongoRequest.js
Last active June 30, 2023 11:19
MongoDB Node driver Pagination
export const paginateMongoRequest = async (collection, params = {}) => {
const defaults = {
page: 1,
perPage: 18,
sort: undefined,
filter: undefined,
};
const { page, perPage, sort, filter } = Object.assign(defaults, params);
@ivryb
ivryb / gist:988f54fb08954373218848baa20b2385
Created December 19, 2018 01:29
Git: .DS_Store global ignore
git config --global core.excludesfile ~/.gitignore
echo .DS_Store >> ~/.gitignore