Skip to content

Instantly share code, notes, and snippets.

View polprog's full-sized avatar

polprog

View GitHub Profile
@polprog
polprog / l4t.md
Last active March 23, 2025 14:29
Linux for Tegra on TX1 (2025)

Flashing jetson tx1 without using the nvidia SDK gui tool

Because it sucks so bad, it even fails to flash the TX1 as of march 2025. Also, it does not let you flash to the SD card, and there is a million other reasons not to use it

0. Files needed (sha512 sums)

017e6c0f5f903d0b3f50454b45d41a86b693a11c6cba37eec32e5e110e1f37ef4163b568a8d60ca51cba472c430567dd828bf03fee8a174442d1ac2239e25df9 Tegra_Linux_Sample-Root-Filesystem_R32.7.5_aarch64.tbz2
8c188dbc85eab38c589470e9e81c367e8a5b73e4f4f7450d825550fc7b750c2393bf7260f3c65b2e947ef74469b828831de168ec0bb9563b841c73048bce1dee Jetson-210_Linux_R32.7.5_aarch64.tbz2

You can get them from the NVIDIA SDK installer (select "download only"). Please note that it ONLY works in ubuntu 16.04 LTS, and if you are planning to run it in a VM, it only works with VMWare. VirtualBox USB passthrough is broken. Allocate at least 60GB for the virtual HDD.

#!/bin/bash
# Bash replacement of the PDFsearch.php script
# TONS AND TONS of ugly hacks here, pray it works
# -- polprog
# Version 1.0: oct 2024
PDFVIEWER=evince
term=""
doit() {
@polprog
polprog / memrun.c
Created July 15, 2024 06:53
memrun.c
#define _GNU_SOURCE
#include <stdio.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
# The main tex file which \input's the section files
MAINTEX=TO BE FILLED BY OEM
# The section tex files
TEXFILES=TO BE FILLED BY OEM
OUTPUT=output/
all: dirs html pdf
dirs:
mkdir -p ${OUTPUT}
#!/bin/bash
# Convert youtube timestamps to CUE file
# polprog 2024
# Released on 3 clause BSD License
# Use: ./yt2cue.sh [description.txt] > title.cue
filename=$1
gawk '
BEGIN { FS = "-"; trackid = 1;
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <time.h>
/* Plant like 2d cellular automaton by polprog <[email protected]>
03.02.2022
Prototype program
/** hexdump.h */
/*
Hexdump functions
polprog 2021. Released on 3-clause BSD
*/
#ifndef _HEXDUMP_H
#define _HEXDUMP_H
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: Polprog Computer Heresy Systems
// Engineer: The Man Himself
//
// Create Date: 17:38:08 02/10/2020
// Design Name:
// Module Name: test
// Project Name:
// Target Devices:
/* PDFsearch - PDF indexing script
This script will search and generate a list of links for matching filenames inside a
given directory in the WWW root. Change the target directory inside the exec() call.
polrog, rue_mohr 2022
*/
<html>
<head>
<title>Datasheet Search Results</title>
@polprog
polprog / mount_qcow2.md
Last active August 23, 2019 09:02 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8