Skip to content

Instantly share code, notes, and snippets.

View obitech's full-sized avatar
🌱

Alexander Knipping obitech

🌱
View GitHub Profile
@obitech
obitech / headset-reconnect.sh
Created February 3, 2020 15:14
Quickly reconnect a bluetooth headset on linux
#!/usr/bin/env bash
# Enter the MAC Address of the device here
addr=""
echo "Disconnecting ..."
echo -e "disconnect $addr" | bluetoothctl
sleep 5
echo "Connecting ..."
echo -e "connect $addr" | bluetoothctl
sleep 5
@obitech
obitech / m3db_relinquish_shards.md
Last active August 6, 2019 05:45
Relinquish Shards on Leaser interface

1) Definitions & Signatures

A Leaser needs to have the ability to release any of its shard-specific resources:

// dbnode/storage/block/types.go

type Leaser interface {
    UpdateOpenLease(
	descriptor LeaseDescriptor,
@obitech
obitech / getLatestIstio.ps1
Created October 17, 2018 14:04 — forked from kameshsampath/getLatestIstio.ps1
The PowerShell script that can be used to download latest version of Istio analogus to https://git.io/getLatestIstio
param(
[string] $IstioVersion = "1.0.2"
)
$url = "https://github.com/istio/istio/releases/download/$($IstioVersion)/istio-$($IstioVersion)-win.zip"
$Path = Get-Location
$output = [IO.Path]::Combine($Path, "istio_$($IstioVersion)_win.zip")
Write-Host "Downloading Istio from $url to path " $Path -ForegroundColor Green
@obitech
obitech / Dockerfile
Created June 28, 2018 09:42 — forked from renzok/Dockerfile
docker: mapping host uid and gid to user inisde container
FROM debian:jessie
ENV USER=boatswain USER_ID=1000 USER_GID=1000
# now creating user
RUN groupadd --gid "${USER_GID}" "${USER}" && \
useradd \
--uid ${USER_ID} \
--gid ${USER_GID} \
--create-home \
@obitech
obitech / # uwsgi - 2017-11-14_14-12-35.txt
Created November 14, 2017 13:16
uwsgi on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for uwsgi on macOS 10.12.6
Build date: 2017-11-14 14:12:35
@obitech
obitech / dirloop.sls
Created September 22, 2017 13:30
Looping over directories in Jinja/Salt
{% set dir_list = salt.file.find('/path/', 'name=foo', 'type=d') %}
{% for direc in dir_list %}
# do stuff
{% endfor %}