M301 P23.35 I1.56 D87.6 ; set PID
G28 ; home all axes
M205 X8 ; Reduce jerk
M201 X800 Y800 ; Reduce maximum acceleration
G1 Z5 F5000 ; lift nozzle
This file contains hidden or 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
| let requestedWidth = Slider("Width", 100, 10, 300, true, 1, 0) | |
| let requestedDepth = Slider("Depth", 50, 5, 300, true, 1, 0) | |
| let requestedHeight = Slider("Height", 20, 11, 100, true, 1, 0) | |
| let rows = Slider("Rows", 2, 1, 20, true, 1, 0) | |
| let columns = Slider("Columns", 5, 1, 20, true, 1, 0) | |
| let outsideRadius = Slider("Radius", 10, 2, 40, true, 1, 0) | |
| let latches = Slider("Latches", 1, 1, 3, true, 1, 0) | |
| let hingeStyle = Dropdown("Hinge type", "pin", {Pin: "pin", Detent: "cone"}, true) |
This file contains hidden or 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
| require 'socket' | |
| SOCKET_FILE = './.bot_socket' | |
| $stdout.sync = true | |
| File.delete(SOCKET_FILE) if File.exist?(SOCKET_FILE) | |
| server = UNIXServer.open(SOCKET_FILE) | |
| bot_connection = server.accept | |
| OUTPUT_DESTINATIONS = { |
This file contains hidden or 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
| # Keep a series of backups of Tabletop Simulator's autosave files in an autosave directory | |
| # The most recent 5 will keep the .json file extenion, and any older than that | |
| # will use .bak, so that Tabletop Simulator will not try to process them. | |
| # Update with the path to your save directory | |
| $sourceDir = "C:\Path\To\Documents\My Games\Tabletop Simulator\Saves" | |
| $destinationDir = $sourceDir + "\Autosave" | |
| # The total number of rotated backups to keep. |
This file contains hidden or 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
| module Life; end | |
| class Life::DeadWorldException < Exception; end | |
| module Depth | |
| def self.color(depth, str) | |
| color = 255 - (depth * 22).floor | |
| "\033[38;5;#{color}m#{str}\033[0m" | |
| end |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| require 'bigdecimal' | |
| def pseudo_science(num) | |
| decimal = BigDecimal(num) | |
| # Split incoming number into component parts | |
| sign, significant_digits, base, exponent = decimal.split | |
| # strip trailing decimal zeroes from input |
This file contains hidden or 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
| function truncate_lines(str, lines, width, font, suffix) | |
| if not width or lines == 1 then return string end | |
| lines = lines or 1 | |
| font = font or love.graphics.getFont() | |
| suffix = suffix or '...' | |
| local suff_len = #suffix | |
| while select(2, font:getWrap(str, width)) > lines and str ~= suffix do | |
| str = str:sub(1, - (suff_len + 2)) .. suffix |
This file contains hidden or 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
| import socket | |
| import struct | |
| import os | |
| # Create UDP socket. | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| # Bind to LFS. | |
| sock.bind(('127.0.0.1', 20777)) | |
This file contains hidden or 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 $b = $('#box'); | |
| new MutationObserver(function() { | |
| setTimeout(function() { | |
| $b.find('span').filter(function(i,s) { return $(s).data('type') == 'a' }).click(); | |
| }) | |
| }).observe($b.get(0), {childList: true}); | |
| $('.btn-restart, .play-btn').click(); |
This file contains hidden or 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
| source 'https://rubygems.org' | |
| ruby '1.9.3' | |
| gem 'padrino', '~> 0.11.4' | |
| gem "mongoid_geospatial", "~> 2.8.2" |
NewerOlder