Skip to content

Instantly share code, notes, and snippets.

View sobhardwaj's full-sized avatar
🎯
Focusing

Siddharath Bhardwaj sobhardwaj

🎯
Focusing
  • Freelancer
  • New Delhi, India
View GitHub Profile
@sobhardwaj
sobhardwaj / .angular-htaccess.md
Created November 6, 2020 19:12 — forked from julianpoemp/.angular-htaccess.md
Optimal .htaccess configuration for Angular 9, Angular 8, Angular 7, Angular 6, Angular 5 (and older) app in production incl. fix for the angular browser caching issue.

New generator

I created a new htaccess generator for angular apps that makes it easier for you to create the optimal htaccess file: https://julianpoemp.github.io/ngx-htaccess-generator/

The goal of this generator is to make the configuration process much easier. To make this possible I created a kind of interview mode with some questions. As an additional feature the generator supports adding exclusions for example if you have installed a blog in a subdirectory of your web application.

The generator 😁: https://julianpoemp.github.io/ngx-htaccess-generator/ The project: https://github.com/julianpoemp/ngx-htaccess-generator Place for issues and bug reports: https://github.com/julianpoemp/ngx-htaccess-generator/issues

abstract class AuthService {
// Subject tracks the current token, or is null if no token is currently
// available (e.g. refresh pending).
private subject = new BehaviorSubject<string|null>(null);
readonly refreshToken: Observable<any>;
readonly token: Observable<string>;
constructor() {
// refreshToken, when subscribed, gets the new token from the backend,
{
"git.enableSmartCommit": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"python.jediEnabled": false,
"typescript.updateImportsOnFileMove.enabled": "always",
"editor.tokenColorCustomizations": {
"comments": "#c07c3c"
},
@sobhardwaj
sobhardwaj / Large-app-how-to.md
Created April 30, 2020 21:03 — forked from cuibonobo/Large-app-how-to.md
How to structure a large application in Flask. Taken from the Flask wiki: https://github.com/mitsuhiko/flask/wiki/Large-app-how-to

Here's an example application that uses the pattern detailed below: https://github.com/tantastik/talent-curator


This document is an attempt to describe the first step of a large project structure with flask and some basic modules:

  • SQLAlchemy
  • WTForms

Please feel free to fix and add your own tips.