Skip to content

Instantly share code, notes, and snippets.

zshaheen /
Last active May 28, 2021
How to Setup Automatic Uploads to Anaconda from Travis CI in 15 minutes

How to Setup Automatic Uploads to Anaconda from Travis CI in 15 minutes

TL;DR: Edit .travis.yaml to install Anaconda and to run after testing. Edit meta.yaml to take in the environmental variables $VERSION and $CONDA_BLD_PATH. Create which sets the needed environmental variables, builds the tar archive, and uploads it to Anaconda. Finally edit some stuff on your Anaconda and Travis CI account so they can talk.


The following steps will detail how to automatically trigger Anaconda builds and uploads from Travis CI. This will only upload successful builds in the master branch and if there are multiple commits in a single day, it'll only keep the latest one. Both of these settings can easily be changed.

Edit .travis.yaml

First, edit .travis.yml so that it installs Anaconda.

Luthaf / Foo.cpp
Last active Feb 19, 2021
Calling C++ from Fortran
View Foo.cpp
#include "Foo.hpp"
#include <iostream>
using namespace std;
Foo::Foo(int _a, int _b): a(_a), b(_b){
cout << "C++ side, constructor" << endl;
View docker-clean
remove_dangling() {
echo "Removing dangling images ..."
docker rmi $(docker images -f dangling=true -q)
remove_stopped_containers() {
echo "Removing stopped containers ..."
docker rm $(docker ps -qa)
goodmami / logging.bash
Last active Sep 20, 2021
Basic logging commands for Linux shell scripts
View logging.bash
## Simple logging mechanism for Bash
## Author: Michael Wayne Goodman <>
## Thanks: Jul for the idea to add a datestring. See:
## Thanks: @gffhcks for noting that inf() and debug() should be swapped,
## and that critical() used $2 instead of $1