Skip to content

Instantly share code, notes, and snippets.

@trevor-hackett
trevor-hackett / File-based routing with react-router-dom
Last active May 30, 2022 19:58
File based routes with react-router-dom (v6.4 and above) and Vite
└───src
| main.tsx
│ routes.tsx
└───pages
│ _app.tsx
│ 404.tsx
│ index.tsx
│ posts.tsx
@trevor-hackett
trevor-hackett / terminal
Created March 21, 2020 23:16
Add link to allow terminal and vscode to find dotnet-sdk when installed as a snap
sudo ln -sv /snap/dotnet-sdk/current/dotnet /usr/local/bin/dotnet
@trevor-hackett
trevor-hackett / app.module.ts
Last active October 29, 2021 21:09
Example of using ngx-translate with ngx-toastr using a custom component
export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
}
@NgModule({
declarations: [
AppComponent,
TranslateToast,
],
imports: [