Skip to content

Instantly share code, notes, and snippets.

Jay Pfaffman pfaffman

Block or report user

Report or block pfaffman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View install_wifi_access_point.sh
#!/bin/bash
### Setup a wifi Access Point for Fall 2013 critter corral study
# based on from https://gist.github.com/dashohoxha/5767262/
# unlike the above script, this configures hotspot to run at boot
### make sure that this script is executed as root
if [ $(whoami) != 'root' ]
then
echo "
This script should be executed as root or with sudo:
sudo $0
View getdata.sh
#!/bin/bash
# Get data from connected server identified by the current WIFI SSID
if [ -f /sbin/iwconfig ]
then
# it's ubuntu (or, maybe debian)
HOST=`iwconfig wlan0 | grep ESSID | sed 's/.*ESSID:\"\(.*\)\"/\1/'`
else
# oops.
echo Mac solution is not implemented
# networksetup -getairportnetwork en1 | awk -F": " '{print $2}'
View install_bogus_nameserver.sh
#!/bin/bash
# install stuff needed to be a server and wifi hotspot
# Make any stanford.edu address resolve to 10.10.10.1
# Jay Pfaffman <pfaffmman@relaxpc.com>
# This should be used on a stand-alone network where access to the
# actual server is unavailable.
if [ ! -f /etc/init.d/bind9 ]
then
sudo apt-get -y --force-yes install bind9
View README.md
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.bar rect {
fill: steelblue;
View README.md
View README.md

Switch between stacked and grouped layouts using sequenced transitions! Animations preserve object constancy and allow the user to follow the data across views. Animation design by Heer and Robertson. Colors and data generation inspired by Byron and Wattenberg.

@pfaffman
pfaffman / gist:6383973
Created Aug 29, 2013
Start critter corral
View gist:6383973
# Upstart script for a play application that binds to an unprivileged user.
# put this into a file like /etc/init/play.conf
#
# This could be the foundation for pushing play apps to the server using something like git-deploy
# By calling service play stop in the restart command and play-start in the restart command.
#
# Usage:
# start play
# stop play
# restart play
View fixnames
#!/usr/bin/env bash
# fixnames
# Jay Pfaffman <jay@pfaffman.com>
# Available from https://gist.github.com/pfaffman/8644399
if [ $# -lt 1 ]
then
echo "Usage " $0 files
echo " Replaces names (or any words) in files passed on the command line."
echo " Edit below to change what names get replaced."
exit
View INSTALL-godaddy.md

Set up Discourse on GoDaddy in under 30 minutes with zero knowledge of Rails or Linux shell using our [Discourse Docker image][dd]. We recommend [DigitalOcean][do], but these steps have been modified to describe setting up a [GoDaddy][gd] cloud image and prepare it for using the [standard install guide][install].

Create New Cloud Server

[Sign up for a GoDaddy Cloud server][gd], update billing info, then create your new server.

  • The hostname you choose does not matter. In the next section you will assign your domain name to this server.

  • Choose a username and password (or SSH key if you have one)

You can’t perform that action at this time.