This file contains hidden or 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
/** | |
* @brief Converts std::unique_ptr of base type to std::unique_ptr of derived type | |
* by using static_cast internally | |
* @details Ownership of the object is transfered to the returned std::unique_ptr. | |
* It is somewhat analogous to std::static_ptr_cast | |
*/ | |
template<typename Derived, typename Base, typename Deleter> | |
std::unique_ptr<Derived, Deleter> static_ptr_cast(std::unique_ptr<Base, Deleter> base) | |
{ | |
auto deleter = base.get_deleter(); |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# Modified version of https://github.com/geebee/tmux-persistence to work with byobu | |
# and work on OSX. | |
require 'fileutils.rb' | |
# Start - Configuration Variables | |
sessionDir = ENV['HOME']+"/.byobu-sessions" | |
maxStoredSessions = 5 |