Skip to content

Instantly share code, notes, and snippets.

@hdemon
hdemon / yukari.rb
Created June 25, 2013 14:15
yukari automation
# encoding: shift_jis
require 'Win32API'
require 'win32ole'
SW_HIDE = 0 #ウィンドウを隠して他のウィンドウにフォーカス
SW_SHOWNORMAL = 1 #通常サイズで表示しフォーカスをあたえる
SW_SHOWMINIMIZED = 2 #最小化状態で表示しフォーカスをあたえる
SW_SHOWMAXIMIZED = 3 #最大化状態で表示しフォーカスをあたえる
SW_SHOWNOACTIVATE = 4 #通常サイズで表示するがフォーカスはなし
SW_SHOW = 5 #通常サイズで表示しフォーカスをあたえる
@shime
shime / README.md
Last active June 12, 2024 05:43
The Qlobe - by Yusuke Endoh

Qlobe

Qlobe is a fascinating example of quine in Ruby, submitted by a member of the Ruby core team - Yusuke Endoh.

Programs that output changed executable versions of themselves while managing to spin the globe and still remaining executable are cool, right?

To experience its magic, run the following

curl -fSSl https://gist.githubusercontent.com/shime/f0ebe84ca42c33b51d42/raw/5e74315dc6b6fe572f8a457536ad7eb17ad3f1e4/qlobe.rb > qlobe.rb; while true; do ruby qlobe.rb | tee temp.rb; sleep 1; mv -f temp.rb qlobe.rb; done
# MASTER
ufw allow 6443/tcp
ufw allow 2379:2380/tcp
ufw allow 10250/tcp
ufw allow 10251/tcp
ufw allow 10252/tcp
ufw allow 10255/tcp
# WORKER