Skip to content

Instantly share code, notes, and snippets.

@cbeck88
cbeck88 / ffh2.sh
Created July 30, 2017 05:29
play on linux install script for Civilization IV: Beyond the Sword, and the Fall from Heaven 2 mod
#!/bin/bash
# Date : (2013-06-26)
# Last revision : (2017-07-29)
# Wine version used : 2.13-staging
# Distribution used to test : xUbuntu 16.04
# Author : Jimmy Ramsmark, Chris Beck
# Licence : GPLv3
# Depend : msxml3, d3dx9
# This script was tested using the DVD version of `Civilization IV: Complete'
@cbeck88
cbeck88 / randutils.hpp
Created November 6, 2015 15:47 — forked from imneme/randutils.hpp
Addresses common issues with C++11 random number generation; makes good seeding easier, and makes using RNGs easy while retaining all the power.
/*
* Random-Number Utilities (randutil)
* Addresses common issues with C++11 random number generation.
* Makes good seeding easier, and makes using RNGs easy while retaining
* all the power.
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Melissa E. O'Neill
*
@cbeck88
cbeck88 / story_with_lua.cpp
Last active August 27, 2015 14:47
iterations of design for lua state (posted on stack overflow)
////////////////////////////////////////////////////
// First stab, very naively:
//
// Define lua environment
void init_lua(lua_State * L);
struct lua_environment {
data_structure_a a_;
data_structure_b b_;
@cbeck88
cbeck88 / visit_at.cc
Last active August 26, 2015 23:17 — forked from lichray/visit_at.cc
Access tuple by runtime index
#include <tuple>
#include <type_traits>
template <int Low, int High, int Mid = (Low + High) / 2, typename = void>
struct _visit_at;
template <int Low, int High, int Mid>
struct _visit_at<Low, High, Mid, std::enable_if_t<(Low > High)>>
{
template <typename... T>
require 'formula'
class Gles2mesa < Formula
homepage 'http://www.mesa3d.org'
url 'ftp://ftp.freedesktop.org/pub/mesa/10.5.4/mesa-10.5.4.tar.gz'
sha256 'e1089567fc7bf8d9b2d8badcc9f2fc3b758701c8c0ccfe7af1805549fea53f11'
version '10.5.4'
depends_on :x11
# depends_on :cmake
INFO: formula_function.cpp:3796 : CONSOLE: 'launch deck lab: '
INFO: formula_function.cpp:3796 : CONSOLE: 'Entropia'
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff53a7180 in __dynamic_cast ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff53a7180 in __dynamic_cast ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x000000000101f3b2 in variant::try_convert<game_logic::FormulaObject> (
@cbeck88
cbeck88 / gist:ab6bf15635f321c8b27f
Created May 11, 2015 21:48
crash when alt-tabbing citadel
INFO: custom_object.cpp:2609 : RAN GARBAGE COLLECTION IN 1ms. Releasing 0/11 OBJECTS
INFO: formula_function.cpp:3796 : CONSOLE: 'clicked'
ERROR: asserts.cpp:133 : ASSERT FAIL: cairo.cpp:815 ASSERTION FAILED: Invalid canvas render: 0x0
CRITICAL: At modules/Citadel/data/objects/library_deck_summary.cfg 52:
fbo: c.render(area.width, area.height, [
^
At modules/Citadel/data/objects/title_multiplayer_controller.cfg 32:
map(_decks, spawn('library_deck_summary', 0, 0, {selected: index = if(selec...
@cbeck88
cbeck88 / wesnoth.rb
Last active August 29, 2015 14:12
wesnoth 1.12, no boost filesystem
require 'formula'
class Wesnoth < Formula
homepage 'http://www.wesnoth.org/'
head 'https://github.com/wesnoth/wesnoth.git'
url 'https://downloads.sourceforge.net/project/wesnoth/wesnoth-1.12/wesnoth-1.12/wesnoth-1.12.tar.bz2'
sha1 'eb273d01ced5e2dbdbd17c533586d03bd7646e43'
option "with-ccache", "Speeds recompilation, convenient for beta testers"
option "with-debug", "Build with debugging symbols"
@cbeck88
cbeck88 / gist:3108e40bd26dc3ebae3c
Created November 19, 2014 00:02
console from `brew install fontconfig`
chris@chris-KLR650 ~ $ brew doctor
Your system is ready to brew.
chris@chris-KLR650 ~ $ brew install fontconfig
==> Installing dependencies for fontconfig: xz, libpng, freetype
==> Installing fontconfig dependency: xz
==> Downloading http://fossies.org/linux/misc/xz-5.0.7.tar.bz2
Already downloaded: /home/chris/.cache/Homebrew/xz-5.0.7.tar.bz2
==> ./configure --disable-silent-rules --prefix=/home/chris/.linuxbrew/Cellar/xz
==> make install
/home/chris/.linuxbrew/Cellar/xz/5.0.7: 63 files, 1.7M, built in 23 seconds
#define RBY_NO_MIRROR_WARNING
[event]
name=prestart
id = RBY_ERA_WARNING_EVENT
{IF_VAR rby_set_message boolean_not_equals true (
[then]
[chat]
speaker= _ "Warning"
message= _ "No Mirror Era replays will be corrupted unless game will be played using one of RBY sets"