Skip to content

Instantly share code, notes, and snippets.

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

Adarsha Acharya adarshaacharya

🏠
Working from home
View GitHub Profile
@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 / 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 / postgrescommands
Created January 15, 2023 17:11
Postgres Commands
- View all tables
`\l`
- Switch to particular db
`\c jpa;`
@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 */

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 / 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,
@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 / await.tsx
Created April 17, 2025 15:58 — forked from perfectbase/await.tsx
Await component for tRPC with prefetch
/* eslint-disable @typescript-eslint/no-explicit-any */
import { type TRPCQueryOptions } from '@trpc/tanstack-react-query';
import { unstable_noStore } from 'next/cache';
import { Fragment, Suspense, type ReactNode } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { HydrateClient, prefetch as prefetchTRPC } from '@/trpc/server';
type AwaitProps<T> =
| {
promise: Promise<T>;