Skip to content

Instantly share code, notes, and snippets.

View gvanem's full-sized avatar

Gisle Vanem gvanem

View GitHub Profile
@gvanem
gvanem / msvc-sse2-crash.c
Last active July 4, 2018 07:35
MSVC cl internal error test-case. Crashes on "Version 19.13.26129 for x86". Maybe others too.
/*
* MSVC cl internal error test-case.
*
* An 'cl' optimiser bug that triggers this message while compiling a GnuRadio volk/lib .c-file:
*
* msvc-sse2-crash.c(82) : fatal error C1001: An internal error has occurred in the compiler.
* (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 260)
* To work around this problem, try simplifying or changing the program near the locations listed above.
* Please choose the Technical Support command on the Visual C++
* Help menu, or open the Technical Support help file for more information
@gvanem
gvanem / mk-opt-err-list.mak
Last active January 15, 2021 12:49
A Gnu-makefile to generate a file (curl_opt_err.c) with all current 'CURLOPT_x' and 'CURLE_x' values.
#
# A Gnu-makefile to generate a C-program ($(PROGRAM).c) with all
# current 'CURLOPT_x' and 'CURLE_x' values.
#
# NB! must be invoked from libcurl's './lib' directory.
#
# By G. Vanem <[email protected]> 2014 - 2018.
#
# The basename of what this makefile generates;
# A 'curl_opt_err.c' and a 'curl_opt_err.exe' (on Windows).
@gvanem
gvanem / mkhelp.py
Created June 5, 2018 11:00
Python version of curl's Perl-script mkhelp.pl. Ref: https://github.com/curl/curl/blob/master/src/mkhelp.pl
#!/usr/local/bin/python
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2014, Daniel Stenberg, <[email protected]>, et al.
#
@gvanem
gvanem / win32-stuff.c
Last active September 10, 2018 13:51
Win32-only functions to return extended information for network adapters. Used with "windump -Dv"
/*
* Winpcap stuff for Win32 only:
*
* 1) Simple trace function used by WINDUMP_TRACE() macro in netdissect.h.
* 2) Colourised 'ndo_printer'.
* 3) Low-level NDIS/Packet32 stuff that doesn't fit anywhere else.
*
* Written by G. Vanem <[email protected]> 2014.
*/
@gvanem
gvanem / Makefile.MSVC
Last active June 28, 2018 00:40
A GNU-makefile for Welle-IO; the RTL_SDR based DAB+ receiver from https://github.com/AlbrechtL/welle.io. Supports only MSVC and clang-cl. Building with MSVC needs lots of patches to be applied.
#
# GNU-makefile for Welle-IO (MSVC / clang-cl, 32-bit)
#
# By G. Vanem <[email protected]> 2017.
#
THIS_FILE := Makefile.MSVC
DATE := $(shell date +%d-%B-%Y)
#
# What to build:
@gvanem
gvanem / Makefile.Windows
Last active May 26, 2018 02:57
A makefile for Ettercap supporting MSVC, clang-cl and MinGW (the latter is little tested). Ref: https://github.com/Ettercap/ettercap
#
# Ettercap NG Makefile for MinGW / cl / clang-cl.
# by G. Vanem <[email protected]> 2011 - 2018.
#
THIS_FILE = Makefile.Windows
#
# Comment this away to NOT rebuild too many things when $(THIS_FILE) changes.
#
MDEPEND = $(THIS_FILE)
@gvanem
gvanem / Makefile.MSVC
Last active February 7, 2024 09:28
A GNU-makefile for Pycurl/MSVC (tired of 'setup.py build' problems on Windows). Put in 'src' directory of Pycurl and do 'make -f Makefile.MSVC clean install'
#
# GNU makefile 4.x for pycurl (MSVC)
#
# By <[email protected]> 2013 - 2024.
#
THIS_FILE := $(firstword $(MAKEFILE_LIST))
DATE := $(shell date +%d-%B-%Y)
YEAR := $(shell date +%Y)
VERSION := 7.45.2
@gvanem
gvanem / Makefile.Windows
Last active February 23, 2018 12:28
GNU makefile for libusb using MSVC, MinGW or clang-cl (32-bit only). With an added "example/usb_enum.c" to print information on all USB-devices (optionally using HID-API from https://github.com/signal11/hidapi)
#
# GNU Makefile for libusb (MinGW + MSVC + clang-cl).
#
# By G. Vanem <[email protected]> 2013.
#
DATE := $(shell date +%d-%B-%Y)
VPATH = libusb libusb/os examples
THIS_FILE = Makefile.Windows
@gvanem
gvanem / SpyServerPoll.py
Last active January 29, 2022 18:21
Python script to poll a list of AirSpy servers from the list at https://airspy.com/spy-servers/ + some more. Use as e.g: py -3 SpyServerPoll.py -c sdr://k2*
"""A Python script to poll a list of AirSpy, Kiwi and SDR-Console (V3) servers.
"""
#
# By G. Vanem <[email protected]> 2018
#
# The Gist is here:
# https://gist.github.com/gvanem/8a83e5f5dd487af4bf4e73c0f81c5393
#
# todo: OpenWebRX and WebSockets like this:
@gvanem
gvanem / Welle-IO-multiple-instances.diff
Last active January 28, 2018 11:27
A diff to enable multiple SDR-sticks in Welle-IO
diff -Hb -u3 a/src/CRadioController.cpp src/CRadioController.cpp
--- a/src/CRadioController.cpp 2018-01-25 17:15:49
+++ b/src/CRadioController.cpp 2018-01-28 11:08:21
@@ -185,6 +185,8 @@
QString dabDevice = "auto";
#endif
+ int instance = 0;
+
#ifdef HAVE_SOAPYSDR