Skip to content

Instantly share code, notes, and snippets.

View cesalazar's full-sized avatar
👾
404 - Status not found

Carlos E. Salazar cesalazar

👾
404 - Status not found
View GitHub Profile
@cesalazar
cesalazar / coln.sh
Last active September 1, 2021 19:58
Create symlinks inside of an Obsidian vault, pointing to files located outside of the vault
#!/bin/bash
#
# Create inside of an Obsidian vault symlinks to files located elsewhere
# Debug options
# set -euxo pipefail
# Obsidian vault where the symlinks will be created
vault=${HOME}/Sync/obsidian/obsidian-vault/no-sync
@cesalazar
cesalazar / git-clone-and-auto-cd
Last active September 27, 2022 10:56
Clone a git repository and cd into its directory
#!/bin/bash
#
# Clone a git repository and cd into it
#
# NOTE: this file needs to be *sourced*. E.g.
# alias gclin="source /path/to/git-clone-and-auto-cd.sh"
#
# (my personal mnemonic for (g)it (cl)one (in))
# gclin https://github.com/cesalazar/.vim.git my_vim
@cesalazar
cesalazar / gist:3d21b83101f3c0a02424bbf847158bc7
Created November 5, 2020 21:54 — forked from jsjohnst/gist:68455
Bash profile options for color and vi mode
# useful general .bash_profile tweaks for color loving VI fans
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;36'
export CLICOLOR=1
alias ls='ls -G'
export LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rb=90'
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
@cesalazar
cesalazar / pimp-yt-player.css
Last active December 25, 2023 22:03
Hides some YouTube annoyances, and add some visual tweaking.
/* Rules for Stylus
* https://addons.mozilla.org/en-US/firefox/addon/styl-us/
*/
/* Hide the annoying (i) button on the top-right corner */
.ytp-chrome-top-buttons {
display: none;
}
/* Display the controls and title only on hover */
@cesalazar
cesalazar / make-yt-great-again.js
Last active June 6, 2020 23:31
Re-enable (some) keyboard controls, after disabling YT defaults using uBlock Origin. This prevents time scrubing when switching tabs using Alt+1-9.
// ==UserScript==
// @name Re-enable YouTube keyboard controls
// @namespace com.cesalazar.ytkbctrl
// @version 0.8
// @description Re-enable (some) keyboard controls, after disabling YT defaults using uBlock Origin.
// @author Carlos E. Salazar
// @match https://www.youtube.com/*
// @grant none
// ==/UserScript==
@cesalazar
cesalazar / .vimvixenrc
Last active November 19, 2019 12:53
Vim-Vixen config
{
"keymaps": {
"0": { "type": "scroll.home" },
":": { "type": "command.show" },
"o": { "type": "command.show.open", "alter": false },
"O": { "type": "command.show.open", "alter": true },
"t": { "type": "command.show.tabopen", "alter": false },
"T": { "type": "command.show.tabopen", "alter": true },
"w": { "type": "command.show.winopen", "alter": false },
"W": { "type": "command.show.winopen", "alter": true },
@cesalazar
cesalazar / keybase.md
Created September 13, 2018 16:10
GitHub identity proof for keybase.io

Keybase proof

I hereby claim:

  • I am cesalazar on github.
  • I am cesalazar (https://keybase.io/cesalazar) on keybase.
  • I have a public key whose fingerprint is 30C6 435D BE8D 4AA1 CE91 B4FB 8A43 6D6D 57EC E83B

To claim this, I am signing this object:

@cesalazar
cesalazar / cVimrc
Created June 27, 2018 13:46
cVimrc
set smoothscroll
let defaultengine = "duckduckgo"
let completionengine = ["duckduckgo"]
map <A-j> previousTab
map <A-k> nextTab
map yt :tabnew @%<CR>
map yf yankUrl
map R reloadTabUncached
map , lastUsedTab
@cesalazar
cesalazar / .tmux.conf.local
Last active May 11, 2020 23:57
.tmux.conf.local
# https://github.com/gpakosz/.tmux
# (‑●‑●)> released under the WTFPL v2 license, by Gregory Pakosz (@gpakosz)
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
# - and iTerm2 is configured to let option key act as +Esc
# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys
@cesalazar
cesalazar / toggle-trackpad
Created June 22, 2017 20:08
Toggle the TrackPad on or off
#!/bin/sh
device='SynPS/2 Synaptics TouchPad'
state=$(xinput --list-props "$device" | grep 'Device Enabled' | awk '{print $4}')
action=$([ "$state" = 1 ] && echo "--disable" || echo "--enable")
notify=true
timeout=1000
iconPath=/usr/share/icons/Adwaita/22x22/actions/
iconOff=zoom-out.png