Skip to content

Instantly share code, notes, and snippets.

View jeserkin's full-sized avatar

Eugene Serkin jeserkin

View GitHub Profile
@jeserkin
jeserkin / java_version_switcher.ps1
Last active October 16, 2023 09:04
Java version switcher
# In case you have different JDK versions on PC and wish to switch between them easily
# Current pattern is JAVA\d+_HOME
# So make sure you have ENV variables like JAVA17_HOME, etc.
if (-not $env:JAVA_HOME) { $env:JAVA_HOME = [Environment]::GetEnvironmentVariable('JAVA_HOME', 'User') }
Write-Host "(Current: $env:JAVA_HOME)"
# Alternative to OGV
#$javaVersion = Read-Host "Select JAVA version: "
#$javaVersion = $javaVersion.Trim()
@jeserkin
jeserkin / how-to-add-image-to-gist.md
Created April 26, 2021 11:06 — forked from mroderick/how-to-add-image-to-gist.md
How to add an image to a gist

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
return of(null).pipe(
tap(() => console.log(123)),
flatMap(() => this.router.events),
tap(() => console.log(7892)),
filter(event => event instanceof NavigationEnd)
@jeserkin
jeserkin / jest.config.js
Last active April 18, 2020 12:48
Jest config to support testing in both IDE and CLI
module.exports = {
testMatch: ['**/+(*.)+(spec).+(ts|js)?(x)'],
transform: {
'^.+\\.(ts|js|html)$': 'ts-jest'
},
resolver: '@nrwl/jest/plugins/resolver',
moduleFileExtensions: ['ts', 'js', 'html'],
collectCoverage: true,
coverageReporters: ['html', 'lcov', 'text'],
verbose: true,
{
"planet": "Earth"
}
{
"planet": "Earth"
}
@jeserkin
jeserkin / build.gradle
Last active February 28, 2020 21:38
Gradle and JUnit setup
apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// compileJava.options.fork = true
// compileJava.options.forkOptions.executable = /path_to_javac
repositories {
mavenCentral()
09:42:23 > cypress@3.3.2 postinstall /build/SECRET/node_modules/cypress
09:42:23 > node index.js --exec install
09:42:23
09:42:23 Installing Cypress (version: 3.3.2)
09:42:23
09:42:23 [?25l[07:42:22] Downloading Cypress [started]
09:42:23 [07:42:23] Downloading Cypress 0% 0s [title changed]
09:42:24 [07:42:23] Downloading Cypress 2% 6s [title changed]
09:42:24 [07:42:24] Downloading Cypress 3% 9s [title changed]
09:42:24 [07:42:24] Downloading Cypress 3% 12s [title changed]
export class Bungo {
constructor(private service1: Sevice1,
private service2: Sevice2) {
}
findAllRowsBasedOnOtherRows(otherRows: string[]): string[] {
this.service1.findAllRows$()
.pipe(
flatMap((service1Rows: Service1Row[]) => {
return this.service2.finalAllRows$()