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
@Injectable() | |
export class AuthInterceptor implements HttpInterceptor { | |
constructor(private authService: AuthService, private localStorageService: LocalStorageService ) {} | |
intercept(req: HttpRequest<any>, next: HttpHandler) { | |
const authRequest = req.clone({}); | |
return next.handle(authRequest); | |
return next.handle(authRequest).pipe( | |
filter(event => event instanceof HttpResponse), | |
tap((event: HttpResponse<any>) => { |
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
Shader "Unlit/WorldMapHighlight" | |
{ | |
Properties{ | |
_Color ("Tint", Color) = (0, 0, 0, 1) | |
_FullColor ("Full Color", Color) = (0, 0, 0, 1) | |
_MainTex ("Texture", 2D) = "white" {} | |
// _HighlightUV ("highlightUV", Vector) = (0, 0, 0, 1) | |
_HighlightUV ("Highlight", Color) = (0, 0, 0, 1) | |
} |
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 UnityEngine; | |
using System.Collections; | |
public class CameraShake : MonoBehaviour | |
{ | |
// Transform of the camera to shake. Grabs the gameObject's transform | |
// if null. | |
public Transform camTransform; | |
// How long the object should shake for. |
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
module.exports = (args) => { | |
return _.chain(args).map(arg => { | |
let argProps = arg.replace('--', '').split('='); | |
return argProps; | |
}).fromPairs().value(); | |
}; |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'replace' | |
}) | |
export class ReplacePipe implements PipeTransform { | |
transform(value: string, expr: any, arg2: string): any { | |
if (!value) | |
return value; |
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
let pollDelay = 750; | |
function () { | |
this.m = _.memoize(function (time) { | |
return time + pollDelay; | |
}); | |
this.t = 0; | |
this.rm = _.noop; | |
this.getEvents = function () { |
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
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
div { | |
width: 400px; | |
height: 400px; | |
border: 1px dashed green; |
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
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="apple-touch-icon" href="apple-touch-icon.png"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<p class="whiteonblack">Lorem ipsum <span>dolor</span> sit amet, consectetur adipisicing elit. Blanditiis voluptate modi magni, quas pariatur iste possimus illo officia doloribus earum delectus necessitatibus voluptas consequatur accusantium obcaecati, accusamus labore tempore atque.</p> | |
NewerOlder