Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kwbr
kwbr / olyWifiSync.sh
Created April 20, 2024 08:51 — forked from digitaltrails/olyWifiSync.sh
Olympus camera WIFI download/mirror script
#!/bin/bash
##
## olyWifiSync - Mirror Olympus camera via WIFI
##
## Usage: olyWifiSync [-d|-n|-f|-p|-h] ESSID PASSWORD [wifidevice]
## -d download only, don't try to configure the WIFI device)
## -n no disconnect, do not disconnect the WIFI on completion
## -f full download, do not skip over files that already exist
## -p power off camera at end of transfer
## -h help
@kwbr
kwbr / README.md
Created March 20, 2023 09:02 — forked from adewes/README.md
Ebay Ads - Bot. Because who wants to write messages by hand...

To use this bot:

  • Download ads_bot.py and requirements.txt.
  • Type pip install -r requirements.txt to install the requirements.
  • Fill out the required information in the Python file.
  • Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
  • Run the script :)
  • Relax and be ready to answer incoming calls :D
@kwbr
kwbr / README-setup-tunnel-as-systemd-service.md
Created February 5, 2022 09:32 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@kwbr
kwbr / after#ftplugin#javascript.vim
Created May 10, 2021 08:46
Set proper &path for Next.js and Nuxt.js
autocmd BufNewFile,BufRead * call <SID>DetectFrontEndFramework()
function! s:DetectFrontEndFramework()
if v:version >= 801 && has('patch1803')
let package_json = findfile('package.json', '.;')
if len(package_json)
let dependencies = readfile(package_json)
\ ->join()
\ ->json_decode()
@kwbr
kwbr / awk-expense-calculator.awk
Created May 2, 2021 11:16 — forked from samask/awk-expense-calculator.awk
Awk Expense Calculator, by Ward Cunningham
#!/usr/bin/awk -f
# Source: http://c2.com/doc/expense/
/^[A-Z]+[A-Z0-9]*$/ {
if (sums[$1] == "" || $1 == "SUM") {
sums[$1] = sum # Define Symbol
$1 = sum
sum = 0
}
@kwbr
kwbr / Dockerfile
Created March 25, 2021 06:26 — forked from aprxi/Dockerfile
Dockerfile_20190214
FROM alpine as base
RUN apk update \
&& apk add --no-cache \
bash
FROM scratch as user
COPY --from=base . .
ARG HOST_UID=${HOST_UID:-4000}
@kwbr
kwbr / Makefile
Created March 25, 2021 06:26 — forked from aprxi/Makefile
Makefile_docker_20190214
# --------------------------------------------------------------------
# Copyright (c) 2019 LINKIT, The Netherlands. All Rights Reserved.
# Author(s): Anthony Potappel
#
# This software may be modified and distributed under the terms of the
# MIT license. See the LICENSE file for details.
# --------------------------------------------------------------------
# If you see pwd_unknown showing up, this is why. Re-calibrate your system.
PWD ?= pwd_unknown
@kwbr
kwbr / docker-compose.yml
Created March 25, 2021 06:25 — forked from aprxi/docker-compose.yml
docker-compose.yml_20190214
version: '3.4'
services:
main:
# Makefile fills PROJECT_NAME to current directory name.
# add UID to allow multiple users run this in parallel
container_name: ${PROJECT_NAME}_${HOST_UID:-4000}
hostname: ${PROJECT_NAME}
# These variables are passed into the container.
environment:
- UID=${HOST_UID:-4000}
@kwbr
kwbr / path.md
Created August 20, 2020 09:57 — forked from romainl/path.md
Off the beaten path

Off the beaten path

What is &path used for?

Vim uses :help 'path' to define the root directories from where to search non-recursively for files.

It is used for:

  • gf, gF, <C-w>f, <C-w>F, <C-w>gf, <C-w>gF,
  • :find, :sfind, :tabfind,
@kwbr
kwbr / any2webm.sh
Last active May 20, 2020 15:34 — forked from Konfekt/any2webm.sh
convert video files into the WebM format in batches using ffmpeg (and preferrably GNU parallel)
#!/usr/bin/env bash
# convert video files into the WebM format in batches using ffmpeg (and preferrably GNU parallel)
# exit on error or use of undeclared variable or pipe error:
set -o errexit -o nounset -o pipefail
# -crf 10 : Constant Rate Factor (crf) gives video quality from 0 (lossless) to 63 (worst); default is 23.
# -c:a/v ... = transform the audio/video data using ...
# -b:a/v ... = audio/video bitrate is ...