This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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)... }; | |
} |