Skip to content

Instantly share code, notes, and snippets.

View jacobsalmela's full-sized avatar
:octocat:
To all that makes us unique

Jacob Salmela jacobsalmela

:octocat:
To all that makes us unique
View GitHub Profile
@jacobsalmela
jacobsalmela / system-check-win.py
Last active August 29, 2015 14:12
Windows: Open TestNav system check
# Open a URL once a user is logged in
import webbrowser
new = 2 # open in a new tab, if possible
system_check = "https://proctorcaching.pearsonaccess.com/ems/systemCheck/systemCheck.jsp?acc=mn"
webbrowser.open(system_check,new=new)
@jacobsalmela
jacobsalmela / make-full-screen.py
Created January 5, 2015 19:12
Make full screen
# Keystrokes
import win32api
import win32com.client
shell = win32com.client.Dispatch("WScript.Shell")
# Alt+Space+X or F11 makes it full screen
win32api.Sleep(2500)
# One or the other below should work depending on what browser is being used
#shell.SendKeys("% X")
shell.SendKeys("{F11}")
@jacobsalmela
jacobsalmela / sample-test-win.py
Created January 5, 2015 19:15
Opens a sample TestNav site
# Open a URL once a user is logged in
import webbrowser
new = 2 # open in a new tab, if possible
sample_test = "https://testnav.com/mnqc/
webbrowser.open(system_check,new=new)
@jacobsalmela
jacobsalmela / click-win.py
Created January 5, 2015 19:57
Click a coordinate in Windows
click(1000,500)
@jacobsalmela
jacobsalmela / open-testnav.py
Created January 5, 2015 19:17
Opens the real TestNav site
# Open a URL once a user is logged in
import webbrowser
new = 2 # open in a new tab, if possible
testnav = "http://testnav.com/mn/testnav-7.5.22.36/selfRegistration.htm"
webbrowser.open(system_check,new=new)
@jacobsalmela
jacobsalmela / launch-tt.sh
Last active August 29, 2015 14:13
Opens the TestTaker app
# Open the TestTaker app
osascript -e 'tell application "NWEA Lockdown Browser"
activate
end tell'
@jacobsalmela
jacobsalmela / html-auto-response.scpt
Created January 12, 2015 19:59
When paired with an Apple Mail rule, this will send a HTML-formatted response automatically to the sender
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with eachMessage in theMessages
set theName to extract name from sender of eachMessage
if exists reply to of eachMessage then
set theAddress to reply to of eachMessage
else
set theAddress to extract address from sender of eachMessage
end if
#!/bin/bash
# Click username field
click -x 864 -y 546
# Enter username
osascript -e 'tell application "System Events"
keystroke "I love Pearson"
end tell'
@jacobsalmela
jacobsalmela / safari-bookmarks-testnav.sh
Created January 22, 2015 18:31
Add TestNav bookmarks to Safari
#!/bin/bash
# Set as many bookmarks in Safari as needed
# Adapted from the script by David Koff, 2012 for the J. Paul Getty Trust
# many thanks to both Chris Norris (cnorris@getty.edy) & Ryan Manly (ryan.manly@gmail.com) for their invaluable input
# https://jamfnation.jamfsoftware.com/discussion.html?id=6031
bud='/usr/libexec/Plistbuddy'
plist="/Users/student/Library/Safari/Bookmarks.plist"
urls=('https://testnav.com/mn/testnav-7.5.22.36/'
'https://proctorcaching.pearsonaccess.com/ems/systemCheck/systemCheck.jsp?acc=mn'
@jacobsalmela
jacobsalmela / disable-java-auto-update.sh
Created January 23, 2015 23:57
Disables Java's "Check for updates automatically"
#!/bin/sh
# Modified from https://jamfnation.jamfsoftware.com/discussion.html?id=6489#responseChild49255
# Java Plugin Location
javaPlugin="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"
# Config File Location
configFile="/Library/Application Support/Oracle/Java/Deployment/deployment.config"
# Properties File Location
propFile="/Library/Application Support/Oracle/Java/Deployment/deployment.properties"