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
{ | |
"name": "NuPhy Air75 V2", | |
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], | |
"layers": [ | |
[ | |
"KC_ESC", | |
"KC_F1", | |
"KC_F2", | |
"KC_F3", | |
"KC_F4", |
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
[alias] | |
co = !"find_and_checkout_branch(){\ | |
for last; do true; done ; \ | |
pattern='^/.*/$' ;\ | |
if [[ $# -eq 1 && $last =~ $pattern ]] ;\ | |
then \ | |
branch_pattern=`echo $last | sed -e 's/^\\///' -e 's/\\/$//'` ;\ | |
branch=`git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | grep -E -i $branch_pattern | head -n1` ;\ | |
if [[ $branch ]] ; then \ | |
git checkout $branch ;\ |
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 { OperatorFunction, SchedulerLike, concat } from "rxjs"; | |
import { async } from "rxjs/internal/scheduler/async"; | |
import { debounceTime, publish, take } from "rxjs/operators"; | |
export function debounceTimeAfter<T>( | |
amount: number, | |
dueTime: number, | |
scheduler: SchedulerLike = async, | |
): OperatorFunction<T, T> { | |
return publish(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 { | |
Directive, | |
Input, | |
OnDestroy, | |
EventEmitter, | |
Output, | |
} from '@angular/core'; | |
import { NgModel } from '@angular/forms'; | |
import { Subscription, Observable } from 'rxjs'; | |
import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; |
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 { Injectable } from "@angular/core" | |
import { ActivatedRoute, ActivatedRouteSnapshot } from "@angular/router" | |
@Injectable({ providedIn: "root" }) | |
export class ParameterService { | |
constructor(private route: ActivatedRoute) { } | |
get(property: string, defaultValue: string = null): string { | |
const value = this.findProperty(this.route.root.snapshot, property) |
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
# https://stackoverflow.com/a/416931 | |
# https://askubuntu.com/a/121075 | |
# load bash_profile from a gist | |
reload() { | |
# Windows | |
# $user_path="$USERPROFILE" | |
# curl -o "$USERPROFILE/.bashrc_gist" -H "Cache-Control: no-cache" https://gist.githubusercontent.com/christo8989/b402707a19fce6d283882f784c327254/raw/.bashrc_gist | |
# source "$USERPROFILE/.bashrc_gist" | |
# Mac / Linux? |
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
// http://www.tomdupont.net/2014/11/net-45-httpclient-is-thread-safe.html | |
// http://www.nimaara.com/2016/11/01/beware-of-the-net-httpclient | |
public static class HttpClientManager | |
{ | |
private static readonly ConcurrentDictionary<string, HttpClient> clients = new ConcurrentDictionary<string, HttpClient>(); | |
private static readonly object lockobj = new Object(); | |
public static HttpClient Get(string url) |
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 { TestBed, inject } from "@angular/core/testing"; | |
import { RouterTestingModule } from "@angular/router/testing"; | |
import { routes } from "../../../../test/mock.routes"; | |
import { LinkService } from "./link.service"; | |
describe("LinkService", () => { | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [RouterTestingModule.withRoutes([ | |
{ |
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
// Optimize svg text --> http://petercollingridge.appspot.com/svg-optimiser | |
// Helpfule Article --> https://css-tricks.com/using-svg | |
// Credit where credit is due --> https://codepen.io/jakob-e/pen/doMoML | |
// SVG Alignment and Aspect Ratio --> http://tutorials.jenkov.com/svg/svg-viewport-view-box.html | |
// Function to create an optimized svg url | |
// Version: 1.0.6 (plus my changes) | |
@mixin svg($svg){ | |
width: 100%; |
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 { Injectable } from '@angular/core'; | |
import { | |
Subject, | |
BehaviorSubject, | |
Subscription } from 'rxjs'; | |
@Injectable() | |
export class GlobalService { | |
private subjects: object = {}; | |
NewerOlder