Skip to content

Instantly share code, notes, and snippets.

private string getShortcutPath()
{
string startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
return System.IO.Path.Combine(startupPath, "myApp.lnk");
}
private void createStartupShortcut()
{
WshShell shell = new WshShell();
IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(getShortcutPath());
# options
MAX_CAMS = 4
WIDTH_PIXELS = 1280
HEIGHT_PIXELS = 720
VIDEO_FORMAT = 'MJPG'
# connect to all available webcams
cams = []
for i in range(0, MAX_CAMS):
next_cam = cv2.VideoCapture(i)
# reload config file │
bind-key r source-file ~/.tmux.conf │
bind-key J resize-pane -D 20 │
bind-key K resize-pane -
#!/bin/bash
############################## │
# session name │
sn=paddle
# starting directory
main_dir=~
##############################
# Start the session and window 0 in │
cd "$main_dir"
"" F1 to run the latest
nmap <F1> :!~/run.sh<CR><CR>
"" F4 to kill
nmap <F4> :!~/kill.sh<CR><CR>
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
pkill -f "node app.js" │
pkill -f "python3 -u app.py"
##############
$APP=template
$LOG=node.log
##############
$LOGPATH=/var/$APP/log/$LOG
touch $LOGPATH
tail -f $LOGPATH
@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
@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