Skip to content

Instantly share code, notes, and snippets.

View github_create_access_token.txt
https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to
Create Personal Access Token on Github
From your Github account, go to Settings => Developer Settings => Personal Access Token => Generate New Token (Give your password) => Fillup the form => click Generate token => Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta
Now follow below method based on your machine:
For Windows OS
Go to Credential Manager from Control Panel => Windows Credentials => find git:https://github.com => Edit => On Password replace with with your Github Personal Access Taken => You are Done
View create_new_repo_and_push_to_github.txt
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin {github repo}.git
git push -u origin main
View push_existing_repo_to_github.txt
git remote add origin {github repo}.git
git branch -M main
git push -u origin main
View ts-compiler-issue.txt
https://github.com/microsoft/TypeScript/issues/35606
run this command on powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
View git_with_visual_studio.txt
https://developercommunity.visualstudio.com/t/error-encountered-while-pushing-to-the-remote-repo-3/308898
Solution for me:
Close VS
Delete (or rename) folder "C:\Program Files (x86)\Microsoft Visual Studio\2017{Community|Professional|Enterprise}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git"
Open VS and try to push a commit to a remote repo!
View Adding-ASP.NET MVC5 Identity-Authentication-to-existing-project
https://stackoverflow.com/questions/31960433/adding-asp-net-mvc5-identity-authentication-to-an-existing-project/31963828
View sql.txt
** Maurach's SQL Server 2012 for Developers
- Queries:
(select, distinct, where)
(AND, OR, NOT)
(like, IsNull)
(orderby)
- Joins:
(inner, outer, cross, self)
View security-best-practices.txt
1. compromised database
- strongly encrypt passwords with salt and hash (bcrypt)
- strongly encrypt password reset tokens (sha256)
2. brute-force attacks
- use bcrypt (to make login request slow)
- implement rate limiting (express-rate-limit)
- implement maximum login attempts
3. cross-site scripting (xss) attacks
View gitignore exsisting files.txt
https://stackoverflow.com/questions/45400361/why-is-gitignore-not-ignoring-my-files
git rm -r --cached .
git add .
git commit -m "Untrack files in .gitignore"