Skip to content

Instantly share code, notes, and snippets.

View jproney's full-sized avatar

James Roney jproney

View GitHub Profile
package javacontrols;
import java.awt.Container;
import java.io.IOException;
import java.util.Iterator;
import java.util.Random;
import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import org.ejml.dense.row.RandomMatrices_DDRM;
import org.ejml.ops.MatrixIO;
%minicim motor params
free_current = 3;
free_spd_rpm = 5480;
free_spd = free_spd_rpm/60;
G = 12/60;
Jm = .005;
Jw = .002;
stall_torque = 1.4;
stall_current = 89;
R = 12/stall_current;
@jproney
jproney / DPEAStartupScript.md
Last active February 20, 2018 17:28
Creating a Raspberry Pi Startup Script

Creating a Startup Script on a Raspberry Pi

When creating a UI using a Raspberry Pi and a Slush Engine, it is desirable for your UI script to run as soon as the Raspberry Pi loads the display. Note that there are very many ways of accomplishing this, so the steps listed below may differ from some online guides. These steps were tested on Raspbian Stretch Lite with the RPD desktop environment installed.

Steps:

  1. Open the LXDE autostart file by typing sudo vim ~/.config/lxsession/LXDE-pi/autostart into a terminal.
  • This file should have several lines already, each begining with @. If this file is empty, ensure you typed the path in correctly.
  1. At the end of the autostart file, add a line that runs your UI script. This line constists of an @ sybmol at the beginning, followed by python3 [PATH TO YOUR SCRIPT]. For example: @python3 /home/pi/Documents/InfinityMirrorPie/main.py.
  • If you don't know how to edit files in vim, try this or use sudo nano instead.
@jproney
jproney / ECC2.md
Last active February 22, 2024 00:43
ECC2_Writeup

PicoCTF 2017: ECC2

A 1064CBread Writeup

Problem

In the file handout.txt, we are given the following parameters for an elliptic curve:

  • y^2 = x^3 + A*x + B mod M -- the curve equation
  • M -- the modulus of the curve