This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
namespace DrillBoardGcode | |
{ | |
class Program | |
{ | |
static double DRILLDEPTH = -4; | |
static double DRILLFEED = 5 * 60; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Spool parts storage organizer | |
Based on https://www.thingiverse.com/thing:2793548 by hirez99 | |
Frank van der Hulst [email protected] | |
24 Feb 2018 | |
This generates a drawer that can be fitted into an empty filament spool to | |
provide storage for small parts. | |
Holes need to be drilled in the sides of the spool for axles | |
A drill guide is provided to get the axle holes in the right places on the spool. | |
Axles are provided using tbuser's Pin Connectors V2 library https://www.thingiverse.com/thing:10541 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$fn = 50; | |
color("yellow") rotate(90-$t*360/15) gear(4, 10); | |
module gear(teeth, step, height=8) { | |
angle = 360/(teeth*2); | |
radius = (step/2) / sin(angle/2); | |
apothem = (step/2) / tan(angle/2); | |
module circles() { | |
for (i = [1:teeth]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lose = 0; | |
var win = 0; | |
var total = 0; | |
while (true) | |
{ | |
Console.WriteLine("Heads (0) or Tails (1)"); | |
var user = Console.ReadLine(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Spool parts storage organizer | |
Based on https://www.thingiverse.com/thing:2793548 by hirez99 | |
Frank van der Hulst [email protected] | |
24 Feb 2018 | |
This generates a drawer that can be fitted into an empty filament spool to | |
provide storage for small parts. | |
Holes need to be drilled in the sides of the spool for axles | |
A drill guide is provided to get the axle holes in the right places on the spool. | |
Axles are provided using tbuser's Pin Connectors V2 library https://www.thingiverse.com/thing:10541 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <FastLED.h> | |
#define DATA_PIN 1 | |
#define LED_TYPE WS2812 | |
#define COLOR_ORDER GRB | |
#define NUM_LEDS 16 | |
CRGB leds[NUM_LEDS]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mgos.h" | |
#include "mgos_mqtt.h" | |
static void led_timer_cb(void *arg) { | |
bool val = mgos_gpio_toggle(mgos_sys_config_get_pins_led()); | |
LOG(LL_INFO, ("%s uptime: %.2lf, RAM: %lu, %lu free", val ? "Tick" : "Tock", | |
mgos_uptime(), (unsigned long) mgos_get_heap_size(), | |
(unsigned long) mgos_get_free_heap_size())); | |
(void) arg; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$buildFolder) | |
$jVUNDemo = "$($buildFolder)\jVUNDemo" | |
$staticSiteParentPath = (get-item $buildFolder).Parent.FullName | |
$staticSite = "static-site" | |
$staticSitePath = "$($staticSiteParentPath)\$($staticSite)" | |
$wgetLogPath = "get.log" | |
$port = 60345 | |
$servedAt = "http://localhost:$($port)/" | |
write-host "jVUNDemo location: $jVUNDemo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PrintPos | |
{ | |
[DllImport("kernel32", SetLastError = true)] | |
public static extern IntPtr CreateFile(string lpFileName, Int32 dwDesiredAccess, Int32 dwShareMode, IntPtr lpSecurityAttributes, Int32 dwCreationDisposition, Int32 dwFlagsAndAttributes, IntPtr hTemplateFile); | |
public const Int32 FILE_ATTRIBUTE_NORMAL = 128;//Intializing Port Attributes | |
public const Int32 INVALID_HANDLE_VALUE = -1; | |
public const Int32 GENERIC_READ = -2147483648; | |
public const Int32 GENERIC_WRITE = 1073741824; | |
public const Int32 CREATE_NEW = 1; |