Skip to content

Instantly share code, notes, and snippets.

View johnfredcee's full-sized avatar
🚀
On an intergalactic cruise

John Connors johnfredcee

🚀
On an intergalactic cruise
View GitHub Profile
@johnfredcee
johnfredcee / gist:2483379
Created April 24, 2012 20:22
SConstruct file for working with flymake.
import os
import tempfile
import shlex
import subprocess
import sys
vars = Variables()
vars.Add(BoolVariable('SYNTAX', 'Set to 1 for a syntax check',0))
vars.Add(BoolVariable('DUMPENV', 'Set to 1 to dump environment',0))
@johnfredcee
johnfredcee / bvh_read.py
Created March 9, 2012 16:57
bvh file parser (tested w Python2.6)
import re
bvh_file = "Example1.bvh"
def identifier(scanner, token): return "IDENT", token
def operator(scanner, token): return "OPERATOR", token
def digit(scanner, token): return "DIGIT", token
def open_brace(scanner, token): return "OPEN_BRACE", token
def close_brace(scanner, token): return "CLOSE_BRACE", token
@johnfredcee
johnfredcee / make_tags.py
Created December 29, 2011 14:53
Top Level Tag File Scanner
#!/usr/bin/python
import os
import tempfile
import shlex
import subprocess
import sys
def is_source(file, suffixes):
return os.path.isfile(file) and (os.path.splitext(file)[1] in suffixes)
@johnfredcee
johnfredcee / io_export_lua.py
Created December 2, 2011 11:43
Dump Blender Scene as Lua via Introspection
bl_info = {
"name": "Export Scene as Lua (.lua)",
"author": "John Connors (ZabaQ)",
"version": (0, 7),
"blender": (2, 5, 4),
"api": 33047,
"location": "File > Export",
"description": "Blender Scene To Lua (.lua)",
"warning": "",
@johnfredcee
johnfredcee / LispObj.h
Created November 15, 2011 12:31
Base Lisp Polymorphic object code
#ifndef H_LISP_OBJ
#define H_LISP_OBJ
#include <cassert>
#include <ostream>
#include <vector>
#include <map>
#include <string>
#include <algorithm>
@johnfredcee
johnfredcee / dump_sexp.py
Created October 12, 2011 11:27
Better Blender Sexp Exporter
bl_info = {
"name": "Dump Sexp (.lisp)",
"author": "John Connors (ZabaQ)",
"version": (0, 7),
"blender": (2, 5, 4),
"api": 33047,
"location": "File > Export",
"description": "Dump Blender Data To Sexp (.lisp)",
"warning": "",
@johnfredcee
johnfredcee / dump_sexp.py
Created October 12, 2011 10:51
Blender Sexp Exporter
bl_info = {
"name": "Dump Sexp (.lisp)",
"author": "John Connors (ZabaQ)",
"version": (0, 7),
"blender": (2, 5, 4),
"api": 33047,
"location": "File > Export",
"description": "Dump Blender Data To Sexp (.lisp)",
"warning": "",
@johnfredcee
johnfredcee / Glop patch
Created September 1, 2011 11:56
Patch for glop Win32 keycode scan
From 7fc6632ed9c0febc058fee3c40ce47830aa40ed9 Mon Sep 17 00:00:00 2001
From: John Connors <johnc@yagc.ndo.co.uk>
Date: Thu, 1 Sep 2011 12:46:31 +0100
Subject: [PATCH] Fixing keycode scan
---
src/win32/win32.lisp | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/win32/win32.lisp b/src/win32/win32.lisp
@johnfredcee
johnfredcee / sexp_dump.py
Created August 25, 2011 20:13
Dumping Blender Scene as an S-Expression
import bpy
import mathutils
import types
# transform python property to lisp keyword
def lispify(s):
if ((s == None) or (s[-1:]==']')):
return None
result = s.split('.')[-1:]
result = ":" + result[0].upper()
@johnfredcee
johnfredcee / w32shell.el
Created July 21, 2011 13:09
Standalone w32shell.el (for vanilla windows emacs)
;;; w32shell.el --- Helpers for inferior shells on w32
;; Copyright (C) 2005, 2006, 2007 by Lennart Borgman
;;
;; Author: Lennart Borgman
;; Created: Tue Nov 22 01:07:13 2005
;; Version: 0.52
;; Last-Updated: Fri May 18 10:58:41 2007 (7200 +0200)
;; Keywords:
;; Compatibility: Emacs 22