Note: This guide is for Lando running in WSL2 and IntelliJ IDEA (or PhpStorm) running in Windows 10+.
Most steps are from https://docs.lando.dev/guides/setup-lando-on-windows-with-wsl-2.html
# Set correct dev host to Windows
Note: This guide is for Lando running in WSL2 and IntelliJ IDEA (or PhpStorm) running in Windows 10+.
Most steps are from https://docs.lando.dev/guides/setup-lando-on-windows-with-wsl-2.html
# Set correct dev host to Windows
wget https://github.com/lando/lando/releases/download/v3.6.0/lando-x64-v3.6.0.deb
dpkg -i --ignore-depends=docker-ce lando-x64-v3.6.0.deb
This guide aims to be the reference for setting up Lando and PhpStorm tools on a WSL2 environment.
This assumes your project:
\\wsl$\Ubuntu\home\[user]\dev\my-demo-project
)lando init
) and runs (lando start
)lando composer install
)This guides relies on Docker for Windows, using the WSL2 based engine, and setup with WSL integration (Resources > WSL Integration
). Unfortunately I didn't find a solution to do without it and only rely on WSL's Docker.
function bitsToCharacter(bits: string): string { | |
console.assert(bits.match(/^[01]{6}$/) !== null, 'Bits must only contain 6 0 and 1 characters (width is 2 and height is 3)') | |
return String.fromCharCode(parseInt(bits.split('').reverse().join(''), 2) + 32) | |
} |
import {encode} from "uqr" | |
let message = 'Lorem' | |
const {data: matrix} = encode(message) | |
function getSafeMatrixItemFlag(matrix: Array<Array<boolean>>, i: number, j: number): boolean { | |
if (!matrix[i]) { | |
return false | |
} |
import Jimp from 'jimp'; | |
// const imageUrl = 'https://i.scdn.co/image/ab67616d00001e02e8b066f70c206551210d902b'; | |
// const imageUrl = 'https://i.scdn.co/image/ab67616d00001e02921f7aa6349a070b6f26b3ff'; | |
// const imageUrl = 'https://i.scdn.co/image/ab67616d0000b2734f70220d934183ce2db16d6a'; | |
const imageUrl = 'https://i.scdn.co/image/ab67616d00001e022eae3ae708586c21b6eee710'; | |
const outputImagePath = './output.jpg'; | |
type RGB = [number, number, number]; | |
type Grayscale = number; |
import Jimp from "jimp"; | |
const imageUrl = 'https://i.scdn.co/image/ab67616d00001e02e8b066f70c206551210d902b'; | |
const outputImagePath = './output.jpg'; | |
type RGB = [number, number, number]; | |
type ColorMapping = { [color: string]: RGB }; | |
// Colors mapping to their RGB values | |
const predefinedColors: ColorMapping = { |