Skip to content

Instantly share code, notes, and snippets.

@ejrh
ejrh / gist:3844212
Created October 6, 2012 06:23
Snake puzzle solution
#include "colors.inc"
#include "math.inc"
#declare Camera_0 = camera {/*ultra_wide_angle*/ angle 75 // front view
location <0.0 , 1.0 ,-3.0>
right x*image_width/image_height
look_at <0.0 , 1.0 , 0.0>}
#declare Camera_1 = camera {/*ultra_wide_angle*/ angle 90 // diagonal view
location <2.0 , 2.5 ,-3.0>
right x*image_width/image_height
@ejrh
ejrh / milos.list
Created March 29, 2013 23:48
milos.list
E201 // Load 1 into register 2 -- use this for incrementing
E101 // Load 1 into register 1 -- use this for the counter
B101 // Start of loop: Display register 1 on port 1
0112 // Add register 2 into register 1
C0FE // Jump up two instructions, to loop
@ejrh
ejrh / gist:5516008
Created May 4, 2013 03:29
How to edit log details
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
export GIT_AUTHOR_NAME="ejrh"
export GIT_AUTHOR_EMAIL="ejrh00@gmail.com"
export GIT_COMMITTER_NAME="ejrh"
export GIT_COMMITTER_EMAIL="ejrh00@gmail.com"
'
module fpgafrac(
input wire mclk,
/*input wire [7:0] sw,
input wire [3:0] btn,
output wire [7:0] led,
output wire [3:0] an,
output wire dp,
output wire [6:0] seg,*/
module fpgafrac(
input wire mclk,
input wire [7:0] sw,
input wire [3:0] btn,
/*output wire [7:0] led,
output wire [3:0] an,
output wire dp,
output wire [6:0] seg,*/
@ejrh
ejrh / select-layer.svg
Created November 3, 2014 07:16
XSLT for selecting only certain layers from an Inkscape SVG file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
----------------------------------------------------------------------------
-- DPIMREF.VHD -- Digilent Parallel Interface Module Reference Design
----------------------------------------------------------------------------
-- Author: Gene Apperson
-- Copyright 2004 Digilent, Inc.
----------------------------------------------------------------------------
-- IMPORTANT NOTE ABOUT BUILDING THIS LOGIC IN ISE
--
-- Before building the Dpimref logic in ISE:
-- 1. In Project Navigator, right-click on "Synthesize-XST"
step(0, []).
step(1,[1]).
step(2,[2]).
step(3,[3]).
step(N,[H|T]) :-
N > 0,
member(H, [1,2,3]),
Remaining is N - H,
Remaining > 0,
@ejrh
ejrh / font.txt
Last active August 29, 2015 14:11
__
| __ |__| __|
|__ |__| | | |__|
__ __
|__ |__| | |
| | | | |__ |
__ __
| |__| | |
//#include <stdio.h>
void main() {
int max;
max = 10000;
int candidate;
candidate = 2;
while (candidate < max) {