Skip to content

Instantly share code, notes, and snippets.

View allista's full-sized avatar

Allis Tauri allista

View GitHub Profile
@allista
allista / generate-keywords
Created September 14, 2024 14:05
Simple python script to generate kewords.txt for arduino library from its sources
#!/usr/bin/env python3
import os
import re
import argparse
class Keywords:
def __init__(self):
self.functions = set()
@allista
allista / streaming-tar.py
Last active December 29, 2024 06:07 — forked from chipx86/streaming-tar.py
Sample code to build a tar chunk-by-chunk and stream it out all at once.
# Building a tar file chunk-by-chunk.
#
# This is a quick bit of sample code for streaming data to a tar file,
# building it piece-by-piece. The tarfile is built on-the-fly and streamed
# back out. This is useful for web applications that need to dynamically
# build a tar file without swamping the server.
import tarfile
from io import BytesIO
@allista
allista / SubmodelResizer.cs
Last active February 4, 2017 08:14
Simple PartModule for KSP that rescales part of the transform tree of part model.
// SubmodelResizer.cs
//
// Author:
// Allis Tauri <[email protected]>
//
// Copyright (c) 2017 Allis Tauri
using UnityEngine;
namespace AT_Utils
{
@allista
allista / Drawing.cs
Created January 27, 2017 22:27
Line drawing routine originally courtesy of Linusmartensson
using System.Reflection;
using UnityEngine;
// Line drawing routine originally courtesy of Linusmartensson:
// http://forum.unity3d.com/threads/71979-Drawing-lines-in-the-editor
//
// Rewritten to improve performance by Yossarian King / August 2013.
//
// This version produces virtually identical results to the original (tested by drawing
// one over the other and observing errors of one pixel or less), but for large numbers