Skip to content

Instantly share code, notes, and snippets.

@kevinushey
kevinushey / broken.cpp
Last active Feb 9, 2020
Fails to compile with gcc 10 on Fedora Rawhide.
View broken.cpp
void* callback(const char* name);
extern "C" {
inline void f1()
{
static void (*f)();
f = (void(*)()) callback("f1");
f();
}
@kevinushey
kevinushey / disable-minidump.reg
Created Jan 8, 2019
Disable Windows Minidumps
View disable-minidump.reg
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
@kevinushey
kevinushey / enable-minidump.reg
Created Jan 8, 2019
Enable Windows Minidumps
View enable-minidump.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
@kevinushey
kevinushey / rtools.R
Last active Dec 13, 2018
Rtools not found in expected PATH
View rtools.R
Sys.setenv(PATH = paste("C:\\RBuildTools\\3.5\\bin;C:\\RBuildTools\\3.5\\mingw_64\\bin", Sys.getenv("PATH"), sep = ";"))
file <- tempfile(fileext = ".c")
writeLines("void test() {}", con = file)
R <- file.path(R.home("bin"), "R")
file <- normalizePath(file, winslash = "/")
system2(R, c("CMD", "SHLIB", shQuote(file)))
# c:/Rtools/mingw_64/bin/gcc -I"C:/R/R-35~1.2BE/include" -DNDEBUG -O2 -Wall -std=gnu99 -mtune=generic -c C:/Users/kevin/AppData/Local/Temp/RtmpK2O0OE/file123830c41969.c -o C:/Users/kevin/AppData/Local/Temp/RtmpK2O0OE/file123830c41969.o
# sh: c:/Rtools/mingw_64/bin/gcc: No such file or directory
@kevinushey
kevinushey / repro.md
Created Nov 1, 2018
Markdown document that crashes during Pandoc render.
View repro.md
title author output_format
State of the Ecosystem: Indicator Processing & Visualization
Sean Hardison
html_document

Introduction

The purpose of this file is to document State of the Ecosystem (SOE) indicator data processing. To update existing data sets, set the save_clean parameter in the Rmarkdown set-up chunk to TRUE. Raw data for these indicators are available in the file directory extdata, and libraries required to process indicator data sets are shown below.

View DisableMinidumps.reg
Windows Registry Editor Version 5.00
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps]
@kevinushey
kevinushey / # llvm - 2017-09-09_12-28-18.txt
Created Sep 10, 2017
llvm on macOS 10.12.6 - Homebrew build logs
View # llvm - 2017-09-09_12-28-18.txt
Homebrew build logs for llvm on macOS 10.12.6
Build date: 2017-09-09 12:28:18
@kevinushey
kevinushey / # llvm - 2017-09-08_13-00-19.txt
Created Sep 8, 2017
llvm on macOS 10.12.6 - Homebrew build logs
View # llvm - 2017-09-08_13-00-19.txt
Homebrew build logs for llvm on macOS 10.12.6
Build date: 2017-09-08 13:00:19
@kevinushey
kevinushey / # cairo - 2017-08-10_15-08-14.txt
Created Aug 10, 2017
cairo on macOS 10.12.6 - Homebrew build logs
View # cairo - 2017-08-10_15-08-14.txt
Homebrew build logs for cairo on macOS 10.12.6
Build date: 2017-08-10 15:08:14
View gist:56dea0ae5aaebf4c69cc70b819aeb08f
{'StringIO': <module 'StringIO' from '/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/StringIO.pyc'>,
'UserDict': <module 'UserDict' from '/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.pyc'>,
'__builtin__': <module '__builtin__' (built-in)>,
'__future__': <module '__future__' from '/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/__future__.pyc'>,
'__main__': <module '__main__' (built-in)>,
'_abcoll': <module '_abcoll' from '/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_abcoll.pyc'>,
'_ast': <module '_ast' (built-in)>,
'_codecs': <module '_codecs' (built-in)>,
'_collections': <module '_collections' from '/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so'>,
'_ctypes': <module '_ctypes' from '/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so'>,