Skip to content

Instantly share code, notes, and snippets.

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

Santosh Subedi SantoshCode

🏠
Working from home
View GitHub Profile
@SantoshCode
SantoshCode / settings.json
Created April 10, 2022 15:06
latest vscode config
{
"editor.quickSuggestions": true,
// "editor.tabSize": 4,
/**
* Better Defaults
**/
"window.menuBarVisibility": "hidden",
"editor.copyWithSyntaxHighlighting": false,
"diffEditor.ignoreTrimWhitespace": false,
@SantoshCode
SantoshCode / mysql.md
Last active July 26, 2023 15:49
MYSQL database and user creation

MySql Database and user creation

$ sudo mysql -u root
> create user 'santosh'@'localhost' identified by 'password123';
> create database school_db;
> grant all privileges on school_db.* to 'santosh'@'localhost';
@SantoshCode
SantoshCode / vim.md
Last active March 17, 2022 16:03
Learning vim commands
@SantoshCode
SantoshCode / mysql-create-user-and-grant.md
Created March 6, 2022 18:13
Create a user in mysql and grant all access to that user
mysql -u root
CREATE USER 'santosh123'@'localhost' IDENTIFIED BY 'secretpassword123';
GRANT PRIVILEGES ON *.* TO 'santosh123'@'localhost';
@SantoshCode
SantoshCode / custom-checkbox.md
Created February 28, 2022 14:35
custom checkbox
.checkbox-classname{
  border: 1px solid rgba(86, 52, 194, 1);
                                                    -moz-appearance:none;
                                                    -webkit-appearance:none;
                                                    -o-appearance:none;
                                                    padding: 20px;
                                                    box-sizing: border-box;
                                                    border-radius: 6px;
}
@SantoshCode
SantoshCode / demo.md
Created February 28, 2022 14:28
gradient border with border radius
<div class="container">
<a  class="button" href="#"><span>Login</span></a>
</div>
.button {
  background: linear-gradient(to right, #05FBFF,#1E00FF);
 border-radius: 8px;
@SantoshCode
SantoshCode / proxy-setup.md
Created February 8, 2022 05:08
Manual Proxy setup in React project

Manual Proxy setup in create-react-app

cd client
npm install http-proxy-middleware
cd src && touch setupProxy.js

setupProxy.js

@SantoshCode
SantoshCode / diff.md
Created February 7, 2022 13:14
Difference between "&&"and ";" in linux command line

Difference between && and ; ?

command1 && command2

In above "&&" case command2 will be executed if and only if command1 returned zero exit status.

command1;command2
import pandas as pd
import matplotlib as matplotlib

print(matplotlib.style.available)

matplotlib.style.use('seaborn-whitegrid') # My favourite, also "seaborn-talk" is big one

df = pd.read_csv('./data/ABC.csv')

Useful conda commands

Creating environment.yml file automatically

conda env export > environment.yml

To remove long prefix in your shell prompt, modify the env_prompt setting in your .condarc file