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
// This is the canonical layout file for the Quantum project. If you want to add another keyboard, | |
// this is the style you want to emulate. | |
#include "planck.h" | |
#include "action_layer.h" | |
#include "audio.h" | |
#include "eeconfig.h" | |
extern keymap_config_t keymap_config; |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "ES2015", | |
"module": "commonjs", | |
"declaration": true, | |
"sourceMap": true, | |
"outDir": "./dist/", | |
"rootDir": "./src/", | |
"removeComments": true, | |
"strict": true, |
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
/// <reference path="../node_modules/@types/node/index.d.ts" /> | |
'use strict' | |
import { newStream, tap, runEffects } from '@most/core'; | |
import { newDefaultScheduler } from '@most/scheduler'; | |
import { Sink, Scheduler } from 'most'; | |
import { IncomingMessage, ServerResponse, createServer } from 'http'; | |
interface Ctx { |
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
sudo rm -rf /Library/Java/* | |
sudo rm -rf /Library/PreferencePanes/Java* | |
sudo rm -rf /Library/Internet\ Plug-Ins/Java* |
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
/// <reference path="../node_modules/@types/node/index.d.ts" /> | |
'use strict'; | |
import { fromStream } from './index'; | |
import { createReadStream } from 'fs'; | |
import 'rxjs/add/operator/reduce'; | |
const stream = createReadStream('./example.ts', {encoding: 'utf-8'}); | |
const obs = fromStream(stream, ['data'], ['error'], ['end', 'close']); |
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
/* | |
This will turn your arrays into a keyed object like: | |
{ | |
1: <Obj 1>, | |
2: <Obj 2>, | |
3: <Obj 3> | |
} | |
Newest values will over-write old values. | |
*/ | |
const keyedSource = source.scan((acc, arr) => _.assign(acc, _.keyby(arr, 'id')); |
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 { Action, Effect } from "@ngrx/store"; | |
import { Observable } from "rxjs/Observable"; | |
import { of } from "rxjs/observable/of"; | |
import "rxjs/add/operator/switchMap"; | |
import "rxjs/add/operator/takeUntil"; | |
import "rxjs/add/operator/filter"; | |
import "rxjs/add/operator/map"; | |
// For POC typechecking force payloads on Actions. | |
export interface CancellableAction<T> extends Action { |
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
// This is where the magic is | |
export class PayloadAction<T, P = undefined> { | |
readonly type: T; | |
constructor(public readonly payload: P) {}; | |
} | |
// These would be existing interfaces | |
export interface SomePayload { | |
stuff: string; | |
things: number[]; |
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
function repeat(n: number): Observable<number> { | |
return of(n).pipe( | |
mergeMap(o => of(o).pipe( | |
merge(repeat(n+1)) | |
)) | |
); | |
} | |
repeat(0).subscribe(n => console.log('Got me a number', n), e => console.error(e), () => console.log('All done')); |
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 enum SomeIds { | |
ONE = 'one', | |
TWO = 'two', | |
} | |
export enum SomeType { | |
RED = 'red', | |
BLUE = 'blue', | |
} |