Skip to content

Instantly share code, notes, and snippets.

View alexrudy's full-sized avatar

Alex Rudy alexrudy

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexrudy
alexrudy / ssh-instructions.md
Last active December 12, 2015 06:58
A description of my setup for SSH keys and GNU Screen

SSH Key-Based Authentication

First, on the local machine:

$ ssh-keygen -t rsa

This creates an ssh key. You should only do this once, and you only need to do it if you want to set your own password to use with your SSH key. Here are some good reasons to set a password with your SSH key:

  • If someone steals your key files, they can't use them.
  • Your password will be stored in the Mac OS X Keychain (like so many others), so you usually won't even have to enter it.
  • Passwords make life a little bit safer.
@alexrudy
alexrudy / telemetry.rst
Last active November 4, 2015 18:05
Telemetry for ShaneAO Documentation

Telemetry recorder tools.

The interface for the telemetry recorder is only available in the ShaneAO command line interface for now. Please use the box next to the >>> symbol in ShaneAO to enter telemetry commands.

The telemetry recorder will:

  • Only record closed loop telemetry when the system appears settled.
  • Only start once the user calls telemetry.start().
@alexrudy
alexrudy / installiraf.md
Created October 16, 2012 01:24
IRAF installation

Title: Notes on Installing IRAF Author: Alexander Rudy

Introduction

We're going to install [IRAF][] and [PYRAF][] on a MacMini. Our MacMini uses [MacPorts][] to manage most things, so a lot of software will be checked and updated using [MacPorts][]. The installation instructions are mostly done stream of conciousness as I went through everything. It turns out that despite [IRAF][]'s big, scary, horrible nature, this process is not too complicated for a basic, working setup.

PLEASE BEAR IN MIND:

  • I use [MacPorts][] whenever possible, and almost always for Python things. If your numpy, matplotlib or ipython installations are wierd, you're in for a ride.
  • Also, I don't do much interactively in PyRAF, so if you do, you may find bugs. Let me know!
@alexrudy
alexrudy / getattr.py
Created September 19, 2012 03:46
Stack Attribute Trick
def __getattr__(self,name):
"""Provides a passthrough for functions that we haven't named yet.
This allows *stacks* to call methods defined within *frames*. Most frames define a :meth:`~BaseFrame.__show__`. This method can be called using :meth:`show` with the following syntax::
>>> Stack.show("SomeFrameName")
The special syntax can take as many framenames as desired as arguments, and will call the named method on each one. So::
>>> Stack.show("FrameA","FrameB","FrameC")
Process: Finder [255]
Path: /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
Identifier: com.apple.finder
Version: 10.7.2 (10.7.2)
Build Info: Finder_FE-751002010000000~9
Code Type: X86-64 (Native)
Parent Process: launchd [234]
PlugIn Path: /Library/ScriptingAdditions/TotalFinder.osax/Contents/Resources/TotalFinder.bundle/Contents/MacOS/TotalFinder
PlugIn Identifier: com.binaryage.totalfinder
@alexrudy
alexrudy / ipydb.py
Created September 20, 2015 20:17
IPython Debugger
# -*- coding: utf-8 -*-
import sys
import warnings
_ipydb_active = False
def ipydb():
"""Try to use the iPython debugger on program failures."""
global _ipydb_active
@alexrudy
alexrudy / Compound Models.ipynb
Created May 5, 2015 22:07
Compound Astropy Models
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexrudy
alexrudy / tmux_funcs.sh
Last active August 29, 2015 14:19
tmux shell scripting functions
#
# tmux_funcs.sh
#
# This file provides some basic helper functions for
# working with TMUX from a shell script.
#
# Copyright (c) 2015, Alexander Rudy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without