Skip to content

Instantly share code, notes, and snippets.

@slowriot
slowriot / base.h
Created March 13, 2017 10:19
sphereFACE English Translation base
#ifndef LANGUAGESTORM_LANGUAGE_BASE_H_INCLUDED
#define LANGUAGESTORM_LANGUAGE_BASE_H_INCLUDED
#include <sstream>
#include <iomanip>
namespace languagestorm {
class base {
protected:
diff -Naur ./boosttemp/config/select_compiler_config.hpp ./boost/config/select_compiler_config.hpp
--- ./boosttemp/config/select_compiler_config.hpp 2016-10-03 20:13:16.437540033 +0100
+++ ./boost/config/select_compiler_config.hpp 2016-10-03 20:13:34.937540075 +0100
@@ -117,32 +117,3 @@
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
#endif
-
-#if 0
-//
@slowriot
slowriot / boost-depfix.patch
Last active August 29, 2015 14:19
Fix for boost including some unnecessary things that mess up dependency scanners (such as that in Code::Blocks)
diff -Naur ../boosttemp/boost/config/select_compiler_config.hpp ./boost/config/select_compiler_config.hpp
--- ../boosttemp/boost/config/select_compiler_config.hpp 2015-04-24 15:40:08.067165641 +0000
+++ ./boost/config/select_compiler_config.hpp 2015-04-24 15:43:42.963163592 +0000
@@ -113,32 +113,3 @@
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
#endif
-
-#if 0
-//
#include <array>
#include <vector>
#include <iostream>
auto main()->int {
// use a sparse array to hold sums
std::array<std::vector<std::array<unsigned int, 3>>, 9 * 9 * 9> sums;
size_t maxsize = 0;
// first populate the sparse array
@slowriot
slowriot / exec_helloworld.py
Created January 13, 2015 04:00
Python hello world example for the exec system
#!/usr/bin/env python
# Simple hello world exec script showing basic usage
import sys
import os
username = os.environ.get('MCEXEC_PLAYERNAME')
if username == None:
# yellow is a good colour to use to warn players about problems
@slowriot
slowriot / cmake.patch
Created December 7, 2014 20:33
portaudio mingw64 cmake patch
--- origsrc/portaudio/CMakeLists.txt 2014-03-31 23:02:39.312957300 -0500
+++ src/portaudio/CMakeLists.txt 2014-03-31 23:17:59.313782600 -0500
@@ -335,9 +335,15 @@ SET_TARGET_PROPERTIES(portaudio PROPERTI
SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX})
ENDIF(WIN32)
+OPTION(PA_BUILD_CXX "Include C++ bindings" OFF)
OPTION(PA_BUILD_TESTS "Include test projects" OFF)
OPTION(PA_BUILD_EXAMPLES "Include example projects" OFF)
LHOTB12:
.align 2
.p2align 4,,-1
.globl __ZN4SHA115buffer_to_blockERKSsPm
.def __ZN4SHA115buffer_to_blockERKSsPm; .scl 2; .type 32; .endef
__ZN4SHA115buffer_to_blockERKSsPm:
LFB1210:
.cfi_startproc
pushl %esi #
.cfi_def_cfa_offset 8
LHOTB8:
.align 2
.p2align 4,,-1
.globl __ZN4SHA115buffer_to_blockERKSsPm
.def __ZN4SHA115buffer_to_blockERKSsPm; .scl 2; .type 32; .endef
__ZN4SHA115buffer_to_blockERKSsPm:
LFB1210:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
@slowriot
slowriot / bashpatch4.3.26slowriot
Created September 27, 2014 22:47
Bash patch 2014-09-27 against 4.3.26(1)
diff -ur ../bash-4.3/variables.c ./variables.c
--- ../bash-4.3/variables.c 2014-09-27 23:46:03.000000000 +0100
+++ ./variables.c 2014-09-27 23:40:17.000000000 +0100
@@ -279,7 +279,7 @@
static void propagate_temp_var __P((PTR_T));
static void dispose_temporary_env __P((sh_free_func_t *));
-static inline char *mk_env_string __P((const char *, const char *));
+static inline char *mk_env_string __P((const char *, const char *, int));
static char **make_env_array_from_var_list __P((SHELL_VAR **));
@slowriot
slowriot / bashpatch4.3.25slowriot
Created September 27, 2014 22:11
Bash patch 2014-09-27 against 4.3.25(1)
diff -ur ../bash-4.3orig/parse.y ./parse.y
--- ../bash-4.3orig/parse.y 2014-09-27 17:52:38.878472141 -0400
+++ ./parse.y 2014-09-26 09:48:04.192597937 -0400
@@ -2953,6 +2953,8 @@
FREE (word_desc_to_read);
word_desc_to_read = (WORD_DESC *)NULL;
+ eol_ungetc_lookahead = 0;
+
current_token = '\n'; /* XXX */