Skip to content

Instantly share code, notes, and snippets.

View christophervigliotti's full-sized avatar
:atom:
Always be learning!

Christopher Vigliotti christophervigliotti

:atom:
Always be learning!
View GitHub Profile
@christophervigliotti
christophervigliotti / check_mail_now.MD
Last active January 27, 2022 13:33
Refresh POP Accounts in GMail using Keyboard Maestro

Refresh POP Accounts in GMail using Keyboard Maestro

Ahoy Mac fans! One really great tool for automating repetitive tasks on my computer is Keyboard Mastro. I normally use it to automate inputting text (things like email signatures and addresses) but today I dug a bit deeper and in an effort to automate the tedious task of clicking on a series of links that I have to click each time that I want to fetch new POP email from my external accounts.

Before you dive in note that this will only work if you configure Safari to allow remote automation.

1. Action: Select Safari Tab

Set value Select tab to 1

⚠️ I am putting this effort on-hold to focus on learning another technology in support of an amazing customer.

Angular Complete Guide 💻📐

I like to keep things organized, so here is a catalog of the repositories that I'm using for this most excellent course.

Repositories Used

Section 1 - Getting Started

None

Currently Learning
* Angular
* CompTIA A+ (my stepson is studying so I figured that I'd study with him)
@christophervigliotti
christophervigliotti / handle_steps.cfm
Last active December 15, 2021 16:03
break a big process into separate steps
<cfscript>
// declare & set vars
var batch = getBatches(
filterStruct = {
only_get_next_incomplete_batch_for_this_week = true
}
);
<cfscript>
key = 'yer mom';
secret = 'smells';
encrypted=encrypt(secret, key, "CFMX_COMPAT", "hex");
decrypted=decrypt(encrypted, key, "CFMX_COMPAT", "hex");
WriteDump([
'key: #key#',
'secret: #secret#',
'encrypted: #encrypted#',
'decrypted: #decrypted#',
#Run all tests for this project
bundle exec rspec
#run single test
bundle exec rspec path/to/spec/file/thingie_spec.rb
#Useful switches
bundle exec rspec --format documentation (more output context)
bundle exec rspec --order random (tests should be able to pass in any order)
bundle exec rspec --profile (shows you slowest tests)
@christophervigliotti
christophervigliotti / working_with_popups.rb
Created April 20, 2018 13:54
AFT Working With Popups
a_popup_window = window_opened_by do
# click_button 'Open Login Window', which opens a popup
the_xpath = "//a[@id='open_popup_link']"
find(:xpath, the_xpath).click
end
within_window(a_popup_window) do
# are we focused on the popup?
expect(page).to have_selector(:xpath, "//h1[contains(text(), 'Text that appears in the H1 Tag')]")
popup_page_instance = PopupPageObj.new
@christophervigliotti
christophervigliotti / expectations.txt
Last active April 20, 2018 13:52
AFT Expectations Reference
# does button exist and is enabled
expect(page).to have_button('Update')
# does button exist and is disabled
expect(page).to have_button('Update', disabled: true)
# does h1 contain both of the specified strings
expect(page).to have_selector(:xpath, "//h1[contains(text(), 'New') and contains(text(), 'Person')]")
# does an input field with id of dataFirstName.1 exist
require 'spec_helper'
RSpec.feature 'TODO: describe your spec here' do
before(:each) do
@wait_time = Capybara.default_max_wait_time
Capybara.default_max_wait_time = 10
end
scenario 'TODO: describe your scenario here.', :js do
# TODO: your logic goes here