Skip to content

Instantly share code, notes, and snippets.

@alexshd
alexshd / main.go
Last active May 31, 2024 16:28
logfmt for Ardanlabs Service5 course
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"log"
"os"
"strings"
@alexshd
alexshd / Taskfile.yaml
Created May 6, 2024 08:56
`Taskfile` base example for `go` project - test and rebuild on each saved change
# https://taskfile.dev
version: "3"
interval: 500ms
tasks:
default:
deps:
- test
@alexshd
alexshd / Helpers.elm
Last active May 12, 2023 22:30
ELM Land with tailwindcss setup files
module Helpers exposing (..)
{-| Helper for tailwind autocomplition
Html.Attributes.class <| tailwind { css = "bg-red-100..." }
-}
tailwind : { css : String } -> String
# `https://taskfile.dev/`
version: '3'
tasks:
go:test:all:
cmds:
- go test -v ./... -cover -race
sources:
- ./**/*.go
@alexshd
alexshd / golangci.yaml
Created May 10, 2023 05:12
golangci-lint config for my projects ( VSCode config has --fix --fast)
linters:
enable-all: true
disable:
- forbidigo
- varnamelen
- errcheck
- golint
- exhaustivestruct
- ifshort
@alexshd
alexshd / config.json
Created September 9, 2015 12:45
Riemann-Dash Config file
{
"server": "riemann",
"workspaces": [
]
}
@alexshd
alexshd / slack-notifire
Last active August 29, 2015 14:17
slack ruby notifier
#! /opt/chef/embedded/bin/ruby
require 'slack-notifier'
require 'trollop'
host = ENV['HOSTNAME']
opts = Trollop.options do
opt :message, 'message to send', type: :string, default: 'OK'
opt :channel, 'slack channel to use', type: :string, default: '#shd-test'
opt :user, 'user name to use in the message', type: :string, default: host
@alexshd
alexshd / shd_base_setup.sh
Last active May 29, 2016 19:26
My base env setup
#!/bin/bash
sudo apt-get update
sudo apt-get install -y tmux vim git zsh mlocate httpie curl
curl -L https://www.chef.io/chef/install.sh | sudo bash
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
curl https://gist.githubusercontent.com/alexshd/bc39c6e4c2969e3286cd/raw/dda11b7fb968b6e9d344fad0f0c44400f42ad0eb/.tmux.conf > ~/.tmux.conf
curl https://gist.githubusercontent.com/alexshd/756459d0e840c02d47ee/raw/d6235761fb360bad93db6017f3fedbd65a871ab1/.vimrc > ~/.vimrc
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="pygmalion"
plugins=(git lein tmux rvm \
common-aliases cp \
extract gem history \
history-substring-search \
knife pip rake ruby vundle docker-compose\
colorize tmuxinator bower npm docker)
@alexshd
alexshd / .tmux.conf
Last active January 11, 2016 23:15
Tmux.conf
# vim: fdm=marker
# vim bindings
setw -g mode-keys vi
set-option -g default-shell /bin/zsh
# It causes tmux to resize a window based on the smallest client actually
# viewing it, not on the smallest one attached to the entire session.
setw -g aggressive-resize on
unbind C-a