Skip to content

Instantly share code, notes, and snippets.

View khorsmann's full-sized avatar

Karsten Horsmann khorsmann

  • Germany / Hanover
View GitHub Profile
#!/usr/bin/env ruby
#
# 2012-03-2012 -- jesus.perez _at_ quobis _dot_ com
#
# Apache Ruby script to interop between FreeSWITCH and Kamailio.
# It uses Siremis database schema:
#
# mysql> use openser;
# Database changed
# mysql> desc subscriber;
#!KAMAILIO
#
# Kamailio (OpenSER) SIP Server v4.0 - default configuration script
# - web: http://www.kamailio.org
# - git: http://sip-router.org
#
# Direct your questions about this file to: <sr-users@lists.sip-router.org>
#
# Refer to the Core CookBook at http://www.kamailio.org/wiki/
# for an explanation of possible statements, functions and parameters.
@khorsmann
khorsmann / graphite.md
Last active August 29, 2015 14:20 — forked from ashrithr/graphite.md

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know

@khorsmann
khorsmann / easyRTC.sh
Created October 7, 2016 12:42 — forked from sbeleidy/easyRTC.sh
Easy RTC setup with reTURN
#####
# Signalling Server Setup ex: EasyRTC
# See https://easyrtc.com/docs/guides/easyrtc_server_install.php
# This assumes you followed https://gist.github.com/sbeleidy/f4cd7e96dc0910dbc27cc6845d8b4d22 and
# https://gist.github.com/sbeleidy/3a23999d8e9e5da9adc6159c3742b42b for SSL and reTURN setup
#####
# Install node
sudo apt-get install nodejs
sudo apt-get install npm
@khorsmann
khorsmann / kipimi0-100-cpu
Created July 20, 2017 14:31 — forked from maxp/kipimi0-100-cpu
kipmi0 100% CPU workaround
echo 100 > "/sys/module/ipmi_si/parameters/kipmid_max_busy_us"
git clone https://github.com/sipwise/rtpengine.git
cd rtpengine/
git archive --format=tar.gz --prefix=ngcp-rtpengine-4.5.0/ HEAD >/root/rpmbuild/SOURCES/ngcp-rtpengine-4.5.0.tar.gz
cd el
yum-builddep rtpengine.spec
yum install json-glib json-glib-devel libevent-devel libpcap-devel
yum install kernel-devel
cd /root/rpmbuild/SPECS
rpmbuild -ba rtpengine.spec
@khorsmann
khorsmann / gist:f35a03fb32f848c096fef887e1366276
Created October 25, 2017 07:58
how-to-amend-several-commits-in-git-to-change-author
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "wrong-email@address.example" ]; then
GIT_AUTHOR_EMAIL=correct-email@address.example;
GIT_AUTHOR_NAME="Your Name";
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
git push origin master -f
https://stackoverflow.com/questions/4981126/how-to-amend-several-commits-in-git-to-change-author
@khorsmann
khorsmann / auto-poweron.sh
Last active April 23, 2018 14:35
VMWare ESX 6.5 check VM powerstate on CLI
#!/bin/sh
startit() {
vmids=$@
for vmid in $vmids
do
echo -n "check $vmid powerstate: "
stat1=$(vim-cmd vmsvc/power.getstate "$vmid" | grep "off")
if [ "$stat1" == "Powered off" ]
then
#!/bin/sh
# /vmfs/volumes/datastore1/shutdown-all-vms.sh
shutdownmode=soft # could be soft,hard,force
VMLIST=`esxcli vm process list | grep "World ID" | cut -d \: -f2`
for config in ${VMLIST}
do
esxcli vm process kill --type=${shutdownmode} --world-id=${config}
done
sleep 2
echo "show esxcli vm process list"
@khorsmann
khorsmann / onliner - VMWARE ESX - set tools.syncTime
Created April 23, 2018 12:44
onliner - VMWARE ESX - set tools.syncTime
# https://kb.vmware.com/s/article/1189
grep -l 'tools.syncTime = "FALSE"' /vmfs/volumes/datastore1/*/*.vmx | xargs sed -i 's/tools.syncTime = "FALSE"/tools.syncTime = "TRUE"/'