cd /usr/local/bin
This file contains 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
#!/usr/bin/env bash | |
if [[ $# -eq 1 ]]; then | |
selected=$1 | |
else | |
selected=$(find ~/projects ~/tests -mindepth 1 -maxdepth 1 -type d | fzf) | |
fi | |
if [[ -z $selected ]]; then | |
exit 0 |
Easy Guide on Setting Native Neovim LSP with Lua
- Node.js & npm
- package manager for nvim (recommended: Packer ) you can also use lazy or Vim-Plug
FROM golang:alpine as builder
RUN mkdir /build
ADD . /build
WORKDIR /build
RUN go build -o main .
This file contains 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
#!/usr/bin/env bash | |
function count_lines { | |
local file="$1" | |
local lines=$(wc -l < "$file") | |
echo "$lines" | |
} | |
function count_lines_recursive { | |
local dir="$1" |
This file contains 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
#!/usr/bin/env bash | |
cat /proc/stat | grep cpu | tail -1 | awk '{print ($5*100)/($2+$3+$4+$5+$6+$7+$8+$9+$10)}' | awk '{print 100-$1}' | xargs printf "%.1f" |
This file contains 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
POSTGRES_USER=postgres | |
POSTGRES_PASSWORD=password | |
POSTGRES_DB=mydatabase | |
DB_HOST=localhost | |
DB_PORT=5432 | |
DB_SCHEMA=public | |
DB_VOL_NAME=mydbvol | |
# don't change anything on this key | |
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${DB_HOST}:${DB_PORT}/${POSTGRES_DB}?schema=${DB_SCHEMA}" |
FROM rust as planner
WORKDIR /app
RUN cargo install cargo-chef
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
This file contains 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" | |
"log" | |
"net/smtp" | |
"os" | |
"sync" | |
"github.com/gofiber/fiber/v2" |
OlderNewer