Skip to content

Instantly share code, notes, and snippets.

View jasonhazel's full-sized avatar
💜

Jason Hazel jasonhazel

💜
View GitHub Profile
units:
w: cx
h: cy
points:
mirror:
ref: matrix_inner_bottom
shift: [3w, 0]
zones:
matrix:
units:
w: cx
h: cy
points:
mirror:
ref: matrix_inner_bottom
shift: [3w, 0]
zones:
matrix:
@jasonhazel
jasonhazel / 00.md
Created November 28, 2017 20:18 — forked from maxivak/00.md
Using RSpec without Rails

Using RSpec without Rails

gets.chomp.split.group_by(&:size).each {|k, v| puts "#{v.size} words with #{k} letters" }
parts = gets.chomp.split.group_by(&:size)
parts.each do |key, part|
puts "#{part.size} words with #{key} letters"
end
require 'watir'
require 'open-uri'
SEARCHES = ARGV[0] ? ARGV[0].to_i : 90
def utf(string)
string.force_encoding('UTF-8')
end
browser = Watir::Browser.new :firefox, :profile => 'default'
# https://www.bloc.io/ruby-warrior
class Player
def initialize
@health = 20
@begining = false
@action = false
@direction = :backward
end
def play_turn(warrior)
D, [2013-05-22T23:43:50.901223 #21072] DEBUG -- : Message received: {"command"=>"heartbeat"}
D, [2013-05-22T23:43:50.901453 #21072] DEBUG -- : Message sent: {:clientid=>"1369251745-0.5909271742404202", :userid=>"500f57bcaaa5cd670f0002f4", :userauth=>"[REMOVED]", :status=>"available", :api=>"presence.update", :msgid=>18}
D, [2013-05-22T23:43:50.971345 #21072] DEBUG -- : Message received: {"msgid"=>18, "now"=>1369251830.956435, "success"=>true, "interval"=>30, "command"=>"response_received"}
D, [2013-05-22T23:44:02.971306 #21072] DEBUG -- : Message received: {"command"=>"heartbeat"}
D, [2013-05-22T23:44:02.971537 #21072] DEBUG -- : Message sent: {:clientid=>"1369251745-0.5909271742404202", :userid=>"500f57bcaaa5cd670f0002f4", :userauth=>"[REMOVED]", :status=>"available", :api=>"presence.update", :msgid=>19}
D, [2013-05-22T23:44:03.043157 #21072] DEBUG -- : Message received: {"msgid"=>19, "now"=>1369251843.028318, "success"=>true, "interval"=>30, "command"=>"response_received"}
D, [2013-05-22T23:44:06.647828 #21
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Date Picker BETA</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>