Skip to content

Instantly share code, notes, and snippets.

View hrueger's full-sized avatar
😃

Hannes Rüger hrueger

😃
View GitHub Profile
@hrueger
hrueger / dice.ts
Last active August 28, 2022 19:29
const rounds = 100000000;
import cluster from 'node:cluster';
import { cpus } from 'node:os';
import process from 'node:process';
const numCPUs = cpus().length;
const roundsPerCPU = Math.round(rounds / numCPUs);
@hrueger
hrueger / screenshot.md
Created October 24, 2021 07:35
Create a High-Res Screenshot of h2rgear.com

Create a High-Res Screenshot of h2rgear.com

  1. Use Firefox
  2. Open your plan in h2rgear.com
  3. Open the Dev Tools (Ctrl + Shift + I)
  4. Run document.querySelector(".pb-16.px-6.fixed.bottom-0.right-0.z-20.flex.w-screen.justify-between.items-end").remove();document.querySelector(".px-6.py-2.w-screen.overflow-auto.bg-white.border-t-2.border-solid.border-gray-300.z-20.fixed.bottom-0.right-0.flex.justify-between.items-center").remove();
  5. Run :screenshot --dpr 4
  6. For even better screenshots increase the number behind the --dpr flag
@hrueger
hrueger / german_lastnames.txt
Created October 7, 2020 16:08
German lastnames
Müller
Schmidt
Schneider
Fischer
Weber
Meyer
Wagner
Schulz
Becker
Hoffmann
@hrueger
hrueger / german_firstnames.txt
Created October 7, 2020 16:03
German firstnames
Aaliyah
Aaron
Abby
Abigail
Ada
Adam
Adelina
Adem
Adrian
Adriana
@hrueger
hrueger / home.component.ts
Created June 8, 2020 13:32
lib-jitsi-meet tests
import { Component } from "@angular/core";
import { AuthenticationService } from "../../_services/authentication.service";
import * as JitsiMeetJS from "../../_libs/lib-jitsi-meet.min.js";
@Component({
selector: "app-home",
templateUrl: "./home.component.html",
styleUrls: ["./home.component.scss"],
})
export class HomeComponent {

Fix node-gyp MSBuild.exe ENOENT error

For VS 2017

  1. Download VS Buildtools 15.0 from here under the 2017 Tab
  2. Install it with the windows 10 SDK
  3. npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe"

For VS 2019

npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"