This is a demonstration of using Preact without any build tooling. The library is linked from the esm.sh CDN, however a standalone JS file exporting HTM + Preact + Hooks can also be downloaded here.
Politics, celebrity gossip, business headlines, tech punditry, odd news, and user-generated content.
These are the chew toys that have made me sad and tired and cynical.
Each, in its own way, contributes to the imperative that we constantly expand our portfolio of shallow but strongly-held opinions about nearly everything. Then we're supposed to post something about it. Somewhere.
From businesses we've never heard of, to countries we've never visited, to infants who've had the random misfortune to be born into a family that's on TV -- it's all grist for obvious jokes and shortsighted commentary that, for at least a few minutes, helps both the maker and the consumer feel a little less bored, a little less vulnerable, and a little less disconnected. For a minute, anyway, it makes us feel more alive. Does me, anyway.
// pseudo code using angular flavor as example | |
@Injectable({ providedIn: 'root' }) | |
export class SomeHttpInterceptor implements HttpInterceptor { | |
_mobileOffline = new MobileOffline(); | |
constructor(private mobileStorage: MobileAPIStorageService) {} | |
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { | |
if (!this._mobileOffline.isOnline) { |
#1F1C18, #8E0E00, #C3002F, #FFFFFF, #3E403F, #FFFFFF, #DD0031, #DD0031, #C3002F, #FFFFFF |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
Postman | API Development Environment https://www.getpostman.com
Insomnia REST Client - https://insomnia.rest/
Features | Insomnia | Postman | Notes |
---|---|---|---|
Create and send HTTP requests | x | x | |
Authorization header helpers | x | x | Can create "Authorization" header for you for different authentication schemes: Basic, Digest, OAuth, Bearer Token, HAWK, AWS |
/** | |
* When manually subscribing to an observable in a view component, developers are traditionally required | |
* to unsubscribe during ngOnDestroy. This utility method auto-configures and manages that relationship | |
* by watching the DOM with a MutationObserver and internally using the takeUntil RxJS operator. | |
* | |
* Angular 7 has stricter enforcements and throws errors with monkey-patching of view component life-cycle methods. | |
* Here is an updated version that uses MutationObserver to accomplish the same goal. | |
* | |
* @code | |
* |
1 - install GPG tools : https://gpgtools.org/
2 - Create new key for your github email
3 - Add key to git on your local machine: git config --global user.signingkey YOURKEY
4 - configure git to sign all commits: git config --global commit.gpgsign true
5 - add to the bottom of ~/.gnupg/gpg.conf
: (create the file if it not exists)
//DEFINE REGEX - valid input range is 100 thru 599 | |
var regEx = /^[1-5][0-9][0-9]$/ | |
//TEST REGEX | |
regEx.test(99) | |
=>false | |
regEx.test(100) | |
=>true |