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
| #!/bin/bash | |
| ### NOTE ### You probably don't need this anymore! | |
| # Just set RUST_BACKTRACE=1 | |
| # Usage: rust-backtrace ./my-rust-prog args... | |
| exec gdb -batch -n -x /dev/fd/3 --args "$@" 3<<ENDGDB | |
| set height 0 | |
| set breakpoint pending on |
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 mido | |
| import socket | |
| UDP_ADDRESS = "xmastree.local" | |
| UDP_PORT = 21324 | |
| NUM_LEDS = 150 | |
| COLORS = [ | |
| [255, 0, 0], | |
| [ 0, 255, 0], |
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
| #![crate_type="dylib"] | |
| #![feature(plugin_registrar)] | |
| extern crate libc; | |
| extern crate syntax; | |
| extern crate rustc; | |
| extern crate "rustc_llvm" as llvm; | |
| use libc::{c_uint, uint64_t}; | |
| use syntax::ast; |
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
| #!/bin/bash -xe | |
| m68k-unknown-elf-gcc -o demo demo.s -nostdlib | |
| m68k-unknown-elf-objcopy -O binary demo floppy.img |
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 python3 | |
| import sys | |
| temps = sys.argv[1:] | |
| for ln in sys.stdin: | |
| if ln.rstrip() == 'M600': | |
| sys.stdout.write('M104 S' + temps.pop(0) + '\n') | |
| else: | |
| sys.stdout.write(ln) |
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 python3 | |
| import random | |
| from colormath.color_objects import LabColor, sRGBColor | |
| from colormath.color_conversions import convert_color | |
| from colormath.color_diff import delta_e_cie2000 | |
| print("<style>body { font-size: 24pt; font-family: monospace; }</style>"); | |
| def random_srgb(): | |
| return sRGBColor( |
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 python3 | |
| import sys | |
| temps = sys.argv[1:] | |
| for ln in sys.stdin: | |
| if ln.rstrip() == 'M600': | |
| sys.stdout.write('M104 S' + temps.pop(0) + '\n') | |
| else: | |
| sys.stdout.write(ln) |
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
| // Copyright 2021 Keegan McAllister | |
| // License: CC-BY 4.0 | |
| // https://creativecommons.org/licenses/by/4.0/ | |
| include <MCAD/units.scad> | |
| /* [Part selection] */ | |
| // Part selection | |
| part = "assembly"; // [assembly, plate, grid, rail, base] |
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 python | |
| import itertools | |
| import colorsys | |
| import datetime | |
| import irc.bot | |
| import random | |
| import socket | |
| import struct | |
| import sys | |
| import re |
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 menger_sponge(n) { | |
| if (n <= 0) { | |
| cube(center=true); | |
| } else { | |
| for (x=[-1:1]) { | |
| for (y=[-1:1]) { | |
| for (z=[-1:1]) { | |
| if (abs(x)+abs(y)+abs(z) >= 2) { | |
| scale(1/3) | |
| translate([x,y,z]) |
NewerOlder