Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# default variables (not sure if supported in sh, try)
echo ${var:-defaultvalue} # var is "defaultvalue" if not set
echo ${var:-$othervar} # var is "$othervar" if not set
# another, more verbose way, will work in sh
test -z "${var}" && var=defaultvalue
echo ${var}
# Unbind the old prefix
unbind C-b
# Set the prefix to C-s
set -g prefix C-s
bind C-s send-prefix
# Enable automatic rename and renumbering
setw -g automatic-rename on
set -g renumber-windows on
@ronmrdechai
ronmrdechai / FindGoogleTest.cmake
Created August 18, 2018 16:03
A CMake module to build and use Google Test
include(ExternalProject)
if(NOT PACKAGE_FIND_VERSION)
set(GTEST_TAG master)
else()
set(GTEST_TAG "release-${PACKAGE_FIND_VERSION}")
endif()
ExternalProject_Add(googletest
GIT_REPOSITORY "https://github.com/google/googletest.git"
@ronmrdechai
ronmrdechai / gist:8111678
Created December 24, 2013 10:58
Math:GSL with gsl 1.15
cpanm (App::cpanminus) 1.7001 on perl 5.018001 built for darwin-2level
Work directory is /Users/Ron/.cpanm/work/1387882188.24316
You have make /usr/bin/make
You have /usr/local/bin/wget
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching Math::GSL on cpanmetadb ...
--2013-12-24 12:49:49-- http://cpanmetadb.plackperl.org/v1.0/package/Math::GSL
Resolving cpanmetadb.plackperl.org... 185.31.17.192, 185.31.17.129
Connecting to cpanmetadb.plackperl.org|185.31.17.192|:80... connected.
@ronmrdechai
ronmrdechai / gist:8106918
Created December 24, 2013 00:11
perl -V and uname -a
$ perl -V
Summary of my perl5 (revision 5 version 18 subversion 1) configuration:
Platform:
osname=darwin, osvers=12.5.0, archname=darwin-2level
uname='darwin rons-mac-mini.local 12.5.0 darwin kernel version 12.5.0: mon jul 29 16:33:49 pdt 2013; root:xnu-2050.48.11~1release_x86_64 x86_64 '
config_args='-de -Dprefix=/opt/perlbrew/perls/perl-5.18.1 -Aeval:scriptdir=/opt/perlbrew/perls/perl-5.18.1/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
@ronmrdechai
ronmrdechai / Math::GSL error
Created November 21, 2013 18:52
CPAN error when building Math::GSL
cpanm (App::cpanminus) 1.7001 on perl 5.018001 built for darwin-2level
Work directory is /Users/Ron/.cpanm/work/1385059722.1315
You have make /usr/bin/make
You have /usr/local/bin/wget
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
Searching Math::GSL on cpanmetadb ...
--2013-11-21 20:48:43-- http://cpanmetadb.plackperl.org/v1.0/package/Math::GSL
Resolving cpanmetadb.plackperl.org... 185.31.18.129, 185.31.19.192
Connecting to cpanmetadb.plackperl.org|185.31.18.129|:80... connected.