Skip to content

Instantly share code, notes, and snippets.

View justinledwards's full-sized avatar

Justin Edwards justinledwards

  • Florida Ninth Circuit Courts
  • Florida
View GitHub Profile
#include <opencv/cv.h>
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char* argv[])
{
VideoCapture cap(0);// open the video file for reading
@justinledwards
justinledwards / dryrun.ps1
Last active August 29, 2015 14:00
Ultra Fast VDI Boot
# Did you run Voodoo on the registry and reboot?
# Did you run "Set-ExecutionPolicy remotesigned" ?
Set-Location C:\voodoomagic
function Test-ReparsePoint([string]$path) {
$file = Get-Item $path -Force -ea 0
return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint)
}
function Symlinker([string]$dir) {
# 200 steps/rev * 32 "1/32" microstepping * 25.4mm "to inches" / 0.8mm pitch = 203200 which makes no sense.
[AXIS_2]
TYPE = LINEAR
MAX_VELOCITY = 4.0
MAX_ACCELERATION = 80.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL = 4.8
STEPGEN_MAX_ACC = 88.0
@justinledwards
justinledwards / retract-fix.rb
Created August 12, 2014 20:20
Retract post process
#!/usr/bin/env ruby
#filepath = "/home/user/whatever.gcode"
#chmod +x this file
# ./thisfile.rb "/file/path.here" > "/new/file.path"
filepath = ARGV[0].to_s
puts filepath
IO.write(filepath, File.open(filepath) {|f| f.read.gsub(/G1 E-1.*\nG0/, "G1 E-1")})
@justinledwards
justinledwards / hard_drive_spindle_motor_filament_spool_holder.scad
Last active August 29, 2015 14:05
Hard drive spindle motor filament spool holder
//uncomment the part you want to make
//main_part();
spool_attachment();
largest_circle=32;
mount_plate = 25;
mount_plate_height = 1.5;
cylinder(d=20, h=10, center=true);
for ( i = [0 : 20] )
{
rotate( i * 18, [0, 0, 1])
translate([10,0,0])
cube([1,1,9], center=true);
}
@justinledwards
justinledwards / gist:1b4ed5134b0b4699fe4c
Created September 4, 2014 14:04
mendel config marlin
#define DEFAULT_AXIS_STEPS_PER_UNIT {52.4934, 52.4934, 3200/1.25, 1487/1.1} // For MakerGear
#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 45} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {900,900,80,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
//
#define DEFAULT_XYJERK 20.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
@justinledwards
justinledwards / effector.scad
Created October 19, 2014 18:32
Current end effector.scad
// Delta-Six 3D Printer
// Created by Sage Merrill
// Released on Openbuilds.com
// Based on orginal design by Johann C. Rocholl (Kossel Printer)
// License = Attribution Share Alike - CC BY SA
include <configuration.scad>;
//use <light_ring_mount.scad>;
effector_offset = 37; // Same as DELTA_EFFECTOR_OFFSET in Marlin.
@justinledwards
justinledwards / thews-microextruder.scad
Last active August 29, 2015 14:08
Thews's Microextruder
include <MCAD/metric_fastners.scad>;
include <MCAD/nuts_and_bolts.scad>;
fudge=0.02;
gn11_gearbox_diameter = 28;
gn11_shaft_diameter = 6;
gn11_shaft_length = 16;
gn11_offset_plug = 18;
gn11_offset_depth = 2;
m3 = 3;
gn11_hole_spacing = 22;
@justinledwards
justinledwards / naudio-silence.cs
Last active August 29, 2015 14:09
Naudio Amount of Silence
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using NAudio;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;