- config
.vimrc
to use vundle based on joelxr vimrc file
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
cat /proc/sys/net/ipv4/ip_local_port_range | |
firewall-cmd --permanent --add-port=32768-61000/udp | |
firewall-cmd --reload | |
firewall-cmd --permanent --zone=home --add-port=32768-61000/udp | |
# if you use iptables.. | |
# iptables -A INPUT -s 192.168.0.0/24 -p udp -m udp --dport 32768:61000 -j ACCEPT |
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
defaults | |
log global | |
maxconn 4096 | |
mode http | |
option httplog | |
option dontlognull | |
option forwardfor | |
option http-server-close | |
timeout connect 5000 | |
timeout client 50000 |
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
lsblk # see partitions to umount | |
umount /dev/sdX # better to umount all partitions from the destination drive | |
sudo dd if=/path/to/iso/image.iso of=/dev/sdX bs=4M oflag=direct,sync status=progress | |
dosfslabel /dev/sdX LIVE |
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
// in case you have VirtualBox and kmod-vbx, akmod-vbx, remove them | |
sudo dnf distro-sync --allowerasing | |
sudo dnf upgrade --refresh -y | |
sudo dnf install dnf-plugin-system-upgrade -y | |
sudo dnf system-upgrade download --releasever=NUM | |
sudo dnf system-upgrade reboot | |
sudo dnf remove -y google-chrome-\* && sudo dnf install -y google-chrome-stable |
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
ls -alSh /usr/bin/ | grep java | |
$(readlink -f /usr/bin/java | sed "s:bin/java::") |
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
function normalizePort(val) { | |
const port = parseInt(val, 10) | |
if (isNaN(port)) { | |
return val | |
} | |
if (port >= 0) { | |
return port | |
} |
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
// #1 - getter & setter | |
service.getPriceUpdatedAt = () => store.priceUpdatedAt | |
service.setPriceUpdatedAt = (tmstmp) => { | |
store.priceUpdatedAt = parseInt(tmstmp) | |
} | |
// #2 - 2in1 | |
service.priceUpdatedAt = (tmstmp) => { | |
if (!tmstmp) return store.priceUpdatedAt |
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
dd if=/dev/zero of=/var/swap bs=1k count=2048k | |
mkswap /var/swap | |
swapon /var/swap | |
echo '/var/swap swap swap default 0 0' >> /etc/fstab |
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
function CustomError(message, name='CustomError', code=500) { | |
const error = Error.call(this, message); | |
this.name = name; | |
this.code = code, | |
this.message = error.message; | |
this.stack = error.stack; | |
} | |
CustomError.prototype = Object.create(Error.prototype); |
OlderNewer