Skip to content

Instantly share code, notes, and snippets.

@stefan-wegener
stefan-wegener / pi-calling.md
Created February 22, 2019 09:03
Bluetooth + Pulseaudio + Linphone on a Raspberry Pi

Bluetooth

Add user pi to bluetooth group

sudo adduser pi bluetooth
newgrp bluetooth

Change capabilities of bluetooth-service (/lib/systemd/system/bluetooth.service) add CAP_NET_RAW

CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW
@stefan-wegener
stefan-wegener / python-mssql.md
Created August 2, 2018 06:43
Python: Connect with MSSQL DB
@stefan-wegener
stefan-wegener / mssql.txt
Last active February 24, 2017 12:44
MSSQL Connection under Linux (Ubuntu/Raspbian)
Packages to install:
apt-get install libmyodbc unixodbc-bin freetds-dev freetds-bin tdsodbc unixodbc unixodbc-dev unixodbc-bin libodbc1 libtool autotools-dev
The path: /usr/lib/x86_64-linux-gnu/odbc/ may vary (under Raspbian it is: /usr/lib/arm-linux-gnueabihf/odbc/)
/etc/odbc.ini:
[<name>]
Driver = FreeTDS
Servername=<yourname>
Port = 1433
@stefan-wegener
stefan-wegener / SSH.md
Last active September 10, 2019 13:34
SSH

Create key

ssh-keygen -b 4096 -t rsa -C <comment> -f <keyfile-name>

Config

Create file ~/.ssh/config

Host 10.8.0.1
 Hostname 10.8.0.1
Multiple environments with different DB connections:
Besides appsettings.json, create appsettings.development.json, appsettings.staging.json, appsettings.production.json and move your connections strings there.
In code:
cs: if (env.IsDevelopment()) { ... }
cshtml: <environment names="Development"> ... </environment>
@stefan-wegener
stefan-wegener / jenkins.md
Last active July 11, 2018 07:35
Jenkins Pipeline

Variable usage

echo '${test}' // prints ${test}
echo "${test}" // prints value of variable

Loops