Skip to content

Instantly share code, notes, and snippets.

@janlelis
janlelis / irb.rb
Last active April 8, 2024 09:21
Minimal Ruby REPL
ruby -e'_,__="",binding;loop do$><<">> "if$/>_
puts"=> %p"%[__.eval(_+=gets||exit!),_=""]
rescue Exception
puts"\e[31m%p\e[0m"%[$!,_=""]if/d e|ee/!~"#$!"end'

😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 😗 😙 😚 ☺️ 🙂 🤗 🤩 🤔 🤨 😐 😑 😶 🙄 😏 😣 😥 😮 🤐 😯 😪 😫 😴 😌 😛 😜 😝 🤤 😒 😓 😔 😕 🙃 🤑 😲 ☹️ 🙁 😖 😞 😟 😤 😢 😭 😦 😧 😨 😩 🤯 😬 😰 😱 😳 🤪 😵 😡 😠 🤬 😷 🤒 🤕 🤢 🤮 🤧 😇 🤠 🤡 🤥 🤫 🤭 🧐 🤓 😈 👿 👹 👺 💀 ☠️ 👻 👽 👾 🤖 💩 😺 😸 😹 😻 😼 😽 🙀 😿 😾 🙈 🙉 🙊 👶 👶🏻 👶🏼 👶🏽 👶🏾 👶🏿 🧒 🧒🏻 🧒🏼 🧒🏽 🧒🏾 🧒🏿 👦 👦🏻 👦🏼 👦🏽 👦🏾 👦🏿 👧 👧🏻 👧🏼 👧🏽 👧🏾 👧🏿 🧑 🧑🏻 🧑🏼 🧑🏽 🧑🏾 🧑🏿 👨 👨🏻 👨🏼 👨🏽 👨🏾 👨🏿 👩 👩🏻 👩🏼 👩🏽 👩🏾 👩🏿 🧓 🧓🏻 🧓🏼 🧓🏽 🧓🏾 🧓🏿 👴 👴🏻 👴🏼 👴🏽 👴🏾 👴🏿 👵 👵🏻 👵🏼 👵🏽 👵🏾 👵🏿 👨‍⚕️ 👨🏻‍⚕️ 👨🏼‍⚕️ 👨🏽‍⚕️ 👨🏾‍⚕️ 👨🏿‍⚕️ 👩‍⚕️ 👩🏻‍⚕️ 👩🏼‍⚕️ 👩🏽‍⚕️ 👩🏾‍⚕️ 👩🏿‍⚕️ 👨‍🎓 👨🏻‍🎓 👨🏼‍🎓 👨🏽‍🎓 👨🏾‍🎓 👨🏿‍🎓 👩‍🎓 👩🏻‍🎓 👩🏼‍🎓 👩🏽‍🎓 👩🏾‍🎓 👩🏿‍🎓 👨‍🏫 👨🏻‍🏫 👨🏼‍🏫 👨🏽‍🏫 👨🏾‍🏫 👨🏿‍🏫 👩‍🏫 👩🏻‍🏫 👩🏼‍🏫 👩🏽‍🏫 👩🏾‍🏫 👩🏿‍🏫 👨‍⚖️ 👨🏻‍⚖️ 👨🏼‍⚖️ 👨🏽‍⚖️ 👨🏾‍⚖️ 👨🏿‍⚖️ 👩‍⚖️ 👩🏻‍⚖️ 👩🏼‍⚖️ 👩🏽‍⚖️ 👩🏾‍⚖️ 👩🏿‍⚖️ 👨‍🌾 👨🏻‍🌾 👨🏼‍🌾 👨🏽‍🌾 👨🏾‍🌾 👨🏿‍🌾 👩‍🌾 👩🏻‍🌾 👩🏼‍🌾 👩🏽‍🌾 👩🏾‍🌾 👩🏿‍🌾 👨‍🍳 👨🏻‍🍳 👨🏼‍🍳 👨🏽‍🍳 👨🏾‍🍳 👨🏿‍🍳 👩‍🍳 👩🏻‍🍳 👩🏼‍🍳 👩🏽‍🍳 👩🏾‍🍳 👩🏿‍🍳 👨‍🔧 👨🏻‍🔧 👨🏼‍🔧 👨🏽‍🔧 👨🏾‍🔧 👨🏿‍🔧 👩‍🔧 👩🏻‍🔧 👩🏼‍🔧 👩🏽‍🔧 👩🏾‍🔧 👩🏿‍🔧 👨‍🏭 👨🏻‍🏭 👨🏼‍🏭 👨🏽‍🏭 👨🏾‍🏭 👨🏿‍🏭 👩‍🏭 👩🏻‍🏭 👩🏼‍🏭 👩🏽‍🏭 👩🏾‍🏭 👩🏿‍🏭 👨‍💼 👨🏻‍💼 👨🏼‍💼 👨🏽‍💼 👨🏾‍💼 👨🏿‍💼 👩‍💼 👩🏻‍💼 👩🏼‍💼 👩🏽‍💼 👩🏾‍💼 👩🏿‍💼 👨‍🔬 👨🏻‍🔬 👨🏼‍🔬 👨🏽‍🔬 👨🏾‍🔬 👨🏿‍🔬 👩‍🔬 👩🏻‍🔬 👩🏼‍🔬 👩🏽‍🔬 👩🏾‍🔬 👩🏿‍🔬 👨‍💻 👨🏻‍💻 👨🏼‍💻 👨🏽‍💻 👨🏾‍💻 👨🏿‍💻 👩‍💻

@janlelis
janlelis / emoji-variations.md
Last active March 5, 2019 11:01
Emoji Variations and Names

See character.construction/emoji-vs-text for more up-to-date listings.

Emoji Variations and Names (Emoji 11.0 / Unicode 11.0.0)

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
@janlelis
janlelis / emoji.md
Last active May 24, 2024 17:01
List of 11.0 Emoji (compiled from emoji-test.txt)

Please note: See character.construction/emoji-categories for more up-to-date listings.

Emoji 11.0

Smileys & People

face-positive

😀 😁 😂 🤣 😃 😄 😅 😆 😉 😊 😋 😎 😍 😘 🥰 😗 😙 😚 ☺️ 🙂 🤗 🤩

@janlelis
janlelis / .irbrc
Last active November 7, 2016 22:48
irbtools without # => rocket
require 'irbtools/configure'
# require 'irbtools/more'
Irbtools.replace_library_callback :fancy_irb do
FancyIrb.start rocket_mode: false
end
Irbtools.start
require "stringio"
def capture_stdout
capture = StringIO.new
restore, $stdout = $stdout, capture
yield
$stdout = restore
capture.string
end
#!/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 &&
@janlelis
janlelis / terminal-ansi-colors-benchmark.md
Last active January 9, 2024 11:12
Terminal Colors Benchmark: paint, rainbow, term/ansicolor, pastel, ansi, hansi
require "benchmark/ips"
puts RUBY_DESCRIPTION
class Inherit < Struct.new(:id, :name, :age)
def name_and_age
"#{name}, #{age}"
end
end
@janlelis
janlelis / goto.patch
Created April 28, 2015 16:55
rvm install 2.2.2 -n goto --patch http://git.io/vfxF2
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