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 testBeatenGame(int $gameId, string $user, bool $postBeaten): array | |
{ | |
$totalProgressions = Achievement::where('GameID', $gameId) | |
->where('type', AchievementType::Progression) | |
->where('Flags', AchievementFlag::OfficialCore) | |
->count(); | |
$progressionTierAchievements = Achievement::where('Achievements.GameID', $gameId) | |
->whereIn('Achievements.type', [AchievementType::Progression, AchievementType::WinCondition]) | |
->where('Achievements.Flags', AchievementFlag::OfficialCore) |
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 type { VFC } from "react"; | |
export const VeryLargeImage: VFC = () => { | |
return ( | |
<img | |
width="99999" | |
height="99999" | |
style={{ | |
pointerEvents: "none", | |
position: "absolute", |
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
// ==UserScript== | |
// @name RA_LockedColored | |
// @version 0.1 | |
// @author Xymjak | |
// @match http://localhost:64000/game/* | |
// @match http://localhost:64000/achievement/* | |
// @match https://retroachievements.org/game/* | |
// @match https://retroachievements.org/achievement/* | |
// @icon https://www.google.com/s2/favicons?domain=retroachievements.org | |
// @grant none |
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 = { | |
parserOptions: { | |
ecmaVersion: 2020, | |
sourceType: "module", | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
}, | |
env: { | |
browser: 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
// Obviously, don't ship this to production. I have this behind an environment flag in _app.tsx, like so: | |
/* | |
import dynamic from "next/dynamic"; | |
let DynamicCurrentBreakpointDisplay; | |
if (process.env.NODE_ENV === "development") { | |
DynamicCurrentBreakpointDisplay = dynamic(() => | |
import("../../app/core/components/CurrentBreakpointDisplay").then( | |
(m) => m.CurrentBreakpointDisplay | |
) |
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 * as prompts from 'prompts'; | |
import { dasherize } from '@angular-devkit/core/src/utils/strings'; | |
import { prompt } from 'enquirer'; | |
import { spawn } from 'child_process'; | |
export type LibraryType = 'feature' | 'ui' | 'data-access' | 'util'; | |
export type LibraryDomain = 'app-specific' | 'grouped app-specific' | 'shared'; | |
export type SchematicType = 'angular' | 'react' | 'workspace'; | |
export interface UserResponses { |
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 = { | |
globals: { | |
'ts-jest': { | |
tsConfig: './tsconfig.spec.json', | |
stringifyContentPathRegex: '\\.html$', | |
astTransformers: [ | |
require.resolve('jest-preset-angular/InlineHtmlStripStylesTransformer') | |
] | |
} | |
}, |
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 { Component, OnInit } from '@angular/core'; | |
import { Observable } from 'rxjs'; | |
import { AwesomeEntity, AwesomeEntitiesQuery } from './+state'; | |
@Component({ | |
selector: 'app-stateful-component', | |
template: /* html */ ` | |
<app-presentational-button></app-presentational-button> | |
` |
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 { Spectator, SpyObject, createTestComponentFactory } from '@netbasal/spectator/jest'; | |
import { of } from 'rxjs'; | |
import { StatefulComponent } from './stateful.component'; | |
import { AwesomeEntitiesQuery } from './+state'; | |
describe('Component: StatefulComponent', () => { | |
let query: SpyObject<AwesomeEntitiesQuery>; | |
let spectator: Spectator<StatefulComponent>; |
NewerOlder