Skip to content

Instantly share code, notes, and snippets.

View sultanqasim's full-sized avatar

Sultan Qasim Khan sultanqasim

View GitHub Profile
@sultanqasim
sultanqasim / build_sigdigger_linux.sh
Created May 23, 2024 17:04
Simpe SigDigger build script for Linux
#!/bin/sh
#
set -eux
CPU_COUNT="$(nproc)"
# get the code
if [ ! -e sigutils ]; then
git clone -b develop --recurse-submodules https://github.com/sultanqasim/sigutils.git
fi
@sultanqasim
sultanqasim / build_sigdigger_mac.sh
Last active September 3, 2023 09:39
Simple (non-deployable) build script for SigDigger on Mac (including Apple Silicon)
#!/bin/sh
#
set -eux
BREW_PREFIX="$(brew --prefix)"
CPU_COUNT="$(sysctl -n hw.ncpu)"
# Homebrew dependencies
brew update
brew install volk fftw libsndfile libxml2 portaudio qt@6
@sultanqasim
sultanqasim / build_sigdigger_mac_dmg.sh
Last active February 16, 2024 16:32
SigDigger build script for my unofficial branch for Mac OS (including Apple Silicon)
#!/bin/sh
#
set -eux
BREW_PREFIX="$(brew --prefix)"
CPU_COUNT="$(sysctl -n hw.ncpu)"
QT_PATH="${HOME}/Qt/6.5.3/macos"
# Homebrew dependencies
@sultanqasim
sultanqasim / build_gqrx.sh
Last active August 10, 2023 22:57 — forked from Forst/build_gqrx.sh
Gqrx macOS build script (including Apple Silicon support)
#!/bin/sh
set -eux
BREW_PREFIX="$(brew --prefix)"
CPU_COUNT="$(sysctl -n hw.ncpu)"
# Homebrew dependencies
brew update
brew install airspy airspyhf boost dylibbundler gnuradio hackrf libbladerf librtlsdr libserialport libsndfile portaudio pybind11 uhd qt@6
static int handle_dnload(struct usb_gadget *gadget, u16 len)
{
struct usb_composite_dev *cdev = get_gadget_data(gadget);
struct usb_request *req = cdev->req;
struct f_dfu *f_dfu = req->context;
if (len == 0)
f_dfu->dfu_state = DFU_STATE_dfuMANIFEST_SYNC;
req->complete = dnload_request_complete;
static int
dfu_handle(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
{
struct usb_gadget *gadget = f->config->cdev->gadget;
struct usb_request *req = f->config->cdev->req;
struct f_dfu *f_dfu = f->config->cdev->req->context;
if (req_type == USB_TYPE_STANDARD) {
} else /* DFU specific request */
@sultanqasim
sultanqasim / .bashrc
Last active September 10, 2022 16:31
Fedora Colour Bash Prompt PS1
case "$TERM" in
xterm-color|*-256color)
PS1='[\[\e[1;32m\]\u@\h \[\e[1;34m\]\W\[\e[m\]]\$ '
;;
*)
PS1='[\u@\h \W]\$ '
;;
esac
@sultanqasim
sultanqasim / LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR.html
Last active July 10, 2020 21:46
Modernized specification for LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
<title>LINKTYPE_BLUETOOTH_LE_LL_WITH_PHDR</title>
<link href="tcpdump-style.css" rel="stylesheet" type="text/css" media="screen">
</head>
<body>
<div id="page">
<div class="post">
@sultanqasim
sultanqasim / fedora_android_deps
Last active April 30, 2017 14:25
Dependencies for building Android on Fedora 25
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod +x ~/bin/repo
sudo dnf install python glibc.i686 libstdc++.i686 java maven ccache schedtool ncurses-compat-libs m4 xz-lzma-compat ImageMagick
sudo ln -s /usr/lib/jvm/java-1.8.0-openjdk /usr/lib/jvm/java-8-openjdk-amd64
@sultanqasim
sultanqasim / fstab
Last active June 23, 2016 04:57
Raspberry Pi fstab addtions
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=120m 0 0
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=50m 0 0