After reboot continue
Open a CMD session as Administrator
| #!/bin/bash | |
| ## usage: just run script (relative file paths to project adjusted) | |
| # $ count_commits.sh | |
| ## array of project dirs | |
| declare -a project_dirs=("./foo" "./bar" "./qux") | |
| # ignore files with these extensions | |
| excludes="':!*.ipynb' ':!*.json' ':!*.log' ':!*.pb' ':!*.fb' ':!*.bin'" |
| // HOW TO EXPRESSS CASCADING RELATIONS BETWEEN RELATED GORM MODELS | |
| // if you update the server_id, it updates the server_id on sessions with old server_id | |
| // if you delete the server, it deletes all sessions with same server_id | |
| type Server struct { | |
| Model | |
| ServerID uuid.UUID `gorm:"type:uuid; primaryKey"` | |
| # ... | |
| Sessions []Session `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"` | |
| } |
| import logging | |
| import os | |
| import time | |
| import traceback | |
| from watchdog.observers import Observer | |
| from watchdog.events import PatternMatchingEventHandler | |
| MAP_DATA_DIR = "/tmp/foo" |
| cutbuffer () { | |
| emulate -L zsh | |
| zle kill-region | |
| zle set-mark-command -n -1 | |
| killring=("$CUTBUFFER" "${(@)killring[1,-2]}") | |
| if which clipcopy &>/dev/null; then | |
| printf "%s" "$CUTBUFFER" | clipcopy | |
| else | |
| echo "clipcopy function not found. Please make sure you have Oh My Zsh installed correctly." |
| -- create a separate schema to hold our history table | |
| CREATE SCHEMA IF NOT EXISTS logging; | |
| CREATE TABLE IF NOT EXISTS logging.t_history ( | |
| id serial, | |
| tstamp timestamp DEFAULT now(), | |
| schemaname text, | |
| tabname text, | |
| operation text, | |
| who text DEFAULT current_user, | |
| new_val json, |
| # test as follows: | |
| # 1. start logstash: | |
| # logstash -f ~/logstash.conf --config.reload.automatic | |
| # 2. send it data: | |
| # echo '{"container": "/spiff", "bleh": "blah"}' | nc localhost 6060 | |
| input { | |
| tcp { |
| UNAME := $(shell uname) | |
| ### | |
| # | |
| # assuming a yaml like this: | |
| # main: | |
| # device: 21 | |
| # | |
| ### |