Skip to content

Instantly share code, notes, and snippets.

View jpcaparas's full-sized avatar
🐔

Jayps jpcaparas

🐔
View GitHub Profile
@jpcaparas
jpcaparas / settings.txt
Created May 11, 2019 03:52
Firefox scroll settings reference
general.smoothScroll.currentVelocityWeighting: 0
general.smoothScroll.mouseWheel.durationMaxMS: 250
general.smoothScroll.stopDecelerationWeighting; 0.82
mousewheel.min_line_scroll_amount: 25
# see https://www.reddit.com/r/firefox/comments/8ir5kk/how_to_change_scroll_speed_in_firefox_600/
@jpcaparas
jpcaparas / 99-synaptics-touchpad.conf
Last active May 11, 2019 05:28
Fedora 30 touchpad fix with Synaptics legacy driver
# Used in conjunction with xorg-x11-drv-synaptics-legacy
Section "InputClass"
Identifier "Synaptics legacy driver options"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "synaptics"
Option "TapButton1" "1" # Non-corner one finger tap: Left mouse button click
Option "TapButton2" "3" # Non-corner three finger tap: Middle mouse button click
Option "TapButton3" "2" # Non-corner two finger tap: Right mouse button click
@jpcaparas
jpcaparas / script.sh
Last active May 11, 2019 07:29
[Fedora] Fix video playback issues (Netflix, YouTube)
#!/bin/sh
# Fixes YouTube
sudo dnf config-manager --set-enabled fedora-cisco-openh264
sudo dnf install gstreamer1-plugin-openh264 mozilla-openh264
# Fixes Netflix (and YouTube?)
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-30.noarch.rpm
sudo dnf install ffmpeg
@jpcaparas
jpcaparas / 40_custom
Last active May 11, 2019 10:15
Chain load Windows 10 bootloader with Grub
#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# location /etc/grub.d/40_custom
# when done, run sudo grub2-mkconfig -o /boot/grub2/grub.cfg && sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
menuentry "Windows 10" --class windows --class os {
@jpcaparas
jpcaparas / References
Last active January 16, 2025 14:09
Limit docker CPU and memory resource usage
Inspired by: https://stackoverflow.com/questions/46408673/docker-17-06-ce-default-container-memory-limit-on-shared-host-resources/46557336#46557336
@jpcaparas
jpcaparas / Steps
Last active June 26, 2019 20:15
Install Docker CE on Fedora 30
# Main guide
https://docs.docker.com/install/linux/docker-ce/fedora/
# Set up the repository
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
@jpcaparas
jpcaparas / find.sh
Last active May 21, 2019 00:06
GNU "find" examples
# Find top level directories that are aged or are older than 10 days and delete them.
find . -mindepth 1 -maxdepth 1 -not -newermt '10 days ago' -exec rm -rf {} +
@jpcaparas
jpcaparas / killproc.sh
Created May 23, 2019 04:54
Kill proceses by search
#!/bin/bash
set -e
searchterm=$1
verbose=false
usage() {
echo "Usage: [-v verbose] searchterm"

Instructions

The files are made for systems with systemd. The instructions are written with Ubuntu 16.04 in mind. Your file locations may vary.

Installation

  1. Become root
  2. Create the service files in lib/systemd/system
  3. Change <user> in the Sonarr service file to the approriate user.
@jpcaparas
jpcaparas / command.sh
Created May 27, 2019 00:30
macos acl
# source https://apple.stackexchange.com/a/31457
sudo chmod +a "group:staff allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" $PWD