Skip to content

Instantly share code, notes, and snippets.

View MatthewManley's full-sized avatar

Matthew Manley MatthewManley

  • 84.51˚
  • United States
  • 12:28 (UTC -04:00)
View GitHub Profile
// https://gist.github.com/MatthewManley/27028f1b1ff609f0ea3cbd719016f9a8
// I printed this with supports but only inbetween the bottom base and the outer spinning part
// Using Cura (I am sure you can do this in any slicing software), I put a support blocker
// to prevent supports from generating to the upper overhang
// The overhang on the top base has been coming out a little sloppy for me, but its good enough and
// trying to print supports there is quite excessive imo
base_radius = 10; // make it thick
base_height = 2; // how tall the cricle thing on the bottom is`
@MatthewManley
MatthewManley / Program.cs
Created May 22, 2020 18:14
Get elements that appear in one of two enumerables
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
namespace Workbench
{
class Program
{
static void Main(string[] args)
{
@MatthewManley
MatthewManley / main.py
Created October 22, 2019 21:57
grammars.py
from state import State
import re
# Note this doesn't work on productions with lambdas
def neighbor_states(state: State, productions):
for i in range(len(state.value)):
char = state.value[i]
# If character is lowercase, then it doesn't get expanded
if not char.isupper():
alias proj='cd ~/Projects'
alias bashrc='. ~/.bashrc'
alias aliases='vi ~/.bash_aliases'
alias docs='cd ~/Documents'
alias xclip='xclip -selection c'
pushd()
{
if [ $# -eq 0 ]; then
DIR="${HOME}"
@MatthewManley
MatthewManley / Program.cs
Created June 7, 2018 01:29
Horner rule, works with polynomials whose highest degree is odd
using System;
using System.Diagnostics.Tracing;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
namespace Horners
{
class Program
{
static async Task Main(string[] args)