Skip to content

Instantly share code, notes, and snippets.

@yuriploc
yuriploc / .editorconfig
Last active September 4, 2018 18:10
An editorconfig template
# https://editorconfig.org
# Yuri's default
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
@yuriploc
yuriploc / addswap.sh
Last active July 12, 2019 13:13
add 2GB of swap memory
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
@yuriploc
yuriploc / vim.md
Created August 9, 2017 12:15
From Atom to Vim

Installation

  1. vim/gvim
  2. vundle
  3. ale

Configuration

  1. config .vimrc to use vundle based on joelxr vimrc file
@yuriploc
yuriploc / upgrade_fedora
Last active December 7, 2020 02:57
upgrading Fedora using dnf system-upgrade
// 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
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
defaults
log global
maxconn 4096
mode http
option httplog
option dontlognull
option forwardfor
option http-server-close
timeout connect 5000
timeout client 50000
@yuriploc
yuriploc / chromecast.sh
Last active May 20, 2016 15:53 — forked from victorono/chromecast.sh
Using Google Chromecast from Fedora 20
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