Skip to content

Instantly share code, notes, and snippets.

View samitrimal's full-sized avatar

Samit Rimal samitrimal

  • Kathmandu, Nepal
View GitHub Profile
@samitrimal
samitrimal / neovim-commands
Last active February 17, 2025 06:44
neovim
# search file
:vimgrep filename **/*.lua
:copen
# using vimgrep
:grep filename **/*
:copen
@samitrimal
samitrimal / settings.json
Created May 23, 2024 10:08 — forked from ixahmedxi/settings.json
VSCode settings.json
{
// open json editor for settings
"workbench.settings.editor": "json",
// Theme
"workbench.colorTheme": "Aura Dark",
"workbench.iconTheme": "moxer-icons",
// Change font
"editor.fontFamily": "Geist Mono",
@samitrimal
samitrimal / postgres_commands.md
Created July 12, 2023 08:14 — forked from sachindayl/postgres_commands.md
[Postgres Database Commands] #postgres

Login to postgres

psql postgres

Create Database

CREATE DATABASE <database_name>;

Drop Database

DROP DATABASE [IF EXISTS) name;

Check for Global Users

@samitrimal
samitrimal / EfCore.cs
Last active August 29, 2022 04:37
using EntityFramework core in console app
using System.Linq;
using Microsoft.EntityFrameworkCore;
/**
dotnet new globaljson
Add a manisfest near solution
dotnet new tool-manifest
dotnet tools add dotnet-ef --version 5.0.12
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.InMemory
@samitrimal
samitrimal / .htaccess
Last active August 29, 2015 14:27 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/