tiling terminal emulator (D/Gtk3) https://github.com/gnunn1/tilix
#!/usr/bin/env python | |
import json | |
import os | |
from subprocess import check_call, check_output, STDOUT | |
import sys | |
if len(sys.argv) != 3: | |
print "Usage: %s input.wav output.wav" % __file__ | |
sys.exit(1) |
template< class T, class M > | |
static inline constexpr ptrdiff_t offset_of( const M T::*member ) { | |
return reinterpret_cast< ptrdiff_t >( &( reinterpret_cast< T* >( 0 )->*member ) ); | |
} | |
template< class T, class M > | |
static inline constexpr T* owner_of( M *ptr, const M T::*member ) { | |
return reinterpret_cast< T* >( reinterpret_cast< intptr_t >( ptr ) - offset_of( member ) ); | |
} |
Sometimes you need to edit a file on a remote server, but using vim/emacs is not very practical, due to lag and speed of screen refresh.
TextMate users have the classic rmate, but it was implemented in Ruby, which may not be available on the remote server.
A better option is to use this version of rmate, implemented in pure Bash. It's a single file, self-contained, and with no external dependencies.
Step by step:
I use Ubuntu Mate instead of the usual Raspbian Jessie mainly because of the gcc version. ORB-SLAM2 requires C++11 support. Raspbian comes with gcc 4.9, which does not handle C++11 by default. That means you have to play around with some compiler flags in ORB-SLAM2's CMakeLists.txt to make it work. In contrast, Ubuntu Mate's gcc 5.4 handles C++11 naturally.
cmake_minimum_required(VERSION 3.5) | |
project(Ardupilot) | |
add_compile_options(-std=c++11) | |
set(TARGET_PLATFORM sitl) | |
#set(TARGET_PLATFORM chibios) | |
#set(TARGET_PLATFORM linux) | |
string(TOUPPER ${TARGET_PLATFORM} TARGET_PLATFORM_UPPER) | |
# To work with SITL |
Pty Language Age/Gender VoiceName File Other Languages | |
2 en-gb M english en (en-uk 2)(en 2) | |
3 en-uk M english-mb-en1 mb/mb-en1 (en 2) | |
2 en-us M english-us en-us (en-r 5)(en 3) | |
5 en-sc M en-scottish other/en-sc (en 4) | |
5 en M default default | |
5 en-uk-north M english-north other/en-n (en-uk 3)(en 5) | |
5 en-uk-rp M english_rp other/en-rp (en-uk 4)(en 5) | |
5 en-us M us-mbrola-2 mb/mb-us2 (en 7) | |
5 en-us F us-mbrola-1 mb/mb-us1 (en 8) |