Skip to content

Instantly share code, notes, and snippets.

View leviwilson's full-sized avatar

Levi Wilson leviwilson

  • Northwoods
  • Colorado, USA
View GitHub Profile
@leviwilson
leviwilson / README.md
Last active December 22, 2015 22:39
Setting up Ruby / DevKit on Windows

Ruby on Windows Setup

Here are a few things you'll need to get ruby setup on your Windows machine.

Ruby Setup

Ruby 1.9.3 will work. Use the defaults, but choose to add all of the ruby executables to your path.

DevKit

DevKit is needed for ruby to be able to install native gems (compiled C++ code) to your system. Extract this into something like c:\DevKit and then run the following commands.

@leviwilson
leviwilson / multiple_screen_calls.rb
Created September 20, 2013 15:53
Calling same method for multiple screens
def show_deleted_for(cls)
on(cls).show_deleted = true
end
def hide_deleted_for(cls)
on(cls)show_deleted = false
end
[CaseActivityTab, MemberNotesTab].each do |cls|
show_deleted_for(cls)
@leviwilson
leviwilson / UIA.rb
Last active December 25, 2015 07:19
main_form = UIA.find_by_id('MainFormWindow')
main_form.children # => [...] array of 22 child elements
main_form.children.find {|e| e.name == 'DropDown List'}.children.map(&:name) # => ['Apple', 'Orange', 'Banana']
main_form.children.first.click
@leviwilson
leviwilson / memory_backed_disk.md
Created December 5, 2013 01:58
Create memory backed disk on OSX

Create a memory-backed disk in OSX. Useful for sending git filter-branch to it to speed things up.

# to mount
hdiutil attach -nomount ram://$(( 128 * 1024 * 2 )) # returns device with 128 MB (in 512k blocks)
diskutil erasevolume JHFS+ "tmp" /dev/disk1 # whatever the hdiutil command returns

# when done
diskutil unmount /dev/disk1
hdiutil detach /dev/disk1
*.csproj -text merge=union
*.sln -text merge=union
@leviwilson
leviwilson / Gemfile
Last active August 29, 2015 13:56
mohawk / uia gem setup
source 'http://rubygems.org'
# ...
gem 'mohawk', git: 'git://github.com/leviwilson/mohawk.git', branch: 'uia_gem'
gem 'uia', git: 'git://github.com/northwoodspd/uia.git'
# ...
class YourScreen
include Mohawk
def press_enter
w = Uia.find_element handle: adapter.window.handle # get the top-level window for this screen
t = w.find id: 'yourTextFieldId'
t.send_keys :enter
end
end
@leviwilson
leviwilson / .gitattributes
Created February 19, 2014 19:25
Default .gitattributes that the Git for Visual Studio plugin gives you.
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.

Keybase proof

I hereby claim:

  • I am leviwilson on github.
  • I am leviwilson (https://keybase.io/leviwilson) on keybase.
  • I have a public key whose fingerprint is 3392 4A26 7AC8 21D5 9E80 802D 12C5 EA5D 4297 5CD8

To claim this, I am signing this object:

class Object
def kill_puppies(how_many)
sleep how_many
end
end