This file contains hidden or 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
| // ==UserScript== | |
| // @name Better FauxHammer | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Remove all the bloat from FauxHammer articles | |
| // @author https://www.reddit.com/user/Galithiel/ | |
| // @match https://www.fauxhammer.com/* | |
| // @exclude https://www.fauxhammer.com/ | |
| // @icon https://www.google.com/s2/favicons?domain=fauxhammer.com | |
| // @grant none |
This file contains hidden or 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
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Support\Facades\Auth; | |
| class DenyIfAuthenticated | |
| { | |
| /** | |
| * Handle an incoming request. | |
| * |
This file contains hidden or 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 { | |
| HTTP_INTERCEPTORS, HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, | |
| HttpRequest | |
| } from "@angular/common/http"; | |
| import {Injectable} from "@angular/core"; | |
| import {Observable} from "rxjs/Observable"; | |
| import {_throw} from "rxjs/observable/throw"; | |
| import {Router} from "@angular/router"; | |
| import {EmptyObservable} from 'rxjs/observable/EmptyObservable'; |
This file contains hidden or 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
| export class BlogPostService { | |
| constructor(private http: HttpClient) { | |
| } | |
| getBlogPost(blogPostId): Observable<BlogPost> { | |
| const URL = `http://api.website.com/blogpost/${blogPostId}`; | |
| return this.http.get<BlogPost>(URL); | |
| } | |
| } |
This file contains hidden or 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
| export class BlogPostShowComponent implements OnInit { | |
| public blogPost: BlogPost; | |
| constructor(private route: ActivatedRoute, | |
| private blogPostService: BlogPostService) { | |
| } | |
| ngOnInit() { | |
| this.blogPostService.getBlogPost(this.route.snapshot.paramMap.get('id')).subscribe(blogPost => { | |
| this.blogPost = blogPost; |