Skip to content

Instantly share code, notes, and snippets.

@awesomebytes
awesomebytes / reduce_faces.py
Created April 6, 2016 23:23
Executing meshlab from commandline reduce faces of a mesh iteratively
#!/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%)
@trishume
trishume / DataShipper.cs
Created March 17, 2016 19:04
Tobii EyeX UDP data shipper to VMWare VM host.
// Used to send data from a VMWare VM running the EyeX software
// with a Steelseries Sentry to a Mac OSX host over UDP.
namespace MinimalGazeDataStream
{
using EyeXFramework;
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using Tobii.EyeX.Framework;
@matiaskorhonen
matiaskorhonen / sign-pdf.rb
Last active May 25, 2023 10:58
Quick and dirty PDF signing in Ruby (using Origami)
#!/usr/bin/env ruby
require "openssl"
require "time"
begin
require "origami"
rescue LoadError
abort "origami not installed: gem install origami"
end
@gilgeorges
gilgeorges / FLIRjpg2HDF5.py
Last active July 9, 2023 08:18
Extracts the raw thermal images from a set / sequence of FLIR JPG images and stores them as matrices in an HDF5 file. The actual extraction is done using Exiftool (available at http://www.sno.phy.queensu.ca/~phil/exiftool/ - may require you to install Perl, e.g. "Strawberryperl" for Windows).
""" FLIRjpg2HDF5
reads raw thermal images from a FLIR-camera JPG image series
and stores them in a HDF5 file - using exiftool """
import glob
import os
import subprocess
import PIL.Image
import numpy as np
@show0k
show0k / mesh_decimation.bash
Created December 9, 2015 06:48
Clean STL for 3D simulator
#!/bin/bash
# Delete 80% of meshes
# you need to install meshlab before :
# -> sudo apt-get install meshlab on Debian
# -> brew install meshlab on OSX
for f in `ls *.STL`; do
echo $f
meshlabserver -i "$f" -s script.mlx -o "$f"
done
@MattCheetham
MattCheetham / siri_homekit_colours.txt
Last active August 30, 2019 10:24
Siri HomeKit Light Colours
// A list of all colours that Siri understands when controlling light bulbs. E.g. "Hey Siri, set the bedroom lights to red"
// Please contribute any that you have come accross
Blue
Red
Green
Yellow
White
Champagne
Direct Sunlight
@jbergler
jbergler / .gitignore
Last active April 9, 2024 19:49
Acestream on Mac
.vagrant
@ka010
ka010 / gist:235253db3fccfac53910
Last active March 5, 2020 04:39
Convert an AVFrame to CVPixelbuffer
-(void)getPixelBuffer:(CVPixelBufferRef *)pbuf {
@synchronized (self) {
if(!_pFrame || !_pFrame->data[0])
return;
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
// [NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey,
// [NSNumber numberWithBool:YES], kCVPixelBufferCGBitmapContextCompatibilityKey,
@(_pFrame->linesize[0]), kCVPixelBufferBytesPerRowAlignmentKey,
@callumj
callumj / README.md
Last active August 29, 2015 14:24
now_playing.rb
@shovon
shovon / increase_swap.sh
Created April 10, 2015 15:18
Increasing swap size. Only tested on the ubuntu/trusty64 Vagrant box. CREDIT GOES TO ---> http://jeqo.github.io/blog/devops/vagrant-quickstart/
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then