Skip to content

Instantly share code, notes, and snippets.

View fyodorio's full-sized avatar
💻
Sitting here, making some stuff...

Fyodor fyodorio

💻
Sitting here, making some stuff...
View GitHub Profile
@NathanWalker
NathanWalker / http.interceptor.ts
Last active February 23, 2021 18:43
Simple offline handling with NativeScript using Angular as example
// 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) {
@merlinmann
merlinmann / Better.md
Last active June 23, 2025 10:13
Original version of Merlin Mann's essay, "Better."

Better

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.

Preact, Without Build Tools

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.

@faustinoaq
faustinoaq / myAngular.html
Last active July 1, 2025 14:07
Front-end libraries (React, Vue, Angular) and the basic principles of how they work, all in a single file using pure JavaScript (VanillaJS).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Angular from Scratch</title>
<style>
.my-component {
font-family: Arial, sans-serif;