Skip to content

Instantly share code, notes, and snippets.

View danstn's full-sized avatar
🚀
Binding. Lifting. Zipping.

Daniel Stankevich danstn

🚀
Binding. Lifting. Zipping.
View GitHub Profile
@danstn
danstn / stack.ts
Created April 27, 2021 05:24
CDK Construct for React FE on S3/CloudFront with Route53 and HTTPS
export class InfrastructureStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
// Create a new bucket
const bucket = new s3.Bucket(this, BUCKET_ID, {
bucketName: "<your-domain>",
websiteIndexDocument: "index.html",
autoDeleteObjects: true,
enforceSSL: true,
@danstn
danstn / Demo.elm
Last active July 7, 2022 23:24
Experiment with state machines & elm-ui
module MachineDemo exposing
( Model
, init
, myDiv
, setHeight
, setMinHeight
, setWidth
)
import Element exposing (..)
@danstn
danstn / init.vim
Created December 1, 2022 01:23
A millionth version of my vimrc
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CORE
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set autoindent " enable automatic indentation
set expandtab
set hlsearch " highlight search results
set ignorecase " case insensitive search
set incsearch " match the search and return to the initial position
set list " Show `listchars` characters
@danstn
danstn / revproxy.go
Created January 10, 2023 04:59
Simple Go reverse proxy
package main
import (
"fmt"
"log"
"net/http"
"net/http/httputil"
"strings"
)
@danstn
danstn / init.lua
Last active May 21, 2024 14:12
One File Neovim Config
-- Set <space> as the leader key
-- See `:help mapleader`
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
vim.g.mapleader = "\\"
vim.g.maplocalleader = "\\"
-- Make line numbers default
vim.opt.number = true
-- Enable mouse mode, can be useful for resizing splits for example!
@danstn
danstn / tmux.conf
Last active May 21, 2024 23:48
One file Tmux config
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# quick config reload
bind r source-file ~/.tmux.conf
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on