Skip to content

Instantly share code, notes, and snippets.

View elihe999's full-sized avatar

Yili He elihe999

  • Shenzhen
View GitHub Profile
@elihe999
elihe999 / flashingpushbutton.h
Created October 18, 2019 07:00 — forked from jniemann66/flashingpushbutton.h
Making a flashing button in Qt
#ifndef FLASHINGPUSHBUTTON_H
#define FLASHINGPUSHBUTTON_H
#include <QPushButton>
#include <QTimer>
// class flashingPushButton
// Description: a QPushButton which flashes on and off whenever it is Disabled (to indicate that the app is busy processing ...)
class flashingPushbutton : public QPushButton{
@elihe999
elihe999 / pcap2wav
Created July 12, 2018 04:01 — forked from avimar/pcap2wav
Convert raw PCAP files into a .wav file
#!/bin/bash
#
# pcap2wav
# Original Author: Michael Collins <msc@freeswitch.org>
#Standard disclaimer: batteries not included, your mileage may vary...
# Updated by Avi Marcus <avi@bestfone.com>
#
# Accepts arg of pcap file w/only 2 RTP streams
# Creates a .<codec> file and a .wav file
# For codecs other than PCMA and PCMU the script calls fs_cli and does a little recording to create the wav file(s)
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@elihe999
elihe999 / extract_rtp.sh
Created June 22, 2018 02:24 — forked from lanuma/extract_rtp.sh
Extract RTP from pcap to raw and convert to wav
#!/bin/bash
pcap_file="voip.pcap"; #nama file pcap
audio_output="suara.wav"; #output audio
raw_file="suara.raw"; #nama raw file hasil extract
if [ $EUID -ne 0 ]; then
echo "This script must be run as root";
exit 1;
fi