Skip to content

Instantly share code, notes, and snippets.

View jcfr's full-sized avatar
🎯
Focusing

Jean-Christophe Fillion-Robin jcfr

🎯
Focusing
View GitHub Profile
@jcfr
jcfr / 3613-test-slicer-midas-upload.cmake
Last active April 27, 2019 21:33
Small example to reproduce the Slicer extension upload issue. See issue #3613
#
# For example:
#
# cmake -DSlicer_SOURCE_DIR:PATH=/home/jchris/Projects/Slicer -DPACKAGE_FILEPATH:FILEPATH=/home/jchris/Projects/Slicer/Resources/3DSlicer-DesktopIcon.png -P 3613-test-slicer-midas-upload.cmake
#
if(NOT EXISTS "${Slicer_SOURCE_DIR}")
message(FATAL_ERROR "Make sure to run this script passing -DSlicer_SOURCE_DIR:PATH=/path/to/Slicer")
endif()
@jcfr
jcfr / get-pip.py
Last active March 12, 2019 17:38
Mirror of https://bootstrap.pypa.io/get-pip.py to workaround download issue using powershell
This file has been truncated, but you can view the full file.
#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file, this zip file contains
# an entire copy of pip (version 19.0.3).
#
# Pip is a thing that installs packages, pip itself is a package that someone
# might want to install, especially if they're looking to run this get-pip.py
@jcfr
jcfr / vtkITKTransformInverse.h
Created March 9, 2019 00:19
vtkITKTransformInverse.h difference between Slicer PR#1099 and PR#1096
// PR#1096
// https://github.com/Slicer/Slicer/pull/1096/commits/5d8cce93acfcd9504e98cb318e1ddff92afea723#diff-685fe5dc92e213efacb56c685635f8a7
/*=========================================================================
Program: Visualization Toolkit
Module: $RCSfile: vtkITKTransformInverse.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
from allensdk.api.queries.rma_api import RmaApi
import allensdk.core.json_utilities as ju
all_structs = []
root = RmaApi().model_query("Structure", criteria="[graph_id$eq1],[acronym$eqgrey]")[0]
all_structs.append(root)
# This is the CMakeCache file.
# For build in directory: /work/Slicer-build/DCMTK-build
# It was generated by CMake: /usr/bin/cmake
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
@jcfr
jcfr / .gitignore
Last active November 7, 2018 13:45
This document some convenience one-liner to generate the wiki code for the list of new and updated extensions on the announcements page.
ExtensionsIndex
generated
tmp
@jcfr
jcfr / CMakeLists.txt
Last active August 9, 2018 19:14
Project created while working on Slicer issue "4595: multiple rules generate slicer (ninja error)". See https://issues.slicer.org/view.php?id=4595
cmake_minimum_required(VERSION 3.12)
project(Test LANGUAGES CXX)
# launcher executable
set(CTKAppLauncher_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/fake_launcher_executable)
file(WRITE ${CTKAppLauncher_EXECUTABLE} "")
# application and executable name
@jcfr
jcfr / Dockerfile
Last active August 2, 2018 15:20
Manylinux docker file to install libtiff and openslide
#FROM quay.io/pypa/manylinux1_x86_64
FROM dockcross/manylinux-x64
# FROM quay.io/pypa/manylinux1_i686
# Includes glibc 2.5
RUN mkdir /build
WORKDIR /build
RUN yum install -y \
# for easier development
#
# slicer_check_cmake_https
#
# Check if CMake supports downloading files using the HTTPS protocol. Fail if
# HTTPS is unsupported.
#
# CMake should support HTTPS when compiled with CMAKE_USE_OPENSSL enabled.
#
# Based on the script created by Jean-Christophe Fillion-Robin:
# https://gist.github.com/jcfr/e88a2a7cbc4ddd235186
#!/bin/bash
#
# This script maintained at https://gist.github.com/jcfr/0bb9b695a5f1511a4b66f9e872d44743
#
#
# Source: https://lebkowski.name/docker-volumes/#recap
#