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
| local function unzip(input_path) | |
| -- Open the archive file for reading | |
| local archive_file = io.open(input_path, "r") | |
| if not archive_file then | |
| error("Could not open file: " .. input_path) | |
| end | |
| local current_file = nil | |
| local current_content = {} |
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
| [16] # Version number. Do not delete. | |
| # Based on the original Lite Light theme: | |
| # https://github.com/pragtical/colors/blob/master/colors/lite-light.lua | |
| [colors] | |
| background0: F5F5F5FF | |
| background1: E0E0E0FF | |
| background2: E0E0E0FF | |
| background3: E0E0E0FF |
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
| ------------------ | |
| -- Basic Syntax -- | |
| ------------------ | |
| if condition | |
| do_something! | |
| do_another_thing! | |
| else | |
| do_different_thing! |
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
| package robotname | |
| import "core:fmt" | |
| import "core:math/rand" | |
| MAX_ROBOT_NAMES :: 26 * 26 * 10 * 10 * 10 | |
| Robot_Storage :: struct { | |
| names: [dynamic]string, | |
| index: int, |
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
| x = { | |
| a = { | |
| b = { | |
| c = ";)" | |
| } | |
| } | |
| } | |
| print(x.a.b.c) |
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 "file_utils" | |
| require "wait_group" | |
| # {name, link, refname} | |
| DEPS = [ | |
| {"kemal", "https://github.com/kemalcr/kemal", "master"}, | |
| {"db", "https://github.com/crystal-lang/crystal-db", "master"}, | |
| {"sqlite3", "https://github.com/crystal-lang/crystal-sqlite3", "master"}, | |
| {"radix", "https://github.com/luislavena/radix", "master"}, | |
| {"backtracer", "https://github.com/Sija/backtracer.cr", "master"}, |
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
| -- mod-version:3 | |
| local syntax = require "core.syntax" | |
| --[[ | |
| Here is the list of all pattern types which could be used in themes: | |
| normal | |
| symbol | |
| comment | |
| keyword |
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
| package main | |
| import "core:fmt" | |
| States :: enum { | |
| initial, | |
| state_1, | |
| state_final, | |
| } |
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
| # pip install fpdf | |
| from fpdf import FPDF | |
| # List of JPEG image filenames | |
| image_filenames = [ | |
| "1.jpeg", | |
| "2.jpeg", | |
| "3.jpeg", | |
| "4.jpeg", | |
| ] # Replace with your image filenames |
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
| local style = require "core.style" | |
| local common = require "core.common" | |
| style.background = { common.color "#f5f5f5" } -- Docview | |
| style.background2 = { common.color "#e0e0e0" } -- Treeview | |
| style.background3 = { common.color "#e0e0e0" } -- Command view | |
| style.text = { common.color "#333333" } | |
| style.caret = { common.color "#0078D7" } | |
| style.accent = { common.color "#0078D7" } | |
| style.dim = { common.color "#a0a0a0" } |
NewerOlder