Skip to content

Instantly share code, notes, and snippets.

View j-ulrich's full-sized avatar

Jochen Ulrich j-ulrich

View GitHub Profile
@j-ulrich
j-ulrich / nvm+VSCode.md
Last active February 17, 2026 12:09
Integrating nvm (https://github.com/nvm-sh/nvm) and Visual Studio Code

Integrating nvm and Visual Studio Code

Respecting the .nvmrc in the integrated terminal

  1. Create a variant of the nvm-exec script which does not fail if there is no .nvmrc present. I called it nvm-exec-2 (see below).
  2. Place that script inside the .nvm directory in your user's home directory (~/.nvm) and make it executable:
    chmod +x ~/.nvm/nvm-exec-2
    
  3. Modify the "profiles" of the integrated terminal of VSCode in the settings.json. The keys of the corresponding settings are:
@j-ulrich
j-ulrich / replaysubject-quirk.js
Last active April 5, 2024 14:02
ThinkRX: next'ing a ReplaySubject within a subscription to that ReplaySubject emits value immediately
const { rxObserver } = require('api/v0.3');
const { ReplaySubject } = require('rxjs');
const myReplaySubj = new ReplaySubject();
myReplaySubj.next(1);
myReplaySubj.next(2);
myReplaySubj.next(3);
let didEmitNewValues = false;
@j-ulrich
j-ulrich / conanfile.txt
Last active February 11, 2023 16:17
Qbs Conan ModuleProvider
[requires]
poco/1.6.1
yajl/2.1.0
expat/2.2.0
@j-ulrich
j-ulrich / generateProjects.sh
Last active August 30, 2019 08:12
Testing performance of Qbs resolve
#!/bin/bash
PROJECTS_BASE_DIR=${1:-"projects"}
function generateQbsProject
{
python3 generateQbsProject.py $1 $2 "${PROJECTS_BASE_DIR}/$1-$2-direct" --depends-mode direct
python3 generateQbsProject.py $1 $2 "${PROJECTS_BASE_DIR}/$1-$2-implicit" --depends-mode implicit
python3 generateQbsProject.py $1 $2 "${PROJECTS_BASE_DIR}/$1-$2-explicit" --depends-mode explicit
@j-ulrich
j-ulrich / xml2json.xslt
Created October 29, 2012 23:55
Indenting version of the xml2json-xslt from http://code.google.com/p/xml2json-xslt/
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Indenting version by Jochen Ulrich, 2012
-->
<!--
Copyright (c) 2006,2008 Doeke Zanstra
All rights reserved.