Skip to content

Instantly share code, notes, and snippets.

View lyntco's full-sized avatar

Lyn Cooper lyntco

  • Sydney Australia
View GitHub Profile
@tylerlindell
tylerlindell / reduce_faces.py
Last active October 24, 2022 16:52
script for reducing faces programmatically with Meshlab's api
#!/usr/bin/env python
import sys
import os
import subprocess
# Script taken from doing the needed operation
# (Filters > Remeshing, Simplification and Reconstruction >
# Quadric Edge Collapse Decimation, with parameters:
# 0.9 percentage reduction (10%), 0.3 Quality threshold (70%)
// Put this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// In PhotoShop menu File > Automate > Scripts: layersToSprite.js
// Arrange layers into a sprite sheet.
if (documents.length > 0)
{
// --------------------------
docRef = activeDocument;
@damncabbage
damncabbage / multiple_objects.rb
Created June 8, 2014 09:12
Writing Object to CSV
require 'csv'
# A class and object of some sort.
# (Ignore the OpenStruct thing; I'm being lazy when I'm making my example objects.)
require 'ostruct'
class Car < OpenStruct(:name, :made_in)
end
cars = [
Car.new(name: "Shitbox Mazda", made_in: 1992),