Skip to content

Instantly share code, notes, and snippets.

@Donavan
Donavan / decklist
Created April 16, 2019 00:54
Budgetish red deck - Mr Burns
4 Ghitu Lavarunner (DAR) 127
4 Wizard's Lightning (DAR) 152
4 Fanatical Firebrand (RIX) 101
3 Lightning Strike (XLN) 149
21 Mountain (RIX) 195
4 Shock (M19) 156
4 Viashino Pyromancer (M19) 166
3 Goblin Chainwhirler (DAR) 129
1 Risk Factor (GRN) 113
4 Skewer the Critics (RNA) 115
@Donavan
Donavan / Cascade Rage Quit
Created March 2, 2019 23:30
Rev 2 Cascade
1 Conclave Guildmage (GRN) 162
4 Sunpetal Grove (XLN) 257
2 Leonin Warleader (M19) 23
2 Divine Visitation (GRN) 10
11 Plains (RIX) 192
8 Forest (RIX) 196
3 Ajani's Welcome (M19) 6
4 Impassioned Orator (RNA) 12
3 Ixalan's Binding (XLN) 17
2 Healer's Hawk (GRN) 14
1 Conclave Guildmage (GRN) 162
4 Sunpetal Grove (XLN) 257
2 Leonin Warleader (M19) 23
2 Divine Visitation (GRN) 10
11 Plains (RIX) 192
8 Forest (RIX) 196
2 Talons of Wildwood (M19) 202
3 Ajani's Welcome (M19) 6
2 Impassioned Orator (RNA) 12
3 Ixalan's Binding (XLN) 17
@Donavan
Donavan / merge_json.rb
Created November 28, 2018 18:32
Merge cucumber json
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'json'
require 'yaml'
require 'pry'
def remove_backgrounds(features)
features.each do |feature|
scenarios = feature['elements']
@Donavan
Donavan / with_date_picker open.xml
Last active July 18, 2018 16:39
Appium Date picker
<?xml version="1.0" encoding="UTF-8"?>
<XCUIElementTypeApplication type="XCUIElementTypeApplication" name="Marketing" label="Marketing" enabled="true" visible="true" x="0" y="0" width="768" height="1024">
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="true" x="0" y="0" width="768" height="1024">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="1024">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="1024">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="1024">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="64"/>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="320" height="1024">
<XCUIElementTypeNavigationBar type="XCUIElement
# frozen_string_literal: true
require 'cpt_hook'
require 'page-object/accessors'
# Rubocop has problems with metaprogramming.
module PageObject
module Platforms
module Watir
#
@Donavan
Donavan / wtf.rb
Last active December 3, 2017 00:20
PageObject Weirdness
# Monkey patching PageObject to add to the DSL like this works
module PageObject
module Accessors
def text_field_hooked(name, identifier={:index => 0}, &block)
standard_methods(name, identifier, 'text_field_for', &block)
define_method(name) do
self.send("#{name}_element").value
end
define_method("#{name}=") do |value|
self.send("#{name}_element").value = value
defmodule Web.Team do
use Web.Web, :model
schema "teams" do
field :name, :string
many_to_many :users, join_through: 'team_members', on_delete: :delete_all
timestamps()
end
@doc """
FROM ubuntu:14.04.3
# Set the locale, otherwise elixir will complain later on
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# wget for convenience, use curl if you want to
RUN apt-get -y -q install wget
# Rails Stuff
alias stoprails='kill -9 $(lsof -i :3000 -t)'
alias startrails='rails server -d'
alias restartrails='stopRails && startRails'
#Check PHP For Erroes
alias phpcheck='find ./ -name \*.php | xargs -n 1 php -l'
# ROT13-encode text. Works for decoding, too! ;)
alias rot13='tr a-zA-Z n-za-mN-ZA-M'