Skip to content

Instantly share code, notes, and snippets.

View makevoid's full-sized avatar

Francesco 'makevoid' Canessa makevoid

View GitHub Profile
//$fn = 50; // very high version, uses a lot of resources
//$fn = 20; // medium version, should render in ~5 minutes on a i7 with latest scad
$fn = 5; // dev version, or if you don't have a good processor
// use this bash script to export a lot of different stl files, so you can have unique boxes
//
// for i in {1..5}; do echo openscad -o "box_$i.stl" parametric_decorated_box.scad; done
//
// you may need to use the same approach for generating gcode... change 5 to your desired amount of boxes you want to create
@makevoid
makevoid / 3devo_box.scad
Created September 24, 2013 20:37
openscad long box
3devo_box();
module base() {
cube([120, 40, 10]);
translate([5, 5, 10]) color("purple") { // x: 0, y: 0, z: 0
cube([110, 30, 5]);
}
@makevoid
makevoid / canvas.html
Created September 24, 2013 23:30
simple canvas animation example coded for learning
<style>
canvas {
width: 100%
}
</style>
<canvas></canvas>
<script>
// simple canvas example coded for learning
@makevoid
makevoid / workflowy_mechanize.rb
Created September 26, 2013 21:48
Mechanize scraping example - scraping Workflowy json of everything
require 'mechanize'
require 'json'
require 'pp'
@agent = Mechanize.new
def login
page = @agent.get "https://workflowy.com"
form = page.forms.first
form.username = "makevoid@gmail.com"
@makevoid
makevoid / Configuration.h
Created October 14, 2013 15:23
Configuration MPStudio Marlin Firmware
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
// This configurtion file contains the basic settings.
// Advanced settings can be found in Configuration_adv.h
// BASIC SETTINGS: select your board type, temperature sensor type, axis scaling, and endstop configuration
//User specified version info of THIS file to display in [Pronterface, etc] terminal window during startup.
//Implementation of an idea by Prof Braino to inform user that any changes made
//to THIS file by the user have been successfully uploaded into firmware.
@makevoid
makevoid / gnome_scripting.sh
Created November 20, 2013 12:39
gnome windows scripting (applescript like)
# execute gnome terminal running rack up
gnome-terminal -e "bash -c \"bundle exec rackup -p 3000 -o 0.0.0.0; read line\"" --tab-with-profile=Default
# closes and re executes rackup
wmctrl -c -F rack; gnome-terminal -e "bash -c \"bundle exec rackup -p 3000 -o 0.0.0.0; read line\"" --tab-with-profile=Default -t "rack"
# bind this command to a shortcut
@makevoid
makevoid / triangular_prism.ooz.rb
Last active December 30, 2015 16:59
Triangular Prism lampshade made with oozby and ruby ! pic: https://www.facebook.com/photo.php?fbid=409589889144134&set=a.377251029044687.1073741846.359476797488777&type=3&theater I use the .rb extension just for github syntax higlighting, otherwise I usually use .ooz.
# apt-get install openscad # or download it from opendscad.org
# gem install oozby
# oozby compile trilamp.ooz.rb; openscad -o trilamp.stl trilamp.ooz.scad
r = 54
h = 150
depth = 1.3
rotate(x: 180) do
render do
@makevoid
makevoid / led_holder.ooz.rb
Created December 10, 2013 01:08
Led holder 3d model made in in Oozby
# oozby compile led_holder.ooz.rb; openscad -o led_holder.stl led_holder.ooz.scad
resolution minimum: 0.5
# resolution minimum: 0.2 # I used 0.2 for my prints
# led = 9
# ported by an old scad, rewrite with oozby's hexagonal_prism builtin function
def hex_cyl(h, d)
cylinder h, d/2, d/2#, $fn=6
@makevoid
makevoid / stampa_3d.md
Last active August 29, 2015 13:56
Stampa 3D FDM
@makevoid
makevoid / Guardfile
Created June 29, 2014 07:14
Simple guardfile sor sass + livereload
guard 'sass', input: 'sass', output: 'public/css'
guard 'livereload' do
watch(%r{public/css/.+\.(css)})
end