Skip to content

Instantly share code, notes, and snippets.

View alex-ac's full-sized avatar

Aleksandr Derbenev alex-ac

View GitHub Profile
@alex-ac
alex-ac / Makefile
Created June 16, 2012 10:53
Lilypond makefile
LILYPOND:=lilypond
LILYPONDFLAGS:=
BUILDDIR:=.
SRCDIR:=.
INSTALLDIR:=.
MAINPDF=$(SRCDIR)/pdf.ly
MAINMIDI=$(SRCDIR)/midi.ly
SOURCES=$(SRCDIR)/score.ly $(SRCDIR)/title.ly ${SRCDIR}/macro.ly
@alex-ac
alex-ac / build.xml
Created December 4, 2012 09:40
Ant and git integration.
<?xml version="1.0" encoding='utf-8'?>
<project name="test" default="version">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<available file=".git" type="dir" property="git.present"/>
<available file="version.properties" type="file" property="version.present"/>
<target name="versiongit" if="git.present">
<exec executable="git" outputproperty="git.commit" failonerror="true">
<arg value="rev-parse"/>
@alex-ac
alex-ac / Lua.cc
Last active June 16, 2023 15:46
Lua C++ wrapper. C++11 templates street magic.
#include <Lua.hh>
extern "C" {
#include <lualib.h>
#include <lauxlib.h>
};
using namespace util;
int Lua::call(lua_State *vm) {
@alex-ac
alex-ac / matrix.cc
Last active December 22, 2015 07:58
Matrix computations on the C++11 templates.
#include "matrix.h"
template class Matrix<4, 1>;
template class Matrix<4, 4>;
#include "messaging.pb.h"
using namespace messaging;
std::string SerializeSettings(
double angle_offset_x,
double angle_offset_y,
double angle_offset_z,
double pid_x_factors_p,
double pid_x_factors_i,
@alex-ac
alex-ac / app.py
Created August 13, 2014 11:09
Python Bem templator with flask example.
#!/usr/bin/env python3
from flask import Flask
from bem import Bem
import templates
app = Flask(__name__)
bem = Bem(no_cache = True)