Skip to content

Instantly share code, notes, and snippets.

set -ex
if [[ ! -e ~/local/gcc-4.8.2/bin/g++ ]]; then
pushd ~/
PWD=`pwd`
# install gmp
wget http://ftp.gnu.org/gnu/gmp/gmp-5.1.2.tar.bz2
tar xf gmp-5.1.2.tar.bz2
@melpon
melpon / test.rst
Created March 20, 2014 05:58
reST の内部ターゲットテスト

正常系

hoge

fuga

moke

/* ========================================================================= */
int ZEXPORT deflateInit_(strm, level, version, stream_size)
z_streamp strm;
int level;
const char *version;
int stream_size;
{
return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, version, stream_size);
/* To do: ignore strm->next_in if we use it as window */
@melpon
melpon / build.sh
Last active August 29, 2015 14:22
mono 4.0.1 のビルド
# apt-get install git autoconf libtool automake
git clone https://github.com/mono/mono.git
cd mono
git checkout mono-4.0.1.44
patch configure.ac /path/to/patch/configure.ac.patch
./autogen.sh --prefix=/path/to/install --disable-nls
make get-monolite-latest
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe
make install
@melpon
melpon / Makefile.patch
Last active August 29, 2015 14:22
誤家庭用
2369,2371d2368
< for files in $(BUILD_SDK_DIR)/tapset/*.stp; do \
< $(INSTALL_DATA) $${files} $(DESTDIR)${prefix}/tapset; \
< done
2462,2465d2458
< if ENABLE_DOCS
< ${mkinstalldirs} $(DESTDIR)$(docdir)/html
< cp -RP $(BUILD_IMAGE_DIR)/docs $(DESTDIR)$(docdir)/html
< endif
python make.py > test.json
curl -v -H "Content-type: application/json" --data-binary "@test.json" http://melpon.org/wandbox/api/compile.json
#!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools, set a download
$ pwd
/tmp/module
$ tree
.
├── fluent
│ ├── __init__.py
│ └── sender.py
└── plugin
├── __init__.py
enum cv_status { cvs_no_timeout, cvs_timeout };
class condition_variable {
typedef pthread_cond_t native_type;
native_type cond_;
public:
typedef native_type* native_handle_type;
@melpon
melpon / shared_ptr.h
Created July 17, 2012 03:42
oreore shared_ptr
#ifndef UTIL_SHARED_PTR_H_INCLUDED
#define UTIL_SHARED_PTR_H_INCLUDED
// for swap in C++03
#include <algorithm>
// for swap in C++11
#include <utility>
#include <new>