Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimiter 'malkia' Stanev malkia

View GitHub Profile
View gist:8825584
/* Stolen from luajit - http://repo.or.cz/w/luajit-2.0.git/blob/HEAD:/src/lj_obj.h */
/* Look for examples here - http://repo.or.cz/w/luajit-2.0.git/blob/HEAD:/src/lj_meta.c */
/* ANd http://repo.or.cz/w/luajit-2.0.git/blob/HEAD:/src/lj_obj.c */
#define MYDEFS(_) _(one) _(two) _(three) _(four) _(five)
/* Make an enum from 'one', 'two', etc. */
typedef enum my_enums{
#define MYENUM(name) my_##name,
MYDEFS(MYENUM)
View gist:9330802
First I've downloaded ode from here:
http://sourceforge.net/projects/opende/files/ODE/0.12/ and extracted it in my e:\p under e:\p\ode-0.12
Then I did (from cmd.exe)
bash --login -i
$ cd /cygdrive/e/p/ode-0.12
$ ./configure
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
View gist:9353312
cd /usr/local
tar jxf ~/opencv2.4.8-cygwin64-g++-4.8.2-shared-release-20131231.tar.bz2
cd ~
View gist:ebf7f54063c5aec6d1b0
#define FAST // Comment this out this going 7 times slower
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace netBlah1
{
class Program
{
View gist:89c6a78405132bc30dcc
Google Inc.
Copyright 2014 Google Inc. All rights reserved.
Google Chrome 40.0.2214.43 (Official Build) beta
Revision 9d5cd14c677accab1e25f0ee3d58667ff5b41dac
Platform 6457.36.0 (Official Build) beta-channel parrot_ivb
Blink 537.36 (@62f90f76bfca59fa9dd2d73329019b2d841a9b5e)
JavaScript V8 3.30.33.8
Flash 16.0.0.235-r1
User Agent Mozilla/5.0 (X11; CrOS x86_64 6457.36.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.43 Safari/537.36
View Simple go runner
/*
# Makefile for go.go
all: install
include $(GOROOT)/src/Make.$(GOARCH)
TARG = go
GOFILES = $(TARG).go
View beer.lisp
;; beer.lisp
;; simple opengl playground
;; Load this in Lispworks, or Lispworks Personal, and type Ctrl+Shift+B
;; malkia@gmail.com
(eval-when (:compile-toplevel :execute :load-toplevel)
(let ((lwdir (concatenate 'string (namestring *lispworks-directory*) "lib/6-0-0-0/")))
(load (concatenate 'string lwdir "examples/opengl/defsys"))
(load (concatenate 'string lwdir "examples/opengl/examples/defsys"))
(compile-system 'opengl :load t :force nil)
View nu
The NU project.
Two Applications:
- The Editor
- The Player
Command Line Tool:
- The Convertor - Builds assets continuously - should be able to parallelize with IncrediBuild, ElectricFence, ccache/distcc, SN-DBS, etc.
Editor:
View badif.lisp
; Under Lispworks 6.01 32-bit Windows Vista
;
; CL-USER 100 > (test-fun)
; (i & 0x80000000) == 0 time: 0.717
; (i & 0xFFFFFFFF) == 0 time: 0.671
; (i & 0x00000001) == 0 time: 0.718
; (i & 0x00000003) == 0 time: 0.795
; (i & 0x00000002) == 0 time: 0.827
; (i & 0x00000004) == 0 time: 0.78
; (i & 0x00000008) == 0 time: 0.811
View lua-editor.lua
Editor = {
"1. First Line",
"2. Second Line",
"3. Third Line",
"4. Fourth Line",
"5. Fifth Line",
}
function timeit(fun,info)
info = info or ""