Skip to content

Instantly share code, notes, and snippets.

@gintenlabo
gintenlabo / buildenv.bash
Created June 29, 2012 04:10 — forked from mizchi/buildenv.bash
rails and node
#!/bin/bash
sudo apt-get update
# = utils
sudo apt-get -y install ssh curl git
# = rvm requirements
sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
@gintenlabo
gintenlabo / NK.cpp
Created May 26, 2012 11:34 — forked from siritori/NK.cpp
ほげほげ
#include <iostream>
#include <map>
#include <cstdlib> // for std::exit
#include <boost/noncopyable.hpp>
using namespace std; // グローバル名前空間での using namespace std; は個人的には好きじゃない
// 毎回 std:: と書くか,関数内で using namespace std; した方が良いかも
enum PropType { // C++11 なら enum class を使う
IMPLIES,
#include <array>
#include <type_traits>
template <class T, class... Args,
class Result = std::array<typename std::decay<T>::type, sizeof...(Args)+1>
>
inline Result make_array( T && x, Args&&... args) {
return Result{ std::forward<T>(x), std::forward<Args>(args)... };
}