Skip to content

Instantly share code, notes, and snippets.

View dagelf's full-sized avatar

Coenraad Loubser dagelf

View GitHub Profile
@dagelf
dagelf / macs.pl
Created September 13, 2024 16:38
Convert all MAC addresses into their vendor names, pipe macs in or out, resolve lots of macs locally, quickly
#!/usr/bin/perl
# if it doesn't work, try:
# sudo cpan install Text::CSV
use strict;
use warnings;
use File::stat;
use Text::CSV;
@dagelf
dagelf / 2600Hz_Kazoo.md
Created April 14, 2023 09:29 — forked from ruhnet/2600Hz_Kazoo.md
2600Hz Kazoo 4.3 Notes

RuhNet: 2600Hz Kazoo Notes

Cluster Topology Possibilities

Any service can be separated and run on its own server. Commonly used config:

  • Kazoo Servers: HAProxy, RabbitMQ, Kamailio SIP Proxy, Kazoo eCall Manager, Kazoo Applications, (Monster UI)
  • Freeswitch Servers: HAProxy, Freeswitch
  • Bigcouch Database Servers: Bigcouch or CouchDB (I use CouchDB v3.0)
@dagelf
dagelf / gist:bfd5e61f067e5350362d57b28e5ed4e4
Created April 1, 2023 23:49
"The Algorithm goes open source" - 2023-03-31 - Twitter open source release - Transcript with Whisper
Source: https://twitter.com/i/spaces/1jMJgLdenVjxL
With timestamps: https://gist.github.com/dagelf/b94763167c5042181707479f4c815f9e
Let's see, hello everyone.
Hey everyone, David Shapiro here.
All righty, hello everyone, we're going to give folks a few more minutes to join.
We're also waiting on Elon.
So we'll get started shortly.
Let's see, hello everyone.
Can you guys hear me okay?
@dagelf
dagelf / gist:b94763167c5042181707479f4c815f9e
Created April 1, 2023 23:49
"The Algorithm goes open source" - 2023-03-31 - Twitter open source release - Transcript with Whisper incl. timestamps
[00:00.000 --> 00:05.120] Let's see, hello everyone.
[01:00.000 --> 01:06.000] Hey everyone, David Shapiro here.
[01:30.000 --> 01:48.960] All righty, hello everyone, we're going to give folks a few more minutes to join.
[01:48.960 --> 01:53.400] We're also waiting on Elon.
[01:53.400 --> 02:12.280] So we'll get started shortly.
[02:12.280 --> 02:14.800] Let's see, hello everyone.
[02:14.800 --> 02:18.280] Can you guys hear me okay?
[02:18.280 --> 02:20.960] Loud and clear.
[02:20.960 --> 02:23.160] Okay great.
[02:23.160 --> 02:31.880] Well, we're excited to open source the Twitter recommendation algorithm.
@dagelf
dagelf / abduct.sh
Created July 8, 2019 16:59
No Xmodem, Zmodem, ftp,scp? Abduct a file from an embedded system with busybox hexdump!
hexdump -v -e '/1 "%02x"' file
# copy and paste
xxd -r -p > file
@dagelf
dagelf / bench.md
Last active April 22, 2019 21:58
Quick & Dirty Benchmarking

Join IRCNet #bench and post results

Harddrives

# seq read 
sudo nice --20 dd if=/dev/sdb of=/dev/null bs=1M count=1k iflag=direct
# random read
sudo nice --20 fio --name=global --rw=randread --bs=4k --direct=1 --numjobs=8 --iodepth=4 --ioengine=mmap --filename=/dev/sdb --name=job1 --runtime=10s
# or ioengine=sg but doesn't work on some mmc
@dagelf
dagelf / sip_speaker.py
Created June 1, 2018 10:42 — forked from hu55a1n1/sip_speaker.py
PJSIP: Play incoming call on audio device in python
#!/usr/bin/python
#
#
# Copyright (C) 2003-2008 Benny Prijono <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@dagelf
dagelf / miniupnp_port_forwarder.c
Created June 1, 2018 10:41 — forked from hu55a1n1/miniupnp_port_forwarder.c
Port forwarder using miniupnp library
/* $Id: upnpc.c,v 1.101 2014/01/31 13:18:25 nanard Exp $ */
/* Project : miniupnp
MiniUPnPc
Copyright (c) 2005-2016, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
@dagelf
dagelf / grandstream-configurator.php
Created June 1, 2018 10:41 — forked from hu55a1n1/grandstream-configurator.php
CLI tool for automatic discovery and bulk provisioning of Grandstream IP phones
<?php
function to_str($obj) {
ob_start();
var_dump($obj);
return ob_get_clean();
}
function str_btw($string, $start, $end){
$string = ' ' . $string;
@dagelf
dagelf / n.sh
Last active July 17, 2023 02:21 — forked from radu-gheorghe/traffic.sh
Netspeed 2 - gets Linux network interface throughput speed from /proc/net/dev; busybox bash/awk/sed compatible, good for embedded OpenWRT or UBNT / Ubiquiti, etc routers
#!/bin/sh
# Copy the contents of this file to the clipboard, then get a terminal open on your device and enter:
# $ cat > n.sh
# [Ctrl+V] or Right Click, Paste. Then [Ctrl+D].
# chmod +x n.sh
# To run: ./n.sh eth0
SLP=1 # display / sleep interval
DEVICE=$1
IS_GOOD=0
for GOOD_DEVICE in `grep \: /proc/net/dev | awk -F: '{print $1}'`; do