Skip to content

Instantly share code, notes, and snippets.

@christf
christf / vcf2linphone
Created January 25, 2023 23:35
this conveys a directory of vcf files (as obtained by vdirsyncer) into the friends.db sqlite database from linphone such that the contacts are visible in linphones addressbook
#!/bin/bash
dbfile=~/.local/share/linphone/friends.db # the sqlite3 database from linphone used for the address book
contactsdir=~/.contacts # the directory that is used by vdirsyncer to place the vcf files
asterisk_hostname=ned # use your asterisks hostname here
# vcard parser
# sed 's/.\{75\}/&\n /g'
# get all the lines that begin with space and join them to the previous one
# all the lines end up in an array called lines
@christf
christf / clat-mtu issue
Last active November 20, 2019 00:30
ipv4 packet loss problem
# Freifunk CLAT Issue
* We have a client c connected to a Freifunk node n
* C obtains an ipv4address 10.139.12.13 from n via dhcp
* n has an ipv4 next-node-address of 10.139.0.1
* n is connected to the rest of the freifunk infrastructure via VPN with MTU m
* The freifunk infrastructure is ipv6-only.
* n runs a clat kernel module translating ipv4 to ipv6 such that c can connect
anywhere in ipv6-land.
#!/bin/bash
# this is working under the assumption that oid are 4 digit only.
odir=oid
bdir=background
adir=audio
cdir=codes
yamlfile=$1
density=600
#!/bin/bash
output="$1"
dir="$2"
shopt -s nullglob
{
echo product-id: $((RANDOM%1024))
echo "media-path: $dir/%s"
echo "comment: An example GME file"
echo "init: $mode:=1"
echo "welcome: START"
@christf
christf / brctl show
Last active October 17, 2016 20:34
babel-netz l3roamd
bridge name bridge id STP enabled interfaces
br-client 7fff.647002bbdb00 no eth0
client0
br-wan 7fff.647002bbdb01 no eth1