Skip to content

Instantly share code, notes, and snippets.

View ro6's full-sized avatar

Robert M. Mather ro6

  • D2S
  • San Francisco Bay Area
View GitHub Profile
@ro6
ro6 / gist:fcf7a1eb49f7036a9c49207f8914306e
Created March 7, 2021 18:13
Selects "Refund to original payment method" for all Amazon returns on the page
Array.from(document.querySelectorAll('b'))
.filter(elem => elem.innerText.includes('original'))
.forEach(elem => elem.click())
@ro6
ro6 / keybase.md
Created September 16, 2019 04:07

Keybase proof

I hereby claim:

  • I am ro6 on github.

  • I am ro6 (https://keybase.io/ro6) on keybase.

  • I have a public key ASBbvxzff_Gve_zZQ6JzneU_szXIEzH03zTDlE07iRpo5wo

@ro6
ro6 / underscore-in-match-fails.pony
Created August 16, 2017 13:50
"_" should ignore in match, but compiler tries to capture and fails with "cannot capture "_", variable not defined"
be behave() =>
if _has_food then //heading home
_current_cell.get_is_home(
Promise[Bool].>next[None](
{(is_home: Bool)(ant = recover tag this end) =>
if is_home then
ant.access({(ant': Ant ref) =>
ant'.drop_food()
ant'.turn(4)})
else
@ro6
ro6 / array-test.pony
Created February 26, 2017 13:23
Trying to create an empty array with space for at least 1 element, add an element at position 0, then retrieve the element
actor Main
new create(env: Env) =>
let arr: Array[Bool] = Array[Bool](1)
try
arr(0) = true
env.out.print(arr(0).string())
else
env.out.print("fail")
end