Skip to content

Instantly share code, notes, and snippets.

View paulodeleo's full-sized avatar

Paulo Henrique Deléo paulodeleo

  • Curitiba - PR, Brazil
View GitHub Profile
@paulodeleo
paulodeleo / mailer_one_liner.rb
Created August 5, 2020 18:33
Rails one liner for testing email from console
class TestMailer < ActionMailer::Base; def test; mail from: 'sender@mail.com', to: 'recipient@mail.com', subject: 'Test e-mail subject', body: 'Test e-mail body'; end; end; TestMailer.test.deliver_now
@paulodeleo
paulodeleo / fixscroll.sh
Created April 20, 2019 18:23
Script to fix natural touchpad scroll direction for gnome based apps on XFCE4 (eg.: Xubuntu). A copy of https://gist.github.com/wjladams/1a7f37019e0b1b3c2c0be335142b1852
#!/bin/sh
# Find the amount by doign
# synclient | grep HorizScrollDelta
# synclient | grep VertScrollDelta
# And then simply negative that value for this
# Found at
# https://askubuntu.com/questions/690512/how-to-enable-natural-scrolling-in-xfce4/853262
# This is because, although xubuntu 18.04 has reverse scrolling option in touchpad
# settings, it doesn't really work, the setting does not cascade to gnome apps for some reason.
synclient HorizScrollDelta=-116
@paulodeleo
paulodeleo / myDell7559.xmodmap
Created April 20, 2019 18:19
My xmodmap based keyboard key remappings for Dell 7559 on linux to use a Lenovo-like layout
!!! Load it using `xmodmap myDell7559.xmodmap` on login !!!
!!! Remaps pgup to delete !!!
keycode 112 = Delete
!!! Remaps num lock to home !!!
keycode 77 = Home
!!! Remaps numeric 7 to end !!!
keycode 79 = End
@paulodeleo
paulodeleo / Gestures.conf
Created April 20, 2019 18:12
My Gestures app config export for touch based input control of multimedia keys on Ubuntu (19.04)
# Generated by Gestures 0.2.2 --> https://gitlab.com/cunidev/gestures
# Manual editing might result in data loss!
# Invalid lines
# Unsupported lines
# Swipe threshold (0-100)
@paulodeleo
paulodeleo / Default (Linux).sublime-keymap.json
Created March 20, 2018 01:16
Default (Linux).sublime-keymap
// sublime.log_input(True)
// sublime.log_commands(True)
[
{ "keys": ["alt+f4"], "command": "exit" },
{ "keys": ["ctrl+alt+f4"], "command": "close_window" },
{ "keys": ["ctrl+'"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["ctrl+keypad_divide"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+keypad_divide"], "command": "toggle_comment", "args": { "block": true } },
// Comment on cce notebook - linux
{ "keys": ["control+q"], "command": "toggle_comment", "args": { "block": false } }
@paulodeleo
paulodeleo / Default (Windows).sublime-keymap.json
Created March 20, 2018 01:16
Default (Windows).sublime-keymap
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+f11"], "command": "toggle_menu" }
]
@paulodeleo
paulodeleo / Preferences.sublime-settings
Created January 31, 2018 17:09
My Sublime 3 user settings
{
"atomic_save": false,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"enable_tab_scrolling": false,
"font_size": 13,
"ignored_packages":
[
"Color Highlighter",
"Pretty JSON",
"Sass",
@paulodeleo
paulodeleo / Links about Dell 7559 Hackintosh.txt
Last active July 6, 2021 02:04
Links about Dell 7559 Hackintosh
@paulodeleo
paulodeleo / Raspberry pi test settings.txt
Last active March 15, 2018 12:37
Raspberry pi test settings
# based on this article: https://www.linux-toys.com/?p=1153
# original pi settings
vm.swappiness = 60
vm.vfs_cache_pressure = 100
vm.dirty_background_ratio = 10
vm.dirty_ratio = 20
# test settings
sudo sysctl -w vm.swappiness=15