Skip to content

Instantly share code, notes, and snippets.

View elliot40404's full-sized avatar
ITS COMING

Elliot elliot40404

ITS COMING
View GitHub Profile
local wezterm = require("wezterm")
local mux = wezterm.mux
local config = wezterm.config_builder()
-- =========================
-- AYU COLORS
-- =========================
local thm_bg = "#0f1419"
local thm_fg = "#e6e1cf"
@elliot40404
elliot40404 / crlf.go
Created January 5, 2025 22:14
Detect CRLF line endings using golang
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
fileName := "example.txt"
@elliot40404
elliot40404 / table.go
Created August 22, 2024 08:44
Render a table in the cli from any struct and additional formatting and transformations
package internal
import (
"fmt"
"os"
"reflect"
"strings"
"text/tabwriter"
)
@elliot40404
elliot40404 / systat.sh
Created January 19, 2024 08:09
A simple shell script to get alerts on slack if your servers exceed certain thresholds
#!/usr/bin/env bash
# -------------- USER CONFIGURATION -------------- #
# SLACK WEBHOOK URL
SLACK_URL=""
#SLACK_URL=""
# SERVER NAME
NAME="SERVER"
# !/bin/bash
apt install curl wget git
sudo apt update && sudo apt upgrade
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# install batcat
sudo apt install bat
# build tools
sudo apt install build-essential
# install neovim