Skip to content

Instantly share code, notes, and snippets.

View ivanruvalcaba's full-sized avatar

Iván Ruvalcaba ivanruvalcaba

View GitHub Profile
@ivanruvalcaba
ivanruvalcaba / spacemacs-keybindings
Created September 25, 2021 18:22 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@ivanruvalcaba
ivanruvalcaba / fix-git-line-endings
Created February 16, 2021 12:31 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF

Install npm packages globally without sudo on macOS and Linux

npm installs packages locally within your projects by default. You can also install packages globally (e.g. npm install -g <package>) (useful for command-line apps). However the downside of this is that you need to be root (or use sudo) to be able to install globally.

Here is a way to install packages globally for a given user.

1. Create a directory for global packages
mkdir "${HOME}/.npm-packages"
@ivanruvalcaba
ivanruvalcaba / eq.preset
Created November 9, 2020 12:33 — forked from kra3/eq.preset
Audacious presets: ~/.config/audacious/eq.preset
[Presets]
Preset0=Classical
Preset1=Club
Preset2=Dance
Preset3=Flat
Preset4=Live
Preset5=Laptop Speakers/Headphone
Preset6=Rock
Preset7=Pop
# Bindings {{{
# Remap prefix
set -g prefix C-a
# Quick key for moving back to the previous window
bind-key L last-window
# Vim style bindings for pane movement
bind-key -r h select-pane -L