Skip to content

Instantly share code, notes, and snippets.

@kristijanhusak
kristijanhusak / 1. Toggle-kitty-and-neovim-colors.md
Last active March 6, 2024 18:15
Toggle between light and dark colorschemes for both neovim and kitty

Requirements:

  • Neovim v0.4+
  • Python 3.4+ and pynvim
  • Kitty
  • Zsh, but would probably work with any shell if configured properly
  • Your favorite dark and light colorschemes

Installation

  1. Add below python script to ~/.config/kitty/ folder. Make sure to make it executable (chmod +x ~/.config/kitty/colors)
  2. Set up your dark/light colorscheme, and where to store kitty colors configuration (line 4 to 9)
@speric
speric / code-review.md
Created January 8, 2020 18:44
What should we look for when doing code review?

Code Review

What should we look for when doing code review? How should we receive code reviews from others?

thoughbot's Code Review guide is a great starting point. It articulates principles for the relational side of code review. This is especially relevant for us in a remote environment. How we give and receive feedback is as important as the feedback itself.

Things To Look For In Code Review

The following is a very incomplete list of questions to ask yourself during code review. The items here are meant to be starting points for a conversation with the code's author. Always assume the best intentions.

@Strykar
Strykar / myweechat.md
Last active April 27, 2024 04:09 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Add 4 pane layout

/window merge all
/eval /window splith ${calc:8 / ${window[gui_current_window].win_height} * 100 // 1}
/buffer add -switch highmon
/window splitv 40
/buffer ##news
/window splitv 75

/buffer exec.conky

@bbqtd
bbqtd / macos-tmux-256color.md
Last active May 2, 2024 04:41
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

window:
padding:
x: 20
y: 20
decorations: none
startup_mode: Windowed
font:
normal:
family: Hasklig
@castwide
castwide / rails.rb
Last active April 27, 2024 08:54
Enhance Rails Intellisense in Solargraph
# The following comments fill some of the gaps in Solargraph's understanding of
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
# ignored at runtime.
#
# You can put this file anywhere in the project, as long as it gets included in
# the workspace maps. It's recommended that you keep it in a standalone file
# instead of pasting it into an existing one.
#
# @!parse
# class ActionController::Base
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 6, 2024 10:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@demosten
demosten / brewv.sh
Created February 20, 2019 15:33
Install specific version of a Homebrew formula
#!/bin/bash
#
# Install specific version of a Homebrew formula
#
# Usage: brewv.sh formula_name desired_version
#
# Notes:
# - this will unshallow your brew repo copy. It might take some time the first time
# you call this script
# - it will uninstall (instead of unlink) all your other versions of the formula.

Visual Studio Code shortcuts I use often

Navigation

Sidebar:

  • Cmd-Shift-F: search
  • Cmd-Shift-E: files

Navigating in current editor:

@james2doyle
james2doyle / httpstatus.lua
Created April 20, 2018 21:21
Hammerspoon HTTP Status Codes. Easily find the code or name for HTTP statuses. Press the keybinding (ctrl+shift+H) and filter the results. Hitting enter on a choice will send you to the httpstatuses.com website
--[[
Name: HTTP Status Codes
Author: James Doyle <james2doyle@gmail.com>
Description: Easily find the code or name for HTTP statuses
Demo: https://cl.ly/0Y302M0z3G1x/Screen%20Recording%202018-04-20%20at%2002.14%20PM.gif
Installation: Just require this file in your Hammerspoon init.lua file
Usage:
Press the keybinding (ctrl+shift+H) and filter the results
Hitting enter on a choice will send you to the httpstatuses.com website
]]--