Skip to content

Instantly share code, notes, and snippets.

View adarshaacharya's full-sized avatar
🏠
Working from home

Aadarsha Acharya adarshaacharya

🏠
Working from home
View GitHub Profile
@adarshaacharya
adarshaacharya / keychron_k2.adoc
Created February 24, 2024 18:54 — forked from judaew/keychron_k2.adoc
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@adarshaacharya
adarshaacharya / EditorToolbar.tsx
Created June 11, 2023 18:46 — forked from fdrissi/EditorToolbar.tsx
tiptap upload image from local file system with React
import React from 'react'
import { Editor } from '@tiptap/react'
import {
BoldSVG,
BulletsSVG,
ImageSVG,
ItalicSVG,
LinkSVG,

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@adarshaacharya
adarshaacharya / media-query.css
Created February 13, 2023 05:14 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */
@adarshaacharya
adarshaacharya / postgrescommands
Created January 15, 2023 17:11
Postgres Commands
- View all tables
`\l`
- Switch to particular db
`\c jpa;`
@adarshaacharya
adarshaacharya / multiple-ssh-keys-git.adoc
Created November 27, 2022 06:47 — forked from alejandro-martin/multiple-ssh-keys-git.adoc
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@adarshaacharya
adarshaacharya / docker commands
Last active January 12, 2023 02:41
Docker Commands
##### Pull repo from Docker hub
`docker pull <image>`
##### List Docker images
`docker images`
## Docker build
docker build -f Dockerfile -t hobnob/crm-v1 .
##### List Docker running containers
@adarshaacharya
adarshaacharya / pre-push.sh
Created October 20, 2022 03:48 — forked from pixelhandler/pre-push.sh
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@adarshaacharya
adarshaacharya / rebase.sh
Created October 20, 2022 02:18 — forked from darronz/rebase.sh
Bash script to rebase your current branch on master
#!/bin/bash
# store name of current branch
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
# checkout master
git checkout master
# pull the latest changes
git pull
@adarshaacharya
adarshaacharya / how-to-publish-to-npm.md
Created March 12, 2022 04:37 — forked from coolaj86/how-to-publish-to-npm.md
How to publish packages to NPM

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm config set init.author.name "Your Name"
npm config set init.author.email "you@example.com"
npm config set init.author.url "https:/yourblog.com"

npm config set init.version "1.0.0"