Skip to content

Instantly share code, notes, and snippets.

View Quintus's full-sized avatar

Marvin Gülker Quintus

View GitHub Profile
(1008) [17:54:21 quintus@roma] ~
% ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
(1009) [17:55:21 quintus@roma] ~
% gem -v
2.0.0
(1010) [17:55:22 quintus@roma] ~
% gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.0
@Quintus
Quintus / config.log
Created March 23, 2013 13:11
CEGUI configure.log snippet, shows requiring of `tolua++`.
configure:20583: checking for Lua
configure:20590: $PKG_CONFIG --exists --print-errors "lua >= 5.1"
configure:20593: $? = 0
configure:20607: $PKG_CONFIG --exists --print-errors "lua >= 5.1"
configure:20610: $? = 0
configure:20648: result: yes
configure:20872: i686-pc-mingw32-gcc -E -I. -DCEGUI_LUA_VER=51 conftest.c
conftest.c:57:33: fatal error: tolua++.h: No such file or directory
#include <tolua++.h>
^
@Quintus
Quintus / states.rb
Last active December 15, 2015 20:19
require "test/unit"
require "turn/autorun"
module Game
class State
attr_reader :name
def initialize(name)
@name = name
#cs_init
end
require "test/unit"
class AnonModule < Module
attr_reader :name
def initialize(klass,name,&block)
super(&block)
@name = name
@klass = klass
# -*- coding: utf-8 -*-
require "observer"
class Hero
include Observable
attr_accessor :hp
def initialize
@Quintus
Quintus / smcbulding.sh
Last active December 30, 2015 14:39
Fully automated build script to crosscompile SMC from Linux to Windows.
#!/bin/bash
########################################
# Main variables
MXE_URL="git://github.com/Quintus/mxe.git"
SMC_URL="git://github.com/Quintus/SMC.git"
MXE_BRANCH="smc-building"
SMC_BRANCH="mruby"
@Quintus
Quintus / lsldap.rb
Last active August 29, 2015 13:56
Nice tree outputter for LDAP
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require "optparse"
require "base64"
require "pp"
########################################
# Option handling
@Quintus
Quintus / ruby-class-graph.rb
Created May 25, 2014 15:36
Create a Graphviz dot graph from all Ruby classes loaded
tree = {}
ObjectSpace.each_object(Class).each do |klass|
# All the Errno:: classes make the graph extremely large,
# so just collect them under a single name.
if klass.name.start_with?("Errno::")
ary = ["Errno::*"]
else
ary = [klass.name]
end
@Quintus
Quintus / ruby-class-mixin-graph.rb
Last active August 29, 2015 14:01
Ruby Class + Mixin graph
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Marvin Gülker
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
General:
* NEVER use make’s -j option. It will crash (especially under 32-bit
Windows) without any meaningful error messages. This is a known bug
in MinGW’s MSYS-make (without any solution in sight).
* "~" is your MSYS home directory, usually C:\MinGW\msys\1.0\home\yourname.
---
Main MinGW installation: