brew cask
brew tap homebrew/cask-fonts
brew install font-fira-code
brew install font-Fira-Code-nerd-font
brew install font-hack-nerd-font
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage: | |
| // | |
| // SomeFn(1, "test", WithArg1("optional 1"), WithArg2(true)) | |
| // | |
| package some_pkg | |
| type Option func(*option) | |
| type option struct { | |
| arg1 string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package repository | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| type Row interface { | |
| SetPos(pos int) | |
| Values() []any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package http | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "mime/multipart" | |
| "net/http" | |
| "github.com/go-chi/chi/v5" | |
| "github.com/google/uuid" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with import <nixpkgs> {}; rec { | |
| helloNixEnv = stdenv.mkDerivation { | |
| name = "hello-nix-env"; | |
| buildInputs = [ go ]; | |
| }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ternary | |
| type operatorIf[T comparable] struct { | |
| condition bool | |
| value T | |
| elseIf *operatorIf[T] | |
| elseValue T | |
| } | |
| func If[T comparable](condition bool) *operatorIf[T] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Nerd Fonts for your IDE | |
| # https://www.nerdfonts.com/font-downloads | |
| brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font | |
| brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font | |
| brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font | |
| brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font | |
| brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font | |
| brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font | |
| brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call plug#begin() | |
| Plug 'jiangmiao/auto-pairs' | |
| Plug 'preservim/nerdcommenter' | |
| Plug 'preservim/tagbar' | |
| Plug 'preservim/nerdtree' | |
| Plug 'tpope/vim-fugitive' | |
| Plug 'fatih/vim-go' | |
| Plug 'scrooloose/syntastic' | |
| Plug 'fatih/molokai' | |
| Plug 'ctrlpvim/ctrlp.vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use Alt-arrow keys to switch panes | |
| bind -n M-Left select-pane -L | |
| bind -n M-Right select-pane -R | |
| bind -n M-Up select-pane -U | |
| bind -n M-Down select-pane -D | |
| # Shift arrow to switch windows | |
| bind -n S-Left previous-window | |
| bind -n S-Right next-window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| var ( | |
| Info = Teal | |
| Warn = Yellow | |
| Fata = Red | |
| ) |