This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//simple partial application | |
//-------------------------- | |
var partial = function() { | |
var fn = arguments[0]; | |
var slice = Array.prototype.slice; | |
var args = slice.call(arguments, 1); | |
return function() { | |
return fn.apply(null, args.concat(slice.call(arguments, 0))); | |
}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mount NAS using smb/cifs (needs cifs-utils to be installed) | |
sudo mount -t cifs -o username=XXX //192.168.1.XXX/edo_backup /mnt/NAS_edo | |
# list config firewalld (CentOS) | |
sudo firewall-cmd --list-all-zones | |
# add port/service firewalld | |
sudo firewall-cmd --zone=public --add-port=3000/tcp | |
# make running changes persistent (through reboots) | |
sudo firewall-cmd --runtime-to-permanent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ua = window?.navigator?.userAgent; | |
if (ua && (ua.indexOf('MSIE') > -1 || ua.indexOf('Trident/') > -1)) { | |
console.log('IE 😢'); | |
} else { | |
console.log('Happy surfing! 🙂') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
document.querySelector('.tp-backdrop').style.display = "none" | |
document.querySelector('.tp-modal').style.display = "none" | |
document.querySelector('.tp-modal-open').setAttribute('style', 'overflow: scroll !important') | |
})() |