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
// 末尾に使用例 | |
// 好きに改造して使ってください | |
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
using namespace std; |
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
C = File.read(__FILE__).split('__CODE__').last.lines.drop(1).grep(/^[^#]/).join.split | |
# puts C.join.size+3+11+9+15+13+1 | |
def at_exit;end | |
def sleep(n=nil);end | |
def $>.<< s | |
STDOUT.write s | |
cc = nil | |
s.gsub! "\e[1;1H", '' | |
Object.new.instance_eval s.gsub('C', 'cc') | |
File.write 'output.rb', s.lines.map(&:rstrip).join("\n") if cc.join =~ /t=96/ |
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
a=->x{x.unpack('m')[0]};C=a.call %(############################################################################################################################# | |
RD1bMTE3MzE1MDAyNDQ4NSwyODY1MzY0NTQyNzU3LDM5NjQ5MTAyNDg3NDMsMjgzOTU5NjMxMTg0NSwyODM5NTk1NzYyOTgxXQpFPVsyNTUsNjYsMjU1LDY2LDY2LDY2LDY2XQpGPVs2Myw5OSwxNDksMjY1LDc2 | |
MSwxMTkzLDMyNjksMjk0OSwyNDk5LDI2MTEsMzA4Nyw0MDk1XQpHPSVcICAuLi4sLCxYYGAuLi4sLCxYYGB+LS0tOztYJ35+LTo6OztYXn5+Ojo7KChYIn5+ISF8KV1YIiIhISEhIXtYIioqKjw8PE1cLnNwbGl0 | |
KCdYJykKZGVmIGFhYiBhYWMseCx5CiAgeD49MCAmJiB5Pj0wICYmICgoYWFjW3ldfHwwKT4+eCkmMT09MQplbmQKSD1bQ10ucGFjaygnbScpLmRlbGV0ZSgiXG4iKQpAX3Q9QHQ9MApsb29wIGRvCiAgdyxoPTE2 | |
MCw4MAogIEBfdCs9MC4wMQogIEB0PUBfdCUxCiAgYWFkPSgxLi5oKS5tYXB 7KDEu LncpL m1hc HsxfX 0KICB hYWU 9LT4oYWFjLGN4LGN5LGFhZixhYWc9YWFmLGFhaDogMC4xLGFhaTogZmFsc2 | |
UpewogICAgY3csY2g9YWFjLm1heC5iaXRfbGVuZ3RoLGFhYy5zaXplCiA g I C A oW2N4LWFhZi8yLDBdLm1heC5yb3VuZC4uW2N4K2FhZi8yLHctMV0ubWlu | |
LnJvdW5kKS5lYWNoIGRvIHx4fAogICAgICAoW2N5LWFhZy8yLDBdLm1 |
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 'cucumber' | |
require 'selenium-webdriver' | |
# require 'cukehub' # optional, but recommended. See cukehub.com for more details | |
caps = Selenium::WebDriver::Remote::Capabilities.chrome(chromeOptions: { binary: "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary", | |
args: [ "--headless" ]}) | |
Before do | |
@browser = Selenium::WebDriver.for :chrome, desired_capabilities: caps | |
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
s=%w(ABCDEFGHIJKMNOQRSUWXYZ0123456789 "`^' acegmnopqrsuwxyz)######################################## | |
b='';d=->c{(w=s.find{|a|a[c]})&&(b+=(w.size+w.index(c)).to_s(2)[1..-1])};%(######################### | |
B^"`^^```^""NB^"`^^```^""NBS4K2DANGSGDJXANGWGDJDBYUS4I2OENGWGDJD""'`"^"'""'J"`^"`^^`"`^DJ"`^"`^^`"`^ | |
D mqwgmqwa anawoqom NOGGS24NNUZ6YX1BJAWC2IUKE21CCKJFFYZWQM wsereues Z pnaxmxex aomoeooo | |
C 3MDN7SQJ 2BCEA37Q IBEG24XQOOX082HI6X0QZ51B7HW8WUIE7JYQZ4 ME7JSE6W M RO7GG835 N77U0Y5W | |
F BDZ6UK1K OMZGQU5K O5WSFIME7JYGE34HOJ1Q525RO7SQ54HD2RGKFI UJE6XYJ4 D Q6FDEMXX KNM0GWW9 | |
M 6YH4448A 2YH4Z24R Y3UY9MDM27Y0G3IRYXUY9JDM27Y0G3IRZBZ60U 8O6YH4J4 8 OYDDYZS4 A27FNGSG | |
D `"""'"` xa "'"'"'" 1JIRYUZ65M7E7QWS13IRYZSE1SCMI9G8KCDM3Xg ``""``" 9 ``^^'`` en `^`"^^` | |
7F NQSGcsooosasp444WQ3FHY7U4A2OH443IRY3Z6DU4C7FZ0Y5HHI3U0 S21 RZOY G | |
B xuwpxew "8H3IN27BQW45KOXXY04DA71U8W4RD6YA8GWRM2FE0D5KA27FNW^ psaycsa Y roryxma '" pmswrmz |
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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
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 'io/console' | |
# Reads keypresses from the user including 2 and 3 escape character sequences. | |
def read_char | |
STDIN.echo = false | |
STDIN.raw! | |
input = STDIN.getc.chr | |
if input == "\e" then | |
input << STDIN.read_nonblock(3) rescue nil |
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
$! raise された例外オブジェクト | |
$" require で読み込まれたファイルの配列 | |
$# | |
$$ 現在のプロセス ID | |
$% | |
$& 正規表現にマッチした箇所の文字列 | |
$' 正規表現にマッチした箇所より後ろの文字列 | |
$( | |
$) | |
$* Ruby スクリプトに指定された引数。ARGV と同じ |
YARD CHEATSHEET http://yardoc.org
May 2020 - updated fork: https://gist.github.com/phansch/db18a595d2f5f1ef16646af72fe1fb0e
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
NewerOlder