Skip to content

Instantly share code, notes, and snippets.

View VijayHYadav's full-sized avatar
🛠️
Build, Test and Break

Vijay.H.Yadav VijayHYadav

🛠️
Build, Test and Break
  • Pune, Maharashtra
View GitHub Profile
@VijayHYadav
VijayHYadav / gist:9d2263960262b70702cef9d85be717a8
Created July 31, 2024 05:01
Get Connection String for SQLServer via SQLQuery.
select
'data source=' + @@servername +
';initial catalog=' + db_name() +
case type_desc
when 'WINDOWS_LOGIN'
then ';trusted_connection=true'
else
';user id=' + suser_name() + ';password=<<YourPassword>>'
end
as ConnectionString
https://google.github.io/styleguide/
https://stackblitz.com/edit/angular-contextual-menu-zqk6dr?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html,src%2Fapp%2Fcontextual-menu%2Fcontextual-menu.component.ts
[16:34] Vijay Yadav
Resources for context-menu
https://www.npmjs.com/package/ngx-contextmenu
@VijayHYadav
VijayHYadav / architecture-and-design.txt
Created July 10, 2023 07:01
link-for-architecture-and-design
https://www.kamilgrzybek.com/blog/categories/architecture-and-design

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

@VijayHYadav
VijayHYadav / Postgres Service Commands & Postgres Dockerfile & Starting, Loging into Postgres Container
Last active August 9, 2022 03:40
Postgres Service Commands & Postgres Dockerfile & Starting, Loging into Postgres Container
===========================POSTGRES SERVICE CMD UBUNTU v20============================================
>> sudo lsof -i:5432(check if postgresql service is on or what)
>> sudo systemctl start postgresql.service(start postgresql)
>> sudo systemctl stop postgresql.service(stop porstgresql)
===========================POSTGRES SERVICE CMD UBUNTU v20============================================
// Rerender React Component Trick/Hack
// signals the reloading need of the right side
const [reloadToken, setReloadToken] = useState(((new Date()).getTime()).toString())
@VijayHYadav
VijayHYadav / gist:26dadcdd29bddb520a4f01fbb72b55f8
Created February 21, 2022 07:08
Render Dynamic Grid/DS. For Dynamic Grid
const [layout, setLayout] = useState(
[
[
{
"name": "version",
"size": 4
},
{
"name": "img",
"size": 8
@VijayHYadav
VijayHYadav / gist:3c349da6e58e82af9c2bbfaee3e26349
Last active February 18, 2022 03:01
NPM. usefull package.
For NodeBE: chalk => Terminal string styling done right. => npm i chalk.
https://stackoverflow.com/questions/70309135/chalk-error-err-require-esm-require-of-es-module
For ReactFE: react-helmet => This reusable React component will manage all of your changes to the document head. => npm i react-helmet
@VijayHYadav
VijayHYadav / gist:f41a2e2fb46e0310fbd7cdbe83a8d884
Created February 17, 2022 03:23
How to undo the last commit from a remote git repository?
To undo the last commit from a remote git repository, you can use the following cmd that are wraped with >> <<
First, you can use the, >> git reset HEAD^ << command. This will undo the last commit locally.
Then you can use the, >> git push origin +HEAD << command to force push the local commit which was reverted to the remote git repository.