Skip to content

Instantly share code, notes, and snippets.

View allista's full-sized avatar

Allis Tauri allista

View GitHub Profile
@allista
allista / streaming-tar.py
Last active July 15, 2018 18:32 — 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 <allista@gmail.com>
//
// 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