Skip to content

Instantly share code, notes, and snippets.

View finia2NA's full-sized avatar

Finite finia2NA

  • Berlin, Germany
View GitHub Profile
@mariusud
mariusud / off2obj.py
Last active July 13, 2023 13:29
Convert off to obj files in batch using blender
# Slight modification of https://gist.github.com/AngryLoki/3800594
# Converts Object File Format (OFF) files to OBJ files in batch
# Allows the usage of OFF files in Gazebo Ignition
# blender --background --python3.7 off2obj.py -- input_dir output_dir i.e. blender --background --python off2obj.py -- off_meshes/ ./obj_meshes/
# Tested with Blender 2.82 and OFF Add-on https://github.com/3Descape/blender-off-addon/tree/patch-1
# Sizes all objects down to 10,10,10
import os
import sys
import glob
import bpy
@kylehowells
kylehowells / gist:36b6f7e3f584590d0943
Created December 4, 2014 01:18
MRMediaRemoteGetNowPlayingInfo Keys
MRMediaRemoteGetNowPlayingInfo(dispatch_get_main_queue(), ^(CFDictionaryRef information) {});
/* [information allKeys]
(
kMRMediaRemoteNowPlayingInfoTotalDiscCount,
kMRMediaRemoteNowPlayingInfoShuffleMode,
kMRMediaRemoteNowPlayingInfoTrackNumber,
kMRMediaRemoteNowPlayingInfoDuration,
kMRMediaRemoteNowPlayingInfoRepeatMode,
kMRMediaRemoteNowPlayingInfoTitle,
@AngryLoki
AngryLoki / dae2obj.py
Created September 28, 2012 15:42
Obj to dae Blender
# simple script to batch convert collada to obj.
# run as:
# blender --background --python dae2obj.py -- input_dir output_dir
import os
import sys
import glob
import bpy
if len(sys.argv) != 7:
@stuartmemo
stuartmemo / Note to Frequency
Created September 22, 2012 15:00
Convert note to frequency
// Takes string of Note + Octave
// Example:
// var frequency = getFrequency('C3');
var getFrequency = function (note) {
var notes = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'],
octave,
keyNumber;
if (note.length === 3) {
@djsutherland
djsutherland / latex-clean.sh
Last active July 16, 2024 11:39
A bash script to clean latex temp files
#!/bin/bash
# Note: you might prefer latexmk -c since latexmk is great. It doesn't clean all of these, but see
# https://tex.stackexchange.com/questions/83341/clean-bbl-files-with-latexmk-c/83386#83386
exts=".aux .lof .log .lot .fls .out .toc .dvi .bbl .bcf .blg -blx.aux -blx.bib -blx.bib .run.xml .fdb_latexmk .synctex.gz .syntex.gz(busy) .pdfsync .algorithms .alg .loa .thm .nav .snm .vrb .acn .acr .glg .glo .gls .brf .lol .idx .ilg .ind .ist .maf .mtc .mtc0 .pyg .nlo .tdo .xdy .keys"
for x in "${@:-.}"; do
arg=$(echo ${x:-.} | perl -pe 's/\.(tex|pdf)$//')