Skip to content

Instantly share code, notes, and snippets.

@rsolci
rsolci / .3status.conf
Created July 29, 2016 15:58
My i3 config
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
@rsolci
rsolci / curryMultiply.js
Created April 30, 2018 13:55
A simple example of curried function
const multiply = (...params) => {
if (params.length === 3) {
return params[0] * params[1] * params[2];
} else {
return (...moreParams) => multiply(...[...params, ...moreParams]);
}
};
const curry = fun => {
const parameterCount = fun.length;
@rsolci
rsolci / replaceObjectValues.js
Created August 16, 2018 10:56
Replace all properties from targetO with values from sourceO, returning a new object.
Object.keys(targetO).reduce((memo, key)=>({ ...memo, [key]: key in sourceO ? sourceO[key] : targetO[key] }), {})
@rsolci
rsolci / samba_share_win10_fix.reg
Created April 22, 2022 15:05
Windows 10 not being able to access samba directories
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:00000001