Skip to content

Instantly share code, notes, and snippets.

View oca159's full-sized avatar
🏠
Working from home

Osvaldo oca159

🏠
Working from home
  • ~/.config/nvim
  • 01:32 (UTC -06:00)
View GitHub Profile
@oca159
oca159 / settings.json
Created April 10, 2025 20:07
Zed settings.json
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette
{
"edit_predictions": {
@oca159
oca159 / keymap.json
Last active April 19, 2025 02:30
zed keymap.json with same lazyvim keymaps
[
// Terminal
{
"context": "Workspace",
"bindings": {
"ctrl-/": "workspace::ToggleBottomDock"
}
},
// Window's navigation
{
@oca159
oca159 / tmux.conf
Last active March 30, 2025 22:17
tmux
# Set terminal colors
set-option -sa terminal-overrides ",xterm*:Tc"
# Enable mouse support
set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
@oca159
oca159 / config
Last active April 11, 2025 20:27
ghostty
theme = catppuccin-mocha
adjust-cell-height = 10%
command = /bin/zsh -c "tmux new -A -s work"
copy-on-select = true
font-family = "TX-02"
font-size = 16
font-thicken = true
mouse-hide-while-typing = true
macos-non-native-fullscreen=visible-menu
'''
The rgb() method is incomplete.
Complete the method so that passing in RGB decimal values will result in a hexadecimal representation being returned.
The valid decimal values for RGB are 0 - 255. Any (r,g,b) argument values that fall out of that range should be rounded to the closest valid value.
'''
def rgb(r, g, b):
round = lambda x: min(255, max(x, 0))
return ("{:02X}" * 3).format(round(r), round(g), round(b))
# http://zshwiki.org/home/zle/bindkeys#reading_terminfo
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key
key[Home]="$terminfo[khome]"
key[End]="$terminfo[kend]"
key[Insert]="$terminfo[kich1]"
key[Backspace]="$terminfo[kbs]"
key[Delete]="$terminfo[kdch1]"
@oca159
oca159 / cloudSettings
Last active April 24, 2018 20:13
Visual studio Code settings
{"lastUpload":"2018-04-24T20:13:47.550Z","extensionVersion":"v2.9.0"}
@oca159
oca159 / zsh_plugins.md
Created March 8, 2018 16:57
zsh plugins

Lista de plugins recomendados para zsh

  • colorize
  • virtualenv
  • command-not-found
@oca159
oca159 / .profile
Created February 20, 2018 18:15
My personal .profile file
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@oca159
oca159 / snake.py
Created February 19, 2018 19:55 — forked from paul-schwendenman/snake.py
Snakes Game using Python
# SNAKES GAME
# Use ARROW KEYS to play, SPACE BAR for pausing/resuming and Esc Key for exiting
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
curses.initscr()
win = curses.newwin(20, 60, 0, 0)