Skip to content

Instantly share code, notes, and snippets.

View bongofury's full-sized avatar
🏔️
hike to the peak

Edoardo Bianchi bongofury

🏔️
hike to the peak
View GitHub Profile
@bongofury
bongofury / snippet.js
Last active October 4, 2021 08:15
Remove modal cds
(() => {
document.querySelector('.tp-backdrop').style.display = "none"
document.querySelector('.tp-modal').style.display = "none"
document.querySelector('.tp-modal-open').setAttribute('style', 'overflow: scroll !important')
})()
@bongofury
bongofury / isIE.js
Created January 7, 2021 08:42
Super simple IE browser check
const ua = window?.navigator?.userAgent;
if (ua && (ua.indexOf('MSIE') > -1 || ua.indexOf('Trident/') > -1)) {
console.log('IE 😢');
} else {
console.log('Happy surfing! 🙂')
}
@bongofury
bongofury / useful_commands.sh
Last active April 15, 2022 07:44
Linux commands I always search for
# 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
@bongofury
bongofury / Partial application
Last active December 14, 2015 16:49
js partial application pattern
//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)));
};
};