Skip to content

Instantly share code, notes, and snippets.

View fbudin69500's full-sized avatar

Francois Budin fbudin69500

  • Kitware Inc.
  • Carrboro, NC
View GitHub Profile
@fbudin69500
fbudin69500 / folder.config
Created September 7, 2018 02:37
zsh functions to activate and deactivate configurations for specific workspaces
# Configure environment per workspace
# The configuration is defined in a file called .folder.config
# that is contained in any folder. If such a file is found
# in the current folder or any of its parents, this file
# is sourced. The following variables can be defined in a
#`.folder.config` file:
# * `folder_virtual_env`: This variable defines the Python virtual
# environment that is automatically loaded when working in
#!/bin/bash
set -euox pipefail
# Update cache just in case.
#apt-file update
list_packages=""
# Find all files in current repository.
for i in $(find . )
do
trap { Write-Error $_; Exit 1 }
if (![System.IO.File]::Exists(".\install-utils.ps1")) {
Write-Host "Download install-utils.ps1"
$url = "https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-utils.ps1"
$cwd = (Get-Item -Path ".\" -Verbose).FullName
(new-object net.webclient).DownloadFile($url, "$cwd\install-utils.ps1")
}
Import-Module .\install-utils.ps1 -Force
@fbudin69500
fbudin69500 / CMakeLists.txt
Last active April 27, 2018 09:27 — forked from jcfr/CMakeLists.txt
CMake project allowing to build ICU 32 and 64-bit for Windows and upload the associated "tar.gz" archives on http://packages.kitware.com
cmake_minimum_required(VERSION 2.8.10.2)
#
# This project allows to configure, build, archive and upload an OpenSSL install tree.
#
if(DEFINED UPLOAD_PACKAGE_SCRIPT)
set(MIDAS_URL "http://packages.kitware.com")
set(FOLDER_ID 203)
@fbudin69500
fbudin69500 / DownloadTutorials.py
Created July 24, 2017 18:50
Download Scipy 2017 tutorial material
#!/usr/bin/env python
# Written by someone who posted it on Slack
import requests
links = [
'https://github.com/kwmsmith/scipy-2017-cython-tutorial',
'https://github.com/gforsyth/numba_tutorial_scipy2017',
'https://github.com/sympy/scipy-2017-codegen-tutorial',
@fbudin69500
fbudin69500 / CreateSaveLoadImagesITKPython.py
Created March 2, 2016 13:48
Create, Save, Load Images with ITK in python
#!/usr/bin/env python
import itk
import tempfile
import os
def pixel_type_from_IO(pixel, component,dimension):
import itk
if pixel == 'scalar':
PixelType = component
@fbudin69500
fbudin69500 / Ubuntu 14.03
Last active January 8, 2016 20:07
Slicer Installtion steps
From http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_Instructions#Ubuntu
sudo apt-get install subversion git-core git-svn
sudo apt-get install make gcc g++ libX11-dev libXt-dev libgl1-mesa-dev libglu1-mesa-dev libfontconfig-dev libxrender-dev libncurses5-dev
sudo apt-get install qt4-qmake
sudo apt-get install libqt4-dev libqt4-dev-bin libqt4-opengl-dev libqt4-qt3support libqt4-webkit-dev qt4-linguist-tools qt4-designer qtcreator
sudo apt-get install libssl-dev
mkdir ~/Support && cd Support
wget http://www.cmake.org/files/v3.4/cmake-3.4.1.tar.gz
@fbudin69500
fbudin69500 / VBInstallUbuntu15.10.sh
Created November 12, 2015 18:00
Automatically download Ubuntu 15.10 iso and creates a virtual machine with VirtualBox to install it.
# !/bin/env bash
name="Ubuntu15.10-auto"
image="http://releases.ubuntu.com/15.10/ubuntu-15.10-desktop-amd64.iso"
# To show list of os types available, type "VBoxManage list ostypes"
ostype="Ubuntu_64"
cpu="2"
memory="2048"
cpuexecutioncap="80"
image_basename=`basename $image`
#image_basename_no_ext="${image_basename%.*}"
@fbudin69500
fbudin69500 / coverage.sh
Created November 9, 2015 14:22
Code coverage
#!/bin/csh
make
lcov --directory . --zerocounters
ctest
lcov --directory . --capture --output-file app.info
genhtml app.info
firefox ./index.html
@fbudin69500
fbudin69500 / X11Config.sh
Created November 8, 2015 20:08
MacOS - xlib.h not found
#!/bin/bash
#http://stackoverflow.com/questions/11465258/xlib-h-not-found-when-building-graphviz-on-mac-os-x-10-8-mountain-lion
export CPPFLAGS=-I/opt/X11/include