Skip to content

Instantly share code, notes, and snippets.

@raziele
raziele / new_presentation.sh
Created July 16, 2022 14:26
Create a new reveal.js presentation
#!/bin/bash
PRESENTATION_NAME=${1:?"Give a name to the presentation"}
DESTINATION=${2:-$(pwd)}
echo $DESTINATION
FULLPATH=$DESTINATION/$PRESENTATION_NAME
git clone https://github.com/hakimel/reveal.js.git $FULLPATH && cd $FULLPATH
% Diagram of the LQFP 48 pins IC version for SN32F707
% based on Andrew's work:
% https://tex.stackexchange.com/questions/202230/how-to-draw-an-integrated-circuit-pin-configuration-like-in-data-sheets
\documentclass{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[scale=0.38,pin/.style={draw,rectangle,minimum width=1.8em,font=\small}]
% Main trick: loop over the label numbers and then adjust their position
@raziele
raziele / install_gnuradio.sh
Created December 14, 2019 22:17
A script to download and install GnuRadio 3.8 on MacOS (works on Catalina)
#!/bin/bash
# This script installs gnuradio 3.8
# Assuming homebrew is installed
# TODO: also install other modules (e.g gr-osmocomm)
#
# Step 1: Install Homebrew packages
echo "Installing necessary packages from Homebrew"
BREW_PACKAGES_LIST=(
@raziele
raziele / svg2png_imagemagick
Created February 4, 2019 21:56
Convert SVG to PNG with transparent background
mogrify -path DESTINATION_PATH -background none -format png SOURCE_PATH/*.svg
@raziele
raziele / gist:984cf0f112e3bbc42f184cd0597b330f
Last active March 12, 2023 18:35
A command-line piping of rtl_power. Scans frequency band for signals stronger than a threshold (-28dBFS in the example) and prints out the frequency
rtl_power -f 130M:170M:2.8M -g 30 -i 1 | awk -F ',' '{if ($7 > -28) print 1e-6*($3 + ($4 - $3) / 2)}'