π
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success π | |
console.log(response); | |
} catch (error) { | |
// Error π¨ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LinqKit; | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Diagnostics; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cookies from 'js-cookie'; | |
import { BehaviorSubject } from 'rxjs'; | |
// How to Set Expiry Time (TTL) for LocalStorage With Javascript | |
// source: https://www.sohamkamani.com/blog/javascript-localstorage-with-ttl-expiry | |
const createLocalStorage = () => { | |
return { | |
get: (key) => { | |
const itemStr = localStorage.getItem(key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EmailAccount | |
{ | |
public string Username { get; set; } = default!; | |
public string Password { get; set; } = default!; | |
public string Email { get; set; } = default!; | |
public string DisplayName { get; set; } = default!; | |
} |