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
/** | |
* Wrapper for {@link AccountManager} with improved functionality and RxJava support. | |
* | |
* Originally found from <a href="https://github.com/novoda/spikes/tree/master/gertherb/android/src/main/java/com/gertherb/authentication">github.com/spikes/gertherb</a>, | |
* and modified to work with a newer RxJava version, using {@link Single} instead of {@link rx.Observable}. | |
* | |
* @author Ataul Munim | |
* @author Santeri Elo | |
*/ | |
public class BetterAccountManager { |
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
background: linear-gradient(180deg, #fbd3e9, #bb377d, #00c9ff, #92fe9d); | |
background-size: 800% 800%; | |
-webkit-animation: mellow-bg 59s ease infinite; | |
-moz-animation: mellow-bg 59s ease infinite; | |
-o-animation: mellow-bg 59s ease infinite; | |
animation: mellow-bg 59s ease infinite; | |
@-webkit-keyframes mellow-bg { | |
0%{background-position:50% 0%} |
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 { ActivatedRoute, NavigationEnd, Router, RouterEvent, RouterLinkWithHref, UrlTree } from '@angular/router'; | |
import { | |
Directive, | |
EventEmitter, | |
HostBinding, | |
HostListener, | |
Input, | |
isDevMode, | |
OnChanges, | |
OnDestroy, |
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
export class AppModule { | |
constructor(private router: Router, private viewportScroller: ViewportScroller) { | |
// Disable automatic scroll restoration to avoid race conditions | |
this.viewportScroller.setHistoryScrollRestoration('manual'); | |
this.handleScrollOnNavigation(); | |
} | |
/** | |
* When route is changed, Angular interprets a simple query params change as "forward navigation" too. |
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
{ | |
"captainVersion": "2", | |
"documentation": "https://hub.docker.com/r/postgis/postgis", | |
"displayName": "Postgres with PostGIS", | |
"description": "PostGIS is a spatial database extender for PostgreSQL object-relational database.", | |
"dockerCompose": { | |
"version": "3.3", | |
"services": { | |
"$$cap_appname-db": { | |
"image": "postgis/postgis:$$cap_postgres_version", |
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
{ | |
"captainVersion": "2", | |
"documentation": "https://hub.docker.com/r/peterevans/osrm-backend/", | |
"displayName": "Open Source Routing Machine", | |
"description": "The Open Source Routing Machine in a box! This is the routing engine backend.", | |
"dockerCompose": { | |
"version": "3.3", | |
"services": { | |
"$$cap_appname": { | |
"image": "peterevans/osrm-backend:$$cap_osrm_version", |
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
export type MotionBoxProps = Omit<FlexProps, keyof MotionProps> & | |
MotionProps & { | |
as?: React.ElementType; | |
}; | |
export const MotionBox = motion.custom( | |
forwardRef<MotionBoxProps, 'div'>((props, ref) => { | |
const chakraProps = Object.fromEntries( | |
// do not pass framer props to DOM element | |
Object.entries(props).filter(([key]) => !isValidMotionProp(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
/** | |
* Takes an array of any type (object or primitive) and filters it distinctively. | |
* Duplicate values are removed, determined by the compare function. | |
* | |
* @param array Array to filter | |
* @param compare Compare function to compare objects for equality | |
* @returns Filtered array with distinct values | |
*/ | |
export function filterDistinct<T>( | |
array: T[], |
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
# Config for Intel WiFi6 AX201 | |
ctrl_interface=/var/run/hostapd | |
ctrl_interface_group=0 | |
logger_syslog=-1 | |
logger_syslog_level=2 | |
logger_stdout=-1 | |
logger_stdout_level=1 | |
ssid=AwesomeWifi |
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 { useNavigate } from "react-router-dom"; | |
import useAuth from "./AuthContext"; | |
import React, { useEffect } from "react"; | |
/** | |
* Redirects user to another page if not authenticated. | |
* @param redirectTo Path to redirect to | |
*/ | |
export function useUnauthenticatedRedirect(redirectTo: string = "/") { | |
const navigate = useNavigate(); |
OlderNewer