Skip to content

Instantly share code, notes, and snippets.

function create_clusters() {
while(x) {
this.point_clusters[x] = consulta_arbol_r_x();
for (var i=0; point_clusters.lenght <= i; i++) {
@pablinhob
pablinhob / gist:9170598
Last active August 29, 2015 13:56
Lectura JSON e filtros básicos en angular
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="http://rawgithub.com/prajwalkman/angular-slider/master/angular-slider.css" title="" type="" />
<script data-require="[email protected]" src="lib/angular.min.js" data-semver="1.1.4"></script>
<script type="text/javascript" src='http://rawgithub.com/prajwalkman/angular-slider/master/angular-slider.js' charset="utf-8"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
@pablinhob
pablinhob / gist:3d20315384e870e80126
Last active August 29, 2015 14:17
BoardCad multiple layers deck
"""
G-code generation for the deck
"""
import boardcad.gui.jdk.BoardCAD
import boardcam.cutters.FlatCutter
import boardcam.cutters.STLCutter
import boardcam.BoardMachine
import cadcore.NurbsPoint
from javax.swing import *
@pablinhob
pablinhob / to_marlin_gcode.py
Last active January 23, 2023 22:33
Convert standard CNC Gcode to Marlin 3D printer firmware legible format
#!/usr/bin/python
import re
import os
import sys
try:
sys.argv[1]
sys.argv[2]
except IndexError:
print "usage: ./to_marlin_gcode origin.nc origin_marlin.gcode"
<!DOCTYPE html>
<html>
<head>
<title>Map populating form fields</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> <!-- original: http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css -->
<style>
html, body, #container, #map {
padding: 0;
margin: 0;
@pablinhob
pablinhob / gcodeFormula.py
Last active October 24, 2019 07:51
Correct G-Code square desviations in CNC
#!/usr/bin/env python
import os
import sys
import re
import fnmatch
from sys import argv
from pprint import pprint
def applyFormula( gcodePath ):
<html>
<head>
<title>Exemplo frame</title>
<style>
body {
padding:0;
margin:0;
}
header {
width:100%;
<html>
<head>
<title>Exemplo frame</title>
<style>
body {
padding:0;
margin:0;
}
header {
width:100%;