Skip to content

Instantly share code, notes, and snippets.

View vodrazka's full-sized avatar

Thomas vodrazka

View GitHub Profile
@vodrazka
vodrazka / init.lua
Created January 13, 2024 10:36
neovim vanilla single file config
vim.g.mapleader = " "
vim.keymap.set('n', '<leader>.', ":set list!<CR>", { desc = "Toggle whitespaces"})
vim.keymap.set('n', '<leader>,', ":set hls!<CR>", { desc = "Toggle highlight search"})
vim.keymap.set('n', '<leader>j', ":bprevious<CR>", { desc = "Buffer previous"})
vim.keymap.set('n', '<leader>k', ":bnext<CR>", { desc = "Buffer next"})
vim.keymap.set('n', '<leader>l', ":buffers<CR>", { desc = "Buffer next"})
vim.keymap.set('n', '<leader>x', ":bp<bar>sp<bar>bn<bar>bd<CR>", { desc = "Buffer delete"}) --delete but do not exit, strange that vim closes the windows by default...
vim.keymap.set('n', '<leader>t', ":tabnew<CR>", { desc = "Tab new"})
vim.cmd.colorscheme "koehler"
local opt = vim.opt
let @v="\<ESC>/\"\<Enter>nvi\""
docker-machine ls | grep Error | grep MissingParameter | awk '{print $1}' | xargs docker-machine rm -f
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@vodrazka
vodrazka / .bash_profile
Last active March 14, 2019 09:25
.bash_profile
export VISUAL=vim
export EDITOR="$VISUAL"
export HISTCONTROL=ignoredups:erasedups
export HISTSIZE=10000
export PROMPT_COMMAND='history -a; history -r;echo -ne "\033]0;${PWD##*/}\007"'
green=$(tput setaf 2)
reset=$(tput sgr0)
PS1="\w \[$green\]$\[$reset\] "
stty -ixon
package main
import (
"bufio"
"os"
"io"
"log"
"fmt"
"flag"
"os/signal"
@vodrazka
vodrazka / FireCommandWhenNewFileIsFree.go
Last active May 30, 2017 08:30
Watch for changes in local directory, if file is created start watching it. If file is not busy by other pids (except this programs process and fuser child process) fire given command with that new file as first argument.
package main
import (
"log"
"github.com/howeyc/fsnotify"
"path/filepath"
"os"
"flag"
"os/exec"
server {
listen 80;
listen [::]:80;
server_name *.a.tech;
root /home/user/web;
location / {
}
}
#!/bin/bash
GOOS=linux GOARCH=arm GOARM=7 go build . && \
scp ${PWD##*/} pi@$1:~/bin/