Skip to content

Instantly share code, notes, and snippets.

@Bugaddr
Bugaddr / dit-fft.m
Last active March 31, 2025 12:54
MATLAB Code for computing DFT using DIT-FFT with Butterfly Diagram
clc;
clear;
close all;
% Given sequence
X = [1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0];
N = length(X); % Length of sequence (must be power of 2)
% Bit-reversal permutation
bit_rev_order = bitrevorder(0:N-1) + 1;
@Bugaddr
Bugaddr / daily-whatis.sh
Created May 26, 2024 17:25
Shell script for printing whatis for executables in /usr/bin folder randomly, just to make you curious and maybe you will find some new command :)
#!/usr/bin/env bash
# File to store previously printed commands
printed_commands_file=~/.local/share/daily-whatis/databases/printed_commands_db.txt
# Check if the file exists, if not create it
if [ ! -f "$printed_commands_file" ]; then
mkdir -p "$(dirname "$printed_commands_file")" # Ensure directory exists
touch "$printed_commands_file" # Create the file
fi