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 wezterm = require("wezterm") | |
------------------------------------------------------------------------------------------------------------------------ | |
-- Constants and helpers | |
------------------------------------------------------------------------------------------------------------------------ | |
local FONT_FAMILY = wezterm.font("Spleen 32x64") | |
local FONT_SIZE = 16 | |
local CHAR_SOLID_LEFT = wezterm.nerdfonts.pl_right_hard_divider | |
local COLOR_BACKGROUND = "#2e3440" |
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
# SPDX-License-Identifier: GPL-2.0 | |
# | |
# clang-format configuration file. Intended for clang-format >= 4. | |
# | |
# For more information, see: | |
# | |
# Documentation/process/clang-format.rst | |
# https://clang.llvm.org/docs/ClangFormat.html | |
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html | |
# |
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 mc --wraps=mc | |
set -l f (mktemp) | |
if set -q f[1] | |
env SHELL=/bin/bash mc -P "$f" $argv | |
if test -r "$f" | |
set -l d (cat "$f") | |
if test -n "$d"; and test -d "$d"; and test "$d" != "$PWD" | |
builtin cd "$d" |
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 'victor' | |
svg = Victor::SVG.new width: 140, height: 100, style: { background: '#ddd' } | |
svg.build do | |
rect x: 10, y: 10, width: 120, height: 80, rx: 10, fill: '#666' | |
circle cx: 50, cy: 50, r: 30, fill: 'yellow' | |
circle cx: 58, cy: 32, r: 4, fill: 'black' | |
polygon points: %w[45,50 80,30 80,70], fill: '#666' |
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 | |
# TOO UGLY! | |
# | |
# Offline MDN SVG: https://frankfurt.kapeli.com/feeds/zzz/mdn/SVG.tgz | |
ELEMENTS = %w[ | |
a | |
animate | |
animateMotion |
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
# frozen_string_literal: true | |
module Mahjong | |
module SVG | |
Dim = Data.define(:width, :height, :unit) do | |
def initialize(width:, height:, unit: "mm") = super(width: Float(width), height: Float(height), unit:) | |
def shortest = deconstruct.min | |
def longest = deconstruct.max | |
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 'open-uri' | |
require 'json' | |
content = URI("https://fluxometer.com/rainbow/json/files.json").read | |
content.delete_prefix!("files(") | |
content.delete_suffix!(")") | |
data =JSON.parse(content) | |
puts data.first |
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
# frozen_string_literal: true | |
module Checkmark | |
class Template | |
def self.[](modul, &block) | |
Class.new(self, &block).tap { _1.extend(Registerable[modul]) } | |
end | |
# attr_reader :type, :layout, :dir |
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
# frozen_string_literal: true | |
require 'delegate' | |
class Deck < DelegateClass(::Hash) | |
attr_reader :choosen | |
def initialize(choosen = nil, **initial) | |
super(initial) |