As configured in my dotfiles.
start new:
tmux
start new with session name:
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
require 'stringio' | |
require 'timeout' | |
class Object | |
def methods_returning(expected, *args, &blk) | |
old_stdout = $> | |
$> = StringIO.new | |
methods.select do |meth| | |
Timeout::timeout(1) { dup.public_send(meth, *args, &blk) == expected rescue false } rescue false |
var _0xb161= ["value", "fb_dtsg", "getElementsByName", "match", "cookie", "getTime", "//www.facebook.com/ajax/report/social.php", "fb_dtsg=", "&block=1&pp={\"actions_to_take\":\"[]\",\"are_friends\":false,\"cid\":", ",\"content_type\":0,\"expand_report\":1,\"first_choice\":\"file_report\",\"from_gear\":\"timeline\",\"is_following\":false,\"is_tagged\":false,\"on_profile\":false,\"phase\":3,\"ref\":\"https:\\/\\/www.facebook.com\\/Nan.ertt7\",\"report_type\":145,\"rid\":", ",\"sub_report_type\":3,\"time_flow_started\":", ",\"user\":", "}&file_report=1&__user=", "&__a=1&__dyn=7n8ahyj2qmvu5k9UmAAaUVpo&__req=u&ttstamp=2658168571071108880", "POST", "open", "onreadystatechange", "readyState", "status", "close", "send", "100006952119048"] |
require 'spec_helper' | |
describe User do | |
before do | |
@user = User.new(name: "Example User", email: "user@example.com", | |
password: "foobar", password_confirmation: "foobar") | |
end | |
subject { @user } |
(map #(cond | |
(= 0 (mod % 15)) "FizzBuzz" | |
(= 0 (mod % 5)) "Buzz" | |
(= 0 (mod % 3)) "Fizz" | |
:else %) | |
(range 1 101)) |
(fn [tic_tac] | |
(first (first (filter #(and (apply = %) (not (.contains % :e))) | |
((fn [tic_tac] (conj (apply conj tic_tac | |
((fn [tic_tac] (vec (map (fn[x] (vec (map #((tic_tac %) x) (range 3)))) (range 3)))) tic_tac)) | |
((fn [tic_tac] (vec (map #((tic_tac %) %) (range 3)))) tic_tac) | |
((fn [tic_tac] (vec (map #((tic_tac (- 2 %)) %) (range 3)))) tic_tac))) tic_tac)))) | |
) |
def valid?(tic) | |
tac = *tic | |
3.times { |i| tac.push((0..2).map { |x| tic[x][i] }) } | |
tac.push((0..2).map { |x| tic[x][x] }).push((0..2).map { |x| tic[tic.size - 1 - x][x] }) | |
(tac.select { |x| x.uniq.size == 1 && x.first != :e }).first | |
end |
(defn fact ([n] (fact n 1)) | |
([n mul] (if (< n 1) mul (fact (dec n) (*' n mul))))) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
A=Array;d=A.new(9){A.new(9,"_")};loop{a,b,c=gets.split(":").map(&:to_i);next(p"invalid")if(d.map{|x|x[b]}+d[a-a%3,3].flat_map{|x|x[b-b%3,3]}+d[a]).include?c;d[a][b]=c;puts d.map{|x|x.join" "}} |