Skip to content

Instantly share code, notes, and snippets.

@branning
branning / miniconda_install.sh
Last active February 20, 2018 15:10
Install miniconda3 64-bit
#!/bin/bash
#
# Install conda
# modified from https://github.com/blaze/odo/blob/master/.travis.yml
miniconda_home=$HOME/miniconda
case $OSTYPE in
linux*) OS='Linux';;
darwin*) OS='MacOSX';;
mysys*|cygwin) OS='Windows';;
@branning
branning / winswitch_01trillian.md
Last active October 31, 2016 17:05
Use Winswitch to run Trillian remotely on Ubuntu and view locally on MacOS

Use Winswitch to run Trillian remotely on Ubuntu 14.04 and view locally on MacOS

Winswitch is like 'screen for X11', in that it allows you to start an application on a remote host, connect to it remotely, disconnect, and re-connect later and everything will be as you left it. It decouples the viewing of a graphical application from the running of it.

You can achieve a similar effect with X11 forwarding in ssh, by using ssh -Y <hostname> <application>, but when you disconnect the application will quit.

The connection itself is made with Xpra, which is like VNC but allows more efficient video and audio compression.

Install Trillian on remote server

@branning
branning / onEditHighlight.js
Created February 11, 2019 05:17
Google Sheets set cell background color based on named range background color
var stages = SpreadsheetApp.getActiveSpreadsheet().getRangeByName("Stages")
function onEdit(e) {//"e" receives the event object
var range = e.range;//The range of cells edited
var value = e.value;//the new value in the cell
var columnOfCellEdited = range.getColumn();//Get column number
if (columnOfCellEdited !== 1) {
return;