Skip to content

Instantly share code, notes, and snippets.

View ApoTheOne's full-sized avatar

Anurag ApoTheOne

  • Dehradun, Uttarakhand, India
View GitHub Profile
@ApoTheOne
ApoTheOne / Catch global error exception handling in client side front end javascript spa vue.js app
Last active October 29, 2022 16:56
Catch global error exception handle in client side front end javascript spa vue.js app
Ref: https://stackoverflow.com/questions/52071212/how-to-implement-global-error-handling-in-vue
https://www.sitepoint.com/logging-errors-client-side-apps/
In Main.ts
```typescript
window.onerror = function (msg, url, line, col, error) {
//code to handle or report error goes here
}
window.addEventListener('unhandledrejection', function(event) {
@ApoTheOne
ApoTheOne / .netcoregotchas
Last active July 31, 2019 07:54
Gotchas .Net Core
Taken from: https://elanderson.net/2018/03/refit-basics/
In order to use async Task Main a change is needed to the project file to set the LangVersion.
I just set it to latest, but I believe the minimum for this feature is 7.1.
```xml
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<LangVersion>latest</LangVersion>
@ApoTheOne
ApoTheOne / DevToArchitect.md
Created March 11, 2019 13:58
Dev to Architect

This is the ToC from the developer to architect tutorial Architectural Patterns

- Design Versus Architectural Patterns,
- Layered Architecture
- Event-Driven Architecture
- Service-Oriented Architecture
- Microkernel Architecture 

Pitfalls

  • Architecture Anti-Patterns, Part 1
@ApoTheOne
ApoTheOne / cmd
Last active January 24, 2019 09:50
Useful Bash Commands
# Using Clip:
```
git branch | clip
dir | clip
```
# Copy thing.txt to clipboard
```cat ~/.bashrc > /dev/clipboard```
# Put contents of clipboard into file.txt
@ApoTheOne
ApoTheOne / .bashrc_alias
Last active January 24, 2019 09:39
Alias
alias gs="git status"
alias gal="git add ."
alias gac="git add . && git commit -m" # + commit message
alias gct="git commit -m"
alias gc="git checkout"
alias gcb="git checkout -b"
alias gpl="git pull"
# Resolve error - Profile xyz not found with Serverless when using assumed roles and MFA
## While deploying using serverless:
`sls deploy -v --aws-profile assumeRole`
## Error description:
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
---
@ApoTheOne
ApoTheOne / Regex websites
Created August 30, 2018 12:27
Regex websites
https://regexper.com
http://www.regexlib.com/
@ApoTheOne
ApoTheOne / Interesting reads
Last active October 11, 2018 15:48
Interesting reads
**Tuva**:
https://www.microsoft.com/en-us/research/project/tuva-richard-feynman/?from=http%3A%2F%2Fresearch.microsoft.com%2Ftuva
Stanford New: Fixed versus growth intelligence mindsets: It's all in your head, Dweck says
https://news.stanford.edu/pr/2007/pr-dweck-020707.html
http://antirez.com/news/112
https://hackernoon.com/learn-to-code-in-2018-get-hired-and-have-fun-along-the-way-b338247eed6a
@ApoTheOne
ApoTheOne / books.md
Last active July 19, 2019 06:16
Books for software engineers

Books for software engineers

  • Clean Code: A Handbook of Agile Software Craftsmanship
  • The Clean Coder: A Code of Conduct for Professional Programmers
  • The Pragmatic Programmer: From Journeyman to Master
  • The Phoenix Project: A Novel about IT, DevOps, and Helping your Business Win
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • The Imposter's Handbook: A Primer for Self-Taught Programmers
  • Refactoring: Improving the Design of Existing Code
@ApoTheOne
ApoTheOne / cloudSettings
Last active October 7, 2018 05:07
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-10-07T05:07:16.718Z","extensionVersion":"v3.1.2"}