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
| # Flash the image onto a USB stick. | |
| # - Replace `/path/to/xubuntu.iso` with the appropriate ISO image. | |
| # - Replace `sdX` with the appropriate device node. | |
| sudo dd if=/path/to/xubuntu.iso of=/dev/sdX conv=fdatasync status=progress bs=1M | |
| # Boot into the USB stick and run the installer. | |
| # You might need to boot into the PC's UEFI settings to do so. | |
| # Make sure the install medium is botted in UEFI mode! | |
| # On the new installation, run the following installers. |
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 bash | |
| # https://shkspr.mobi/blog/2016/04/generating-random-chiptunes-on-linux/ | |
| notes="-7,-6,-5,-2,0,3,5,6,7,10,12" | |
| #notes="-7,-5,-3,0,2,5,7,9,12" | |
| format=S32_LE | |
| rate=24000 | |
| numChannels=2 |
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 | |
| # Python 3.9+ | |
| from enum import Enum | |
| from io import BufferedReader | |
| import sys | |
| from typing import Dict, List, Tuple | |
| EVENT_NOTE_OFF = 0x80 |
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 | |
| require "json" | |
| require "fileutils" | |
| my_cards = nil | |
| source_folder = "json" | |
| source_file_name = "#{source_folder}/my_cards.json" | |
| File.open(source_file_name) { |file| | |
| my_cards = JSON.parse(file.read) |
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 ocaml | |
| #load "graphics.cma" | |
| #load "unix.cma" | |
| open Graphics | |
| open Printf | |
| open Sys | |
| open Unix | |
| let display: string = getenv "DISPLAY" |
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
| class CanvasApplication { | |
| constructor(canvas) { | |
| this._canvas = canvas; | |
| this._graphics = canvas.getContext('2d'); | |
| this._timer = new AnimationTimer( | |
| this._onTick.bind(this), | |
| CanvasApplication._INTERVAL | |
| ); | |
| this._inputHandler = new InputHandler(); | |
| } |
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
| // Cloned from: https://raw.githubusercontent.com/bahamas10/css-color-names/master/css-color-names.json | |
| const CSS_COLORS = { | |
| "aliceblue": "#f0f8ff", | |
| "antiquewhite": "#faebd7", | |
| "aqua": "#00ffff", | |
| "aquamarine": "#7fffd4", | |
| "azure": "#f0ffff", | |
| "beige": "#f5f5dc", | |
| "bisque": "#ffe4c4", |
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
| #$HOME\Documents\WindowsPowerShell\ | |
| $esc = [char]27 | |
| $red = "$esc[1;31m" | |
| $green = "$esc[1;32m" | |
| $yellow = "$esc[1;33m" | |
| $blue = "$esc[1;34m" | |
| $magenta = "$esc[1;35m" | |
| $cyan = "$esc[1;36m" | |
| $default = "$esc[1;39m" |
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
| <!DOCTYPE html> | |
| <html lang="en-US"> | |
| <head> | |
| <title>Unicode Text Transformer</title> | |
| <meta charset="UTF-8"/> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
| <meta name="theme-color" content="#000000"/> | |
| <style> | |
| * { | |
| box-sizing: border-box; |
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 degToRad(degrees) { | |
| return Math.PI * degrees / 180.0; | |
| } | |
| function radToDeg(radians) { | |
| return 180.0 * radians / Math.PI; | |
| } | |
| class Complex { | |
| constructor(r, i) { |
NewerOlder