Skip to content

Instantly share code, notes, and snippets.

View gofer's full-sized avatar

Gofer gofer

View GitHub Profile
@gofer
gofer / README.md
Created March 15, 2017 19:40
curl

curl

../curl-7.53.1/configure \
--prefix=/usr/local \
--libdir=/usr/local/lib64 \
--enable-optimize \
--enable-http \
--enable-ftp \
--enable-file \
--enable-telnet \
@gofer
gofer / README.md
Created March 15, 2017 16:54
build libpcre

libpcre

../configure \
--prefix=/usr/local \
--libdir=/usr/local/lib64 \
--enable-pcre16 \
--enable-pcre32 \
--enable-jit \
--enable-utf \
--enable-unicode-properties \
@gofer
gofer / README.md
Created March 14, 2017 16:27
ncurses-6.0 configure option

ncurses-6.0

../configure                \
  --prefix=/usr/local       \
  --libdir=/usr/local/lib64 \
  --enable-pc-files         \
  --with-libtool            \
  --with-shared             \
  --with-cxx-shared         \
 --enable-widec \
@gofer
gofer / autorun.sh
Created March 14, 2017 07:27
Fedora 25 on VirtualBox
LANG=C xdg-user-dirs-update --force
rm -rf {ダウンロード,テンプレート,ビデオ,公開,デスクトップ,音楽,ドキュメント,画像}
sudo dnf remove \
baobab \
cheese \
disk-quote \
empathy \
empathy \
eog \
@gofer
gofer / README.md
Last active March 12, 2017 08:32
Build arm-elf-eabi gcc with newlib

Binutils

configure

../binutils-2.27/configure      \
  --prefix=/usr/local/arm-tools \
  --program-prefix=arm-elf-     \
  --target=arm-elf-eabi         \
  --enable-lto                  \
  --enable-interwork            \
  --enable-multilib
@gofer
gofer / Dockerfile
Last active December 14, 2016 06:52
Dockerfile: Ruby on CentOS
FROM centos:latest
MAINTAINER Gofer (@gofer_ex) <[email protected]>
ARG RUBY_VERSION=2.3.3
RUN yum -y install make git gcc
RUN yum -y install gdbm openssl readline zlib
RUN yum -y install gdbm-devel openssl-devel readline-devel zlib-devel
@gofer
gofer / config.txt
Created September 28, 2016 16:57
VyOSで日本のNTPサーバを使う
delete system ntp server 0.pool.ntp.org
delete system ntp server 1.pool.ntp.org
delete system ntp server 2.pool.ntp.org
set system ntp server ntp.nict.jp
set system ntp server ntp.jst.mfeed.ad.jp
set system ntp server jp.pool.ntp.org
set system time-zone Asia/Tokyo
@gofer
gofer / tz-change
Created September 28, 2016 09:08
Change TimeZone to Tokyo on Linux
#!/bin/sh
# LinuxのTimeZoneを変更
# 参考
# http://qiita.com/azusanakano/items/b39bd22504313884a7c3
# タイムゾーンの変更
cp /etc/localtime /etc/localtime.original
ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
@gofer
gofer / Readme.md
Created August 22, 2016 07:48
アンマネージなVC++でUnit Test

アンマネージなVC++でUnit Test

Debugのプロパティを変更

  1. 全般→構成の種類をdllにする
  2. C/C++→インクルードディレクトリに$(VCInstallDir)UnitTest\includeを追加
  3. リンカー→追加のライブラリディレクトリに$(VCInstallDir)UnitTest\libを追加
  4. テストの実行はテストエクスプローラから実行

テストコード例

@gofer
gofer / segtree.cc
Created June 12, 2016 19:57
Naive Segment Tree
#include <iostream>
#include <vector>
template<typename T>
struct Node
{
T value;
unsigned inf, sup;
Node<T> *left, *right;