Skip to content

Instantly share code, notes, and snippets.

@tabe
tabe / how-to-install-rgl-0.100.54-on-R-4.0.0-on-macOS-10.15.4.txt
Last active May 8, 2020 07:48
How to install rgl 0.100.54 on R 4.0.0 on macOS Catalina
* Environment
% uname -a
Darwin sysbio-smoke.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
% xcodebuild -version
Xcode 11.4.1
Build version 11E503a
% port version
Version: 2.6.2
% R --version
@tabe
tabe / Makefile
Last active November 25, 2019 06:32
isd2png
ISD_FILES := $(wildcard */out.isd)
PNG_FILES := $(patsubst %.isd,%.png,$(ISD_FILES))
all: $(PNG_FILES)
clean:
-rm -f $(PNG_FILES)
%.png: %.isd isd2png.plt
@tabe
tabe / how-to-install-sf-on-macos-with-macports.txt
Created July 24, 2019 02:33
How to install sf 0.7-6 on macOS Mojave with MacPorts
How to install sf 0.7-6 on macOS Mojave with MacPorts
Prerequisites:
- installing R, pkg-config, and gdal via MacPorts.
Note that proj (proj5) is automatically installed as a dependency for gdal.
- downloading the source tarball sf_0.7-6.tar.gz in the current directory
Then:
@tabe
tabe / x.cc
Last active May 16, 2016 09:12
hash_func & key_equal of std::unordered_map
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <unordered_map>
struct Eq {
bool operator()(int i, int j) const
{
return std::abs(i) == std::abs(j);
;; environment
$ uname -srvm
Linux 2.6.32-3-686 #1 SMP Thu Feb 25 06:14:20 UTC 2010 i686
$ g++ --version
g++ (Debian 4.4.2-9) 4.4.3 20100108 (prerelease)
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*OpenUI *ColorModel/Color Model: PickOne
*OPOptionHints ColorModel: "radiobuttons"
*OrderDependency: 10 AnySetup *ColorModel
*DefaultColorModel: Gray
*StpDefaultColorModel: RGB
*ColorModel Gray/Grayscale: "<</cupsColorSpace 0/cupsColorOrder 0>>setpagede
vice"
*ColorModel Black/Inverted Grayscale: "<</cupsColorSpace 3/cupsColorOrder 0>>s
etpagedevice"
*ColorModel RGB/RGB Color: "<</cupsColorSpace 1/cupsColorOrder 0>>setpagede