Skip to content

Instantly share code, notes, and snippets.

View alexrudy's full-sized avatar

Alex Rudy alexrudy

View GitHub Profile
@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 / 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