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
@MagicalDrizzle
MagicalDrizzle / user-overrides-general.js
Last active November 10, 2024 12:10
my personal overrides for every new firefox profile
//------------ Personal overrides ------------//
// For general profiles (Check line 252):
// DNS-over-HTTPS enabled
// Cookie clearing disabled
// SSL safe negotiation disabled
//--------------------------------------------//
// Activity Stream: Enable Weather
user_pref("browser.newtabpage.activity-stream.system.showWeather", true);
// user_pref("browser.newtabpage.activity-stream.showWeather", true); // default: true
user_pref("browser.newtabpage.activity-stream.weather.display", "detailed");
@timlinux
timlinux / README.md
Last active April 10, 2024 19:28
Linux on Lenovo Thinkpad P14s with AMD Processor

Thinkpad P14s AMD Edition Review (Running Fedora)

These are my installation etc. notes for running Linux on my new Thinkpad P14s laptop with 32GB RAM, 1TB SDD and 8 Core, 16 Thread AMD CPU.

Detailed specs

Here is what they quoted as the specs after I confirmed my order:

@aaronNGi
aaronNGi / newscript.sh
Created April 28, 2020 20:38
Boilerplate for new POSIX shell scripts
#!/bin/sh
prog_name=${0##*/}
version=1.0
version_text="Boilerplate for new scripts v$version"
options="h o: q v V"
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]...
Boilerplate for new scripts
@laggardkernel
laggardkernel / chpwd-equivalent-in-bash.md
Last active September 5, 2024 20:11
Create chpwd Equivalent Hook in Bash #bash #hook #zsh

There's not a complete hook system designed in Bash when compared with other modern shells. PROMPT_COMMAND variable is used as a hook in Bash, which is equivalent to precmd hook in ZSH, fish_prompt in Fish. For the time being, ZSH is the only shell I've known that has a chpwd hook builtin.

PROMPT_COMMAND

If set, the value is interpreted as a command to execute before the printing of each primary prompt ($PS1).

https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Bash-Variables

chpwd Hook in Bash

"============================================================================
" statusline
"============================================================================
let g:currentmode={
\ 'n' : 'N ',
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active November 17, 2024 16:44
set -e, -u, -o, -x pipefail explanation
@wolfv6
wolfv6 / switch_sound.sh
Last active September 10, 2023 17:23
switch_sound.sh is a script that switches between speaker and headphone with one mouse click.
#!/bin/bash
################################### license ##################################
# switch_sound.sh is a script that switches between speaker and headphone with one mouse click.
# Written in 2018 by Wolfram Volpi, contact at https://gist.github.com/wolfv6/df6deb2ac7667d16d621d6da79ef99e0
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
# This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software.
# If not, see http://creativecommons.org/publicdomain/zero/1.0/.
@budRich
budRich / i3get
Last active April 10, 2023 16:32
extract window information from i3 tree
#!/bin/sh
# i3get
#
# search for windows in i3 tree, return desired information
# if no arguments are passed. con_id of acitve window is returned.
# ctrl+c, ctrl+v by budRich 2017
# bash to sh by: nimaje
#
# Options:
@JBlond
JBlond / bash-colors.md
Last active November 18, 2024 09:30 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@romainl
romainl / colorscheme-override.md
Last active November 9, 2024 21:05
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.