Skip to content

Instantly share code, notes, and snippets.

View jynik's full-sized avatar

Jon Szymaniak jynik

View GitHub Profile
@jynik
jynik / matlab-connerr-workaround.sh
Last active September 30, 2021 03:40
Workaround for MATLAB R2017a Installer TLS Connection Failure Issue
#!/bin/bash
#
# Attempt to run MATLAB installer using system Java installation, rather than
# that bundled inside the installer, in an attempt to work around the
# activation/download connection error:
#
# https://www.mathworks.com/matlabcentral/answers/92634-why-do-i-get-a-connection-error-when-installing-or-activating-matlab-or-another-mathworks-product#answer_797409
#
# Tested on Ubuntu 20.04.2 LTS with openjdk-8-jre:
# openjdk version "1.8.0_292"
@jynik
jynik / imperfect-design.md
Created July 22, 2021 23:29 — forked from dev-zzo/imperfect-design.md
A curated list of research papers on embedded security, keyed by the device p/n
@jynik
jynik / rich_hexdump.py
Created May 28, 2020 03:32
Ugly colorized hexdump example
#!/usr/bin/env python3
"""
A simple hex dump example with colorized output.
Per request, the output is structured with ASCII aligned
with corresponding data bytes, rather than the canonical
style typically used in hex dumps (e.g. hexdump -C).
The colorization is performed in a second pass, rather than
during a single pass, just to separate the requested example
@jynik
jynik / md5sum-diff
Last active June 26, 2023 03:04
Compare two files containing (default) md5sum output and print results.
#!/usr/bin/env python3
#
# Copyright (C) 2018 Jon Szymaniak <[email protected]>
# SPDX License Identifier: MIT
#
# Compare two files containing (default) md5sum output and print results.
#
################################################################################
__version__ = '0.1.1'
@jynik
jynik / ready_set_yocto.txt
Last active May 16, 2024 06:30
Ready, Set, Yocto! (v0.3) : A short guide to getting started with Yocto
================================================================================
Ready, Set, Yocto! (v0.3)
A short guide to getting started with Yocto
using YP Rocko 2.4 the Raspberry Pi
jynik
================================================================================
-------------------------------------------------
1. Intro
@jynik
jynik / carray.c
Created November 20, 2017 16:47
carray - Print a binary file as a C array
/*
* Print the contents of a binary file as a C array.
*
* SPDX License Identifier: MIT
* (C) 2017 Jon Szymaniak <[email protected]>
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@jynik
jynik / regfield.py
Last active October 22, 2015 19:24
Simple register field calculator
#!env python3
#
# Copyright (c) 2015 Jon Szymaniak <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@jynik
jynik / bladeRF-versions.mk
Created June 28, 2015 03:49
Makefile for bladeRF-versions, with cross-compiling options (via a Yocto build)
#
# Simple cross-compilation example for Yocto-based toolchains and bladeRF
#
# Host build:
# make
#
# Wandboard Quad build:
# PLATFORM=wandboard-quad YOCTO_BUILD_DIR=path/to/build/dir make
#
# Raspberry Pi 2 build:
@jynik
jynik / bladeRF-versions
Created June 28, 2015 03:18
Print bladeRF library and device versions
#include <stdlib.h>
#include <stdio.h>
#include <libbladeRF.h>
int main(int argc, char *argv[])
{
int ret = 0;
int status;
struct bladerf *dev;
const char *dev_specifier = NULL;
@jynik
jynik / bladerf_build_all.sh
Created November 11, 2014 16:38
bladeRF: Perform debug and release builds with GCC and Clang
#!/bin/bash
set -e
readonly CLANG=/usr/bin/clang
readonly SCAN_BUILD_PATH=/usr/share/clang/scan-build/
readonly SCAN_BUILD=$SCANBUILD_PATH/scan-build
readonly CCC_ANALYZER=$SCAN_BUILD_PATH/ccc-analyzer
# $1 Name
# $2 Debug/Release