Skip to content

Instantly share code, notes, and snippets.

@skamsie
skamsie / terminal_colors.md
Last active December 8, 2020 09:10
Show terminal colors
for i in {0..255} ; do
  printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
  if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
    printf "\n";
  fi
done
@skamsie
skamsie / vimrc
Created December 7, 2020 21:54 — forked from meskarune/vimrc
simple functional vim status line - jellybeans theme colors
" status bar colors
au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta
au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
" Status line
" default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
" Status Line Custom
let g:currentmode={
" [N] search in commands history in Normal Mode
q:
"[CMD] replace xxx with yyy in the whole file
%s/xxx/yyy/g
" save to reg
function! SaveLastReg()
if v:event['regname']==""
if v:event['operator']=='y'
@skamsie
skamsie / keybase.md
Created September 15, 2017 09:29
keybase.md

Keybase proof

I hereby claim:

  • I am skamsie on github.
  • I am skamsie (https://keybase.io/skamsie) on keybase.
  • I have a public key ASCLVHDm08q9TzCjrU19uY4TiqIeyGMSPYicoQO3HkM4-wo

To claim this, I am signing this object:

@skamsie
skamsie / sqrt.go
Last active March 19, 2017 18:06
A tour of go: Loops and Functions
//https://tour.golang.org/flowcontrol/7
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {