Skip to content

Instantly share code, notes, and snippets.

@tjdett
tjdett / vieps_gdal_install.sh
Created May 27, 2015 00:48
VIEPS GDAL install
#!/bin/bash
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
pip install gdal
@tjdett
tjdett / list_designate_records.sh
Last active August 29, 2015 14:16
List records for a Designate domain on NeCTAR
#!/bin/bash
# In addition to `curl`, `jq` is needed for JSON querying
# Change these for your domain
OS_DESIGNATE_DOMAIN=cloud.edu.au.
OS_DESIGNATE_RECORD=resbaz.$OS_DESIGNATE_DOMAIN
OS_TOKEN=$(curl -s \
-H "Content-Type: application/json" \
@tjdett
tjdett / writing-to-etcd.md
Created February 6, 2015 02:20
etcd out-by-one indexes

Set value:

core@pn-02 ~ $ ETCDCTL_PEERS=http://127.0.0.1:2379/ /opt/etcd/etcdctl set /test-`date +"%s"` "tjdett: but if that one machine isn\'t getting state replicated then it could be behind"

Get cluster-wide state:

$ ansible routing -i inventory.ini --sudo -a "curl -s http://localhost:2379/v2/keys/test-1423189078"
pn-04.resbaz.cloud.edu.au | success | rc=0 >>
{"action":"get","node":{"key":"/test-1423189078","value":"tjdett: but if that one machine isn't getting state replicated then it could be behind","modifiedIndex":456,"createdIndex":456}}
@tjdett
tjdett / TOC example.ipynb
Created January 15, 2015 00:38
TOC example for IPython Notebooks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tjdett
tjdett / install_nltk.sh
Last active August 29, 2015 14:07
NLTK DIT4C install script
#!/bin/bash
export HOME=/home/researcher
source /opt/python/bin/activate
pip install nltk pyyaml tkinter
@tjdett
tjdett / inkpen.md
Created June 25, 2014 01:57
DIT4C usability meeting

DIT4C usability meeting

Teaching - potentially very useful

Actual Research - not really powerful enough:

  • Data sets are big.
  • Already have access to 80 core machines.
  • No SSH in.
  • No Sublime Text editor.
  • Not sure cloud services are stable enough.
@tjdett
tjdett / inkpen.md
Created June 23, 2014 04:03
Created using Inkpen - http://inkpen.in

DIT4C - demo → production

Current issues that need to be resolved before production use can be considered. Limited to absolutely necessary, and not a feature wishlist.

  1. Any user can currently cause a denial of service, through:
  • High CPU usage
  • High memory usage
  • High disk usage
  • A fork bomb - intentional or otherwise
  1. There are no limits on the number of active projects, potentially compromising the viability of the service.
@tjdett
tjdett / notes.md
Last active August 29, 2015 14:02
Notes for Python SC lessons on DIT4C.

Notes for Python SC lessons on DIT4c

First challenge: How do I "download these four data files"?

mkdir sc
# Use shell expansion to get each of the four files
wget http://resbaz.github.io/2014-03-18-combine/novice/python/inflammation-0{1,2,3,4}.csv
@tjdett
tjdett / .tmux.conf
Created September 8, 2013 23:29
My TMUX config file at work
# Mouse
setw -g mode-mouse on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mouse-utf8 on
# Titles
set-option -g set-titles on
set-option -g set-titles-string '#S:#I.#P #W'
@tjdett
tjdett / not_wysiwyg.markdown
Created May 28, 2013 02:14
Markdown example for AORRA

Non-WYSIWYG Example

This is just some paragraph text. Much of a document is paragraph text with no styling.

Why?

The advantage of using Markdown is that the formatting isn't part of the text you are editing.

The result is that you can focus more on the words you are writing (and the changes made to them) and less on changes to formatting.