Install Ubuntu from the Microsoft Store or via WSL.
sudo apt install curl wget unzip zip build-essential| git config --global user.name "Avisek Das" | |
| git config --global user.email "avisekdas555@gmail.com" | |
| git config --global core.autocrlf false | |
| git config --global core.fileMode false |
| @echo off | |
| setlocal EnableExtensions EnableDelayedExpansion | |
| REM ================================================================ | |
| REM Force Details View / General Items Template - System-Wide | |
| REM ================================================================ | |
| REM Disables Windows folder type discovery and forces every folder | |
| REM (including MTP devices and network locations) to use the | |
| REM General Items template in Details view. | |
| REM |
| {pkgs, ...}: { | |
| nixpkgs.overlays = [ | |
| (final: prev: { | |
| macos-audio-devices = prev.writeShellScriptBin "macos-audio-devices" '' | |
| export PATH="${prev.nodejs}/bin:${prev.pnpm}/bin:$PATH" | |
| exec ${prev.pnpm}/bin/pnpx macos-audio-devices "$@" | |
| ''; | |
| }) | |
| ]; |
This is by no means complete, please add to it and share your own!
Shallow clone nixpkgs when the full Git history isn't always necessary - this can speed up build times.
The only issue I've had is nix-index-database not working well with the shallow clone. Other than that, no issues after running for a few months.
Fixes TypeScript editors truncating types with "... N more" by increasing defaultMaximumTruncationLength from 160 to 16000 and defaultHoverMaximumTruncationLength from 500 to 50000.
Cursor:
sed -i '' -e 's/var defaultMaximumTruncationLength = 160;/var defaultMaximumTruncationLength = 16000;/' -e 's/var defaultHoverMaximumTruncationLength = 500;/var defaultHoverMaximumTruncationLength = 50000;/' '/Applications/Cursor.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js'| function constrain(value, min, max) { | |
| return Math.min(Math.max(value, min), max) | |
| } |
| function copyRecursively(sourceDir: string, destinationDir: string): void { | |
| const files = fs.readdirSync(sourceDir) | |
| if (!fs.existsSync(destinationDir)) | |
| fs.mkdirSync(destinationDir, { recursive: true }) | |
| files.forEach(file => { | |
| const sourceFile = path.join(sourceDir, file) | |
| const destinationFile = path.join(destinationDir, file) | |
| /** | |
| * Color conversion algorithms (RGB, HSL, XYZ, LAB, LCH) | |
| * Derived from jQuery Color Picker Sliders by István Ujj-Mészáros | |
| * Licensed under the Apache License 2.0 | |
| * https://github.com/istvan-ujjmeszaros/jquery-colorpickersliders | |
| */ | |
| export function rgbToHsl(rgb) { | |
| const r = rgb.r / 255 | |
| const g = rgb.g / 255 |
| // https://codepen.io/dgca/pen/WoJoNB | |
| export const ResizeObserver = window.ResizeObserver || class ResizeObserver { | |
| constructor(callback) { | |
| this.observables = []; | |
| // Array of observed elements that looks like this: | |
| // [{ | |
| // el: domNode, | |
| // size: {height: x, width: y} | |
| // }] | |
| this.boundCheck = this.check.bind(this); |