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.js
Last active November 13, 2023 02:00
my personal overrides for every new firefox profile
// -------------------------------------------- //
// my overrides
// personal prefs
// NextDNS block page -- https://nextdns.io/ca
user_pref("security.enterprise_roots.enabled", true);
// Add custom search engines -- https://bugzilla.mozilla.org/show_bug.cgi?id=1195005#c23
user_pref("browser.urlbar.update2.engineAliasRefresh", true);
// sort tabs by recently used order
user_pref("browser.ctrlTab.sortByRecentlyUsed", true);
// for Vencord - dev edition
@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 April 7, 2024 11:03
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 April 23, 2024 11:47
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:
@romainl
romainl / colorscheme-override.md
Last active April 6, 2024 22:42
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.
@aaronhoffman
aaronhoffman / iphone-text-message-sqlite.sql
Last active February 2, 2024 11:45
SQLite SQL Query for iPhone Text Message Backup
-- more info http://aaron-hoffman.blogspot.com/2017/02/iphone-text-message-sqlite-sql-query.html
select
m.rowid
,coalesce(m.cache_roomnames, h.id) ThreadId
,m.is_from_me IsFromMe
,case when m.is_from_me = 1 then m.account
else h.id end as FromPhoneNumber
,case when m.is_from_me = 0 then m.account
else coalesce(h2.id, h.id) end as ToPhoneNumber
,m.service Service