save_and_open_page
have_button(locator)| #!/usr/bin/env ruby | |
| # encoding: UTF-8 | |
| TIME_ZERO = Time.gm(0) | |
| ages_to_test = [979000000, 2158493738, 246144023, 1270166272, 1025600095] | |
| def seconds_to_dt (seconds = 0) # Give it a sane default | |
| age = TIME_ZERO + seconds.to_i | |
| end |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| #!/bin/zsh | |
| ### vss:ft=zsh | |
| ## reverse tabbing, useful in the prompt | |
| ## Copyright (C) 2008 by Daniel Friesel <derf@xxxxxxxxxxxxxxxxxx> | |
| ## License: WTFPL <http://sam.zoy.org/wtfpl> | |
| ## CAVEAT: directory-names containing two or more consecutive spaces | |
| ## are not yet supported | |
| setopt localoptions |
| #!/bin/sh | |
| ## | |
| # This is a script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # Run in interactive mode with: | |
| # $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)" | |
| # | |
| # or run it without prompt questions: |
Here are some links that were helpful in me building my presentation.
The article that got me started on this topic.
I hereby claim:
To claim this, I am signing this object:
| class OneHandClapping | |
| def is; 'The sound of silence'; end | |
| def isnt; !is; end | |
| end |
| #!/usr/bin/env ruby | |
| lib_name = 'matrix' # This could be your param | |
| require lib_name # require can accept a string | |
| klass = Kernel.const_get(lib_name.capitalize) # Kernel.const_get turns a string into a constant | |
| klass.zero(1) # And here we're using the newly constantized string to run methods on the Matrix class |
| #!/usr/bin/env ruby | |
| def var_or_do_then_var | |
| nil || (puts 'I ran'; 'I returned') | |
| end | |
| out = var_or_do_then_var | |
| puts "--#{out}--" # heh... puts out |