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("advancedLua") | |
| local component = require("component") | |
| local computer = require("computer") | |
| local keyboard = require("keyboard") | |
| local filesystem = require("filesystem") | |
| local unicode = require("unicode") | |
| local event = require("event") | |
| local color = require("color") | |
| --local image = require("image") | |
| local buffer = require("doubleBuffering") |
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
| op = component.openprinter | |
| if not op then | |
| error("No open printer found") | |
| end | |
| function pg(title) | |
| op.setTitle(title) | |
| print("next page") | |
| op.print() | |
| 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
| public abstract class BaseOverlay : MonoBehaviour | |
| { | |
| public bool IsActive => gameObject.activeSelf; | |
| public virtual void Show() | |
| { | |
| gameObject.SetActive(true); | |
| } | |
| public virtual void Hide() |
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
| using System; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public static class ListExtensions | |
| { | |
| public static T GetRandom<T>(this IList<T> list, bool ignoreEmpty = true) | |
| { | |
| if (list == null || list.Count == 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
| # Small script that converts one track of midi to Scrap Computers HDD array. | |
| import mido | |
| import json | |
| mid = mido.MidiFile('bad_apple.mid') | |
| converted = [] | |
| for msg in mid.tracks[0]: | |
| if not msg.is_meta and msg.type in ('note_on', 'note_off'): |