Skip to content

Instantly share code, notes, and snippets.

@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
@show0k
show0k / .bash_profile
Last active March 6, 2016 20:18
My bash profile, with some hints for OSX
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
#!/usr/bin/env python
"""
build_conda_packages.py creates conda packages for the specified recipe for all operating systems and python versions.
Usage:
anaconda login --user USER --password PASSWORD
python build_conda_packages.py ANACONDA_USER --destination-path conda_recipe/build/ --recipe-path conda_recipe/
where:
@show0k
show0k / boards_benchmark.ipynb
Last active March 31, 2016 11:37
Sysbench on Odroid U3 Odroid XU4 Raspberry Pi2 Raspberry Pi3 and i7-5557U laptop
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@show0k
show0k / incremental_backup_maya.py
Last active October 5, 2016 22:06
Custom incremental backup for maya. It creates an OLD directory and copy the working file in this directory and increment it version number.
import os
import re
import glob
from shutil import copyfile
import maya.cmds as cmds
BACKUP_NAME = "OLD"
full_filename_uri = cmds.file(save=True, type='mayaAscii')
filename = os.path.basename(full_filename_uri)
@show0k
show0k / README.md
Last active November 20, 2016 17:49
Fix DXF issues on onshape export

Assorted tools needed when dealing with e.g. Onshape DXF exports.

Example usage to batch fix all .dxf files in a directory:

cd directory_with_dxf_files pip install ezdxf mkdir output for f in ls *.dxf; do python convert_onshape_dxf.py -i $f -o output/$f; done;

Keybase proof

I hereby claim:

  • I am show0k on github.
  • I am show0k (https://keybase.io/show0k) on keybase.
  • I have a public key whose fingerprint is 5A51 FBBE 3899 7365 FB61 9CEA 11D8 14ED 7FC4 DB01

To claim this, I am signing this object:

@show0k
show0k / # opencv3 - 2017-03-09_17-35-42.txt
Created March 9, 2017 17:22
opencv3 (homebrew/science/opencv3) on macOS 10.11.6 - Homebrew build logs
Homebrew build logs for homebrew/science/opencv3 on macOS 10.11.6
Build date: 2017-03-09 17:35:42
@show0k
show0k / install_git_lfs.sh
Last active March 5, 2019 18:35
Compile and Install git-lfs on Raspberry Pi (with golang compilation)
install_git_lfs()
{
set -e
# Get out if git-lfs is already installed
if $(git-lfs &> /dev/null); then
echo "git-lfs is already installed"
return
fi
GIT_LFS_BUILD=$HOME/.bin
/* This example shows how to use continuous mode to take
range measurements with the VL53L0X. It is based on
vl53l0x_ContinuousRanging_Example.c from the VL53L0X API.
The range readings are in units of mm. */
//
#include <Wire.h>
#include <VL53L0X.h>
#include <ArduinoJson.h>