Skip to content

Instantly share code, notes, and snippets.

View glsorre's full-sized avatar

Giuseppe Sorrentino glsorre

View GitHub Profile
@glsorre
glsorre / .gitignore
Last active January 26, 2024 21:07
A functional boilerplate for https://screeps.com with creeps based on the fsm pattern
.history
@glsorre
glsorre / keychain.ps1
Last active May 23, 2022 05:23
Windows Subsystem for Linux: never prompt ssh passphrase again
$credentials = Get-StoredCredential -Target sshpassphrase
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($credentials.Password)
$passphrase = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
C:\Windows\System32\wsl.exe -u [YOUR_WSL_USERNAME] -d [YOUR_DISTRIBUTION] /home/[YOUR_WSL_USERNAME]/wslu/keychain.sh $passphrase
@glsorre
glsorre / readme.md
Last active December 15, 2023 12:45
Basic javascript thermostat to be used with nodered

Basic javascript thermostat to be used with nodered

Here's the output on the columns there are external temperatures. On the rows internal temperatures.

│       │  -2   │  -1   │   0   │   1   │   2   │   3   │   4   │   5   │   6   │   7   │   8   │   9   │  10   │  11   │  12   │  13   │  14   │  15   │  16   │  17   │
|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|
│  15   │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │ 'MIN' │
@glsorre
glsorre / .gitignore
Last active February 3, 2024 15:52
A printer agnostic, parametric, inspectable and usable clearance test for 3D printing
**/*.stl