Skip to content

Instantly share code, notes, and snippets.

@jaichandra
jaichandra / gist:ea9d4b2223ef7991007d7ae03c7044e3
Created April 27, 2025 14:04
Setup Tailscale with Docker compose
---
version: "3.7"
services:
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
hostname: tailscale-nas
environment:
- TS_AUTHKEY=<AUTHKEY HERE...>
- TS_STATE_DIR=/var/lib/tailscale
@jaichandra
jaichandra / gist:fb65938c823db07044b72196abfc9ff7
Created April 11, 2025 17:33
Running npm install in docker with kubevirt VM based on debian
Running NPM install in a Docker container which is running on a KubeVirt VM (based on debian)
NPM install fails, if you have below libs in package.json
@pact-foundation/pact
@pact-foundation/pact-node
canvas
image-webpack-loader
Fix:
These libs need additional dependencies to be installed at the system level.
Add below script to your Dockerfile.
@jaichandra
jaichandra / dieassert.js
Created November 15, 2020 15:56 — forked from jeromeetienne/dieassert.js
a console.assert which actually stop the execution
/**
* A console.assert which actually stop the exectution.
* default console.assert() is a plain display, such as console.log() or console.error();
* It doesnt stop the execution like assert() is meant to do. This is a little code to
* "workaround this limitation" :) thanks @jensarp
*
* Usage:
* console.assert(foo === bar); // Will throw if not equal
* console.assert(foo === bar, 'Dude, foo does not equal bar'); // Will throw with custom error message
*
@jaichandra
jaichandra / filemerge-sourcetree.txt
Created March 1, 2016 04:28
filemerge not opening in sourcetree
This issue was due to xcode-select developer directory pointing to /Library/Developer, which only contained the folder CommandLineTools. To this end, the error message is complaining about not the directory not being the same as Xcode.
Two tested solutions:
(Re) Install Xcode.
Point xcode-select to the Xcode Developer Directory using the following command:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer