Skip to content

Instantly share code, notes, and snippets.

View mlegner's full-sized avatar

Markus Legner mlegner

View GitHub Profile
@mlegner
mlegner / pyproject.toml
Created June 7, 2022 14:26
Dummy pyproject.toml with empty name
[tool.poetry]
name = ""
version = "0.1.0"
description = ""
authors = []
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.8"
@mlegner
mlegner / fastcommand.sh
Created November 13, 2019 09:28 — forked from giacgiuliari/fastcommand.sh
Magic fastcommand script
#### EXPERIMENTAL
# Requires fzf
# Paste this in .bashrc
# The default command file id ~/.commands
COMMANDS_FILE="~/.commands"
__best_command__(){
local cmd
shopt -u nocaseglob nocasematch
# cmd=$(cat $COMMANDS_FILE | fzf --height 50% | command grep '^ *[0-9]') &&
@mlegner
mlegner / keybase.md
Created April 15, 2019 08:26
Keybase proof

Keybase proof

I hereby claim:

  • I am mlegner on github.
  • I am mlegner (https://keybase.io/mlegner) on keybase.
  • I have a public key ASCL-whKGaWzxap1F8aNc6M64BjbPJCQuxqdmv8UUBBIhgo

To claim this, I am signing this object:

@mlegner
mlegner / a2dp_connect.sh
Created June 20, 2018 14:21
Short script that connects properly to my bluetooth headphones and enables A2DP mode
#!/bin/bash
# Connect to the bluetooth headphones properly and enable A2DP
mac="AA:AA:AA:AA:AA:AA" # the MAC address of the bluetooth headphones
cardname="bluez_card.AA_AA_AA_AA_AA_AA" # the audio-card name associated with the bluetooth headphones
timeout=5 # timeout for connecting
coproc bluetoothctl
echo -e "connect $mac" >&${COPROC[1]}
timeout $timeout grep -q "ServicesResolved: yes" <&${COPROC[0]} || echo -e "connect $mac" >&${COPROC[1]}