Skip to content

Instantly share code, notes, and snippets.

View bobye's full-sized avatar

Jianbo Ye bobye

View GitHub Profile
@bobye
bobye / org2doku
Created March 9, 2012 09:44 — forked from takaxp/org2doku
Convert Emacs org-mode formatted text to Dokuwiki formatted one.
#!/opt/local/bin/perl
#
# Modified by @takaxp
# Last Update: 2012-01-09@22:13
# 2012-01-09: support date([YYYY-MM-DD XX]) insertion
# 2012-01-09: support #+BEGIN_SRC
# 2011-11-16: use strict and warnings
# 2011-11-16: Add conversion from numeric items to ` - '.
# 2011-11-16: Skip headers, if #+TITLE: is, use it as the top headline.
# 2011-11-17: Add DISQUS comment
@bobye
bobye / shape-nav.php
Created February 11, 2012 12:57
Similarity based shape navigation v2
<?php
$imgdir = 'snapshot-repo/';
$allowed_types = array('jpg');
$dimg = opendir($imgdir);
while($imgfile = readdir($dimg))
{
if(in_array(strtolower(substr($imgfile,-3)),$allowed_types))
{
@bobye
bobye / snapshot3D.sh
Created February 3, 2012 12:05
batch snapshot of 3D objects
#!/bin/sh
echo "## Temp command for Geomview" > tmp.gcl
for filename in $*; do
filebase=$(basename $filename)
outputbase=$(basename $filebase .off)
echo "" >> tmp.gcl
echo "(load $filename geometry)" >> tmp.gcl
echo "(backcolor Camera 1. 1. 1.)" >> tmp.gcl