Skip to content

Instantly share code, notes, and snippets.

View erinzm's full-sized avatar
🌆
hmmmm

Erin Marshall erinzm

🌆
hmmmm
  • UW-Madison/Wisconsin Institute of Discovery
  • Madison, Wisconsin
View GitHub Profile
@erinzm
erinzm / Reattach.php
Created December 4, 2013 03:30
A WordPress Plugin for reattaching/unattaching media. Paste into functions.php, or put it in its own plugin file.
add_filter("manage_upload_columns", 'upload_columns');
add_action("manage_media_custom_column", 'media_custom_columns', 0, 2);
function upload_columns($columns) {
unset($columns['parent']);
$columns['better_parent'] = "Parent";
return $columns;
@erinzm
erinzm / m64p_install.sh
Last active August 29, 2015 13:56
Install Mupen64Plus! Newest Git version!
#!/bin/bash
# Install Mupen64Plus
cd
mkdir mupen64plus
cd mupen64plus
echo "Downloading installation scripts..."
wget https://github.com/mupen64plus/mupen64plus-core/raw/master/tools/m64p_helper_scripts.tar.gz
echo "Done"
echo "Unpacking installation scripts..."
@erinzm
erinzm / m64py_install.sh
Last active August 29, 2015 13:56
M64Py installer!
#!/bin/bash
# Install M64Py
cd
mkdir m64py
cd m64py
sudo apt-get install python-qt4 python3-qt4 libsdl1.2-dev
wget http://downloads.sourceforge.net/project/m64py/m64py-0.2.0/m64py_0.2.0-1_all.deb?r=http%3A%2F%2Fm64py.sourceforge.net%2F&ts=1392242617&use_mirror=hivelocity
mv m64py_0.2.0-1_all.deb?r=http:%2F%2Fm64py.sourceforge.net%2F m64py_0.2.0-1_all.deb
sudo dpkg -i install m64py_0.2.0-1_all.deb
@erinzm
erinzm / cutting.svg
Last active August 29, 2015 14:03
Mendel90 DXF (layout) files
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erinzm
erinzm / keybase.md
Last active August 29, 2015 14:16
keybase.md

Keybase proof

I hereby claim:

  • I am ArchimedesPi on github.
  • I am archimedespi (https://keybase.io/archimedespi) on keybase.
  • I have a public key whose fingerprint is F1A1 745C 486D 2F41 794C A621 FE4E 860E 818B C54C

To claim this, I am signing this object:

@erinzm
erinzm / sdvx.ino
Last active August 29, 2015 14:16
sdvx controller
#include <Encoder.h>
// -- some #defines to save typing
#define pinToKeyWD(pin, key) if (digitalRead(pin)==LOW) { Keyboard.press(key); } else if (digitalRead(pin)==HIGH) { Keyboard.release(key); }
#define btn(pin) pinMode(pin, INPUT_PULLUP);
#define light(pin) pinMode(pin, OUTPUT);
// -- set up the encoders
Encoder wheel1(0, 1);
Encoder wheel2(2, 3);
@erinzm
erinzm / Phant_LightLevel.ino
Created May 9, 2015 02:43
Phant from an ESP8266
#include <ESP8266WiFi.h>
const char *ssid = "*redacted*";
const char *password = "*redacted*";
const char *phant_public_key = "pwz6Xgv697hdJdoMA9qm";
const char *phant_private_key = "*redacted*";
const char *phant_host = "data.sparkfun.com";
void setup() {
@erinzm
erinzm / TheodoreTeleop.java
Last active October 6, 2015 21:40
Theodore Teleop
package com.qualcomm.ftcrobotcontroller.opmodes;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorController;
// everything before this line IntelliJ writes out for you automatically as you use stuff.
/**
* Created by liam on 9/19/2015.
*/
@erinzm
erinzm / lag.md
Last active November 23, 2015 00:12
writeup about finding electrical lag

Measuring lag on MR controllers

The important thing is remembering that what you want to measure is the time between pressing a button or joystick and the motor beginning to run. The best way to measure this is as follows (you need a digital oscilloscope):

  • Open up a Logitech joystick and solder in two little wires to the a button's pads so that you get a current when it's pressed. Wire these to channel A of an oscilloscope.
  • Attach a pair of leads to a motor controller. Wire these to channel B of an oscilloscope.
  • Write software to run the motor when the button is pressed. Make it as simple as possible.
  • Set the oscilloscope to trigger and acquire on channel A rise (or fall depending on the wiring). Then you can see the distance between the button signal's rising edge and the motor signal's rising edge.
@erinzm
erinzm / ftc_opmode_startup.md
Created October 6, 2015 21:30
FTC SDK Opmode startup cheatsheet

When INIT is pressed:

  • init() is called
  • init_loop() is called repeatedly

When play is pressed:

  • start() is called
  • loop() is called repeatedly

When stop is pressed: