😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 😗 😙 😚
This file contains 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
ruby -e'_,__="",binding;loop do$><<">> "if$/>_ | |
puts"=> %p"%[__.eval(_+=gets||exit!),_=""] | |
rescue Exception | |
puts"\e[31m%p\e[0m"%[$!,_=""]if/d e|ee/!~"#$!"end' |
See character.construction/emoji-vs-text for more up-to-date listings.
Text (U+FE0E) | Default | Emoji (U+FE0F) | Name |
---|---|---|---|
😀︎ | 😀 | 😀️ | GRINNING FACE |
😁︎ | 😁 | 😁️ | GRINNING FACE WITH SMILING EYES |
😂︎ | 😂 | 😂️ | FACE WITH TEARS OF JOY |
🤣︎ | 🤣 | 🤣️ | ROLLING ON THE FLOOR LAUGHING |
Please note: See character.construction/emoji-categories for more up-to-date listings.
😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 🥰 😗 😙 😚
This file contains 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 'irbtools/configure' | |
# require 'irbtools/more' | |
Irbtools.replace_library_callback :fancy_irb do | |
FancyIrb.start rocket_mode: false | |
end | |
Irbtools.start |
This file contains 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 "stringio" | |
def capture_stdout | |
capture = StringIO.new | |
restore, $stdout = $stdout, capture | |
yield | |
$stdout = restore | |
capture.string | |
end |
This file contains 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
#!/bin/sh | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "\033[31;1mWorking directory needs to be clean\033[0m"; | |
exit 1 | |
else | |
git checkout production && | |
git rebase develop && | |
npm run build && | |
git add -f dist && |
Benchmark Code: https://github.com/janlelis/paint/blob/main/benchmark.rb
# TERMINAL ANSI COLORS BENCHMARK
ruby: 3.1.2
paint: 2.3.0
rainbow: 3.1.1
term/ansicolor 1.7.1
pastel 0.8.0
This file contains 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 "benchmark/ips" | |
puts RUBY_DESCRIPTION | |
class Inherit < Struct.new(:id, :name, :age) | |
def name_and_age | |
"#{name}, #{age}" | |
end | |
end |
This file contains 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
From 4787399d0ffc0c8e01747713e8da91de2257bcf5 Mon Sep 17 00:00:00 2001 | |
From: Jan Lelis <mail@janlelis.de> | |
Date: Tue, 28 Apr 2015 18:52:53 +0200 | |
Subject: [PATCH] activate goto in ruby | |
--- | |
vm_opts.h | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
diff --git a/vm_opts.h b/vm_opts.h |
NewerOlder