Skip to content

Instantly share code, notes, and snippets.

@Mierenga
Mierenga / settings.json
Created October 13, 2021 01:53
VS Code Settings
{
"files.exclude": {
"**/__pycache__": true,
"**/.DS_Store": true,
"**/.git": true,
"**/.hg": true,
"**/.svn": true,
"**/CVS": true
},
"editor.tabSize": 2,
@Mierenga
Mierenga / init.d
Created August 17, 2018 01:41
basic service script for init.d subsystem
#!/bin/sh
### BEGIN INIT INFO
# Provides: /opt/dome/server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
# basic
alias la="ls -a"
alias ch='cd ~'
alias c='clear'
alias ..='cd ..;'
alias untar='tar -zxvf'
alias grep='grep --color=auto'
alias sw='telnet towel.blinkenlights.nl'
# git
@Mierenga
Mierenga / .tmux.conf
Last active January 29, 2022 18:46
A tmux configuration that interacts with vim splits
# reload config file
bind-key r source-file ~/.tmux.conf
# Allow scroll automatically
# set -g mouse on
# https://medium.com/free-code-camp/tmux-in-practice-scrollback-buffer-47d5ffa71c93
# trigger copy mode by with alt-up
bind -n M-Up copy-mode
@Mierenga
Mierenga / .vimrc-pi
Created August 7, 2018 20:30
A vim configuration file to use on raspberry pi shells
set nocompatible
""""""""""""""""""""""""""""""""""""""""""""""
"Vundle package manager
""""""""""""""""""""""""""""""""""""""""""""""
"filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"Add vundle plugins here
##############
$APP=template
$LOG=node.log
##############
$LOGPATH=/var/$APP/log/$LOG
touch $LOGPATH
tail -f $LOGPATH
pkill -f "node app.js" │
pkill -f "python3 -u app.py"
APP=apptemplate
# kill any running instance │
~/$APP/kill.sh │
# setup log ownership
sudo chown pi /var/$APP/log │
sudo chown pi /var/$APP/tmp │
touch /var/$APP/log/nod
"" F1 to run the latest
nmap <F1> :!~/run.sh<CR><CR>
"" F4 to kill
nmap <F4> :!~/kill.sh<CR><CR>
#!/bin/bash
############################## │
# session name │
sn=paddle
# starting directory
main_dir=~
##############################
# Start the session and window 0 in │
cd "$main_dir"