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
| // Example derived from: https://eclipsesource.com/blogs/2015/06/06/registering-java-callbacks-with-j2v8/ | |
| // J2V8 is available at Maven Central: https://search.maven.org/search?q=g:com.eclipsesource.j2v8 | |
| // Compile: | |
| // javac -cp j2v8_linux_x86_64-4.8.0.jar V8Example.java | |
| // Run: | |
| // java -cp ".:j2v8_linux_x86_64-4.8.0.jar" V8Example | |
| import com.eclipsesource.v8.JavaVoidCallback; |
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
| $version = "1.18" | |
| $mc = "$env:APPDATA\.minecraft" | |
| $jsonFile = "$mc\assets\indexes\$version.json" | |
| $json = (Get-Content $jsonFile) -Join " " | |
| $data = ConvertFrom-Json $json | |
| $data.objects | Get-Member -MemberType NoteProperty | ForEach-Object { | |
| $path = $_.Name | |
| $hash = $data.objects."$path".hash |
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>Bouncing ball in box</title> | |
| <meta charset="UTF-8"/> | |
| <link rel="stylesheet" href="styles.css"/> | |
| </head> | |
| <body> | |
| <div class="meta-container"> | |
| <div class="canvas-container"> |
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) { |
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
| #$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
| // 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
| 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
| #!/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
| #!/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) |
OlderNewer