Skip to content

Instantly share code, notes, and snippets.

👷
Making

Cody Gagnon codycodes

👷
Making
Block or report user

Report or block codycodes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@codycodes
codycodes / test_waitlist.html
Created May 28, 2019
Send a request to IFTTT with JSON data via an HTML form
View test_waitlist.html
<!--
Copyright © 2019 Cody Antonio Gagnon
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@codycodes
codycodes / gmail_create_label_from_message_contacts.js
Last active Mar 10, 2019
Creates a defined label from contacts in a defined email which then can use said label to message that group of contacts.
View gmail_create_label_from_message_contacts.js
/*
Copyright © 2019 Cody Antonio Gagnon
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE US
@codycodes
codycodes / helper.gs
Created Jan 6, 2019
Google Apps Script Helper Functions for interacting with spreadsheet and Calendar
View helper.gs
function getEvents(calId){
/*
Gets the events which occur in the next 24 hours for the given calendar ID
*/
cal = CalendarApp.getCalendarById(calId);
var now = new Date();
var twentyFourHoursFromNow = new Date(now.getTime() + (24 * 60 * 60 * 1000));
var events = cal.getEvents(now, twentyFourHoursFromNow);
return events;
}
@codycodes
codycodes / Make Google Calendar All-Day Events Draggable
Created Jan 5, 2019
Tampermonkey Script; Hacky. You can drag down all-day events into the calendar as normal events. Useful for me because I use Google Calendar all day events as a todo list and I like being able to just drag in the events. Updating secTimer will change how frequently the function that makes all day events draggable runs. Also respods to some key p…
View Make Google Calendar All-Day Events Draggable
// ==UserScript==
// @name Make Google Calendar All-Day Events Draggable
// @namespace https://calendar.google.com/calendar/*
// @version 0.1
// @description Hacky. You can drag down all-day events into the calendar as normal events. Useful for me because I use Google Calendar all day events as a todo list and I like being able to just drag in the events. Updating secTimer will change how frequently the function that makes all day events draggable runs. Also respods to some key presses. Still very much WIP
// @author Cody Antonio Gagnon
// @match https://calendar.google.com/calendar/*
// @grant none
// ==/UserScript==
@codycodes
codycodes / LICENSE
Created Nov 4, 2018
This license applies to all public gists https://gist.github.com/codycodes
View LICENSE
MIT License
Copyright (c) 2018 Cody Antonio Gagnon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@codycodes
codycodes / change_raspberry_pi_hostname.sh
Last active Jan 9, 2019
Changes the hostname on your raspberry pi to what's set in $hostname (variable); can be passed in as a parameter or hard-coded into the script
View change_raspberry_pi_hostname.sh
#!/bin/bash
# see LICENSE file on this gist at gist.github.com/codycodes
# Requires root permissions. An easy way to run this script is to simply use "sudo bash change_raspberry_pi_hostname.sh"
# Changes the hostname on your raspberry pi to what's set in $hostname (variable)
# Can be passed in as a parameter by calling this script or set explicitly in this file
# Makes a backup of the hosts file (/etc/hosts.bak)
@codycodes
codycodes / get_stored_airport_wifi_passwords.js
Last active Jan 9, 2019
Two commands to get your current WiFi password or any WiFi password stored in your macOS keychain!
View get_stored_airport_wifi_passwords.js
#!/bin/bash
get_current_wifi_password() {
# this command from http://bit.ly/2zWtUhQ
current_wifi=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | \
awk '/ SSID/ {print substr($0, index($0, $2))}'`
security find-generic-password -a "$current_wifi" -g | tail -0
}
get_wifi_password() {
@codycodes
codycodes / az_cli_create_fetch_service_principal.sh
Last active Oct 1, 2018
Create + fetch details for Azure Service Principal using az cli (Unix/Linux)
View az_cli_create_fetch_service_principal.sh
#!/bin/bash
# install homebrew (if on Windows install the msi)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew install azure-cli
# brings up UI to login to Azure
az login
@codycodes
codycodes / toggle_menu_bar_macos.scpt
Last active Jan 9, 2019
-- Toggle "Automatically hide and show the menu bar option using UI" -- Useful for when you want to maximize your screen real estate :) -- Please comment if you have any suggestions for improvements!
View toggle_menu_bar_macos.scpt
-- Toggle "Automatically hide and show the menu bar option using UI"
-- Useful for when you want to maximize your screen real estate :)
-- Please comment if you have any suggestions for improvements!
tell application "System Preferences"
activate
set current pane to pane id "com.apple.preference.General"
tell application "System Events"
delay 1
tell process "System Preferences"
@codycodes
codycodes / TLR Input Optimizer
Created Jun 21, 2018
For the part-time employees of Seattle Central - take back your time spent using the TLR interface by using this optimized input script!
View TLR Input Optimizer
// ==UserScript==
// @name TLR Input Optimizer
// @namespace http://cody.codes
// @version 0.1
// @description For the part-time employees of Seattle Central - take back your time spent using the TLR interface by using this optimized input script!
// @author Cody Antonio Gagnon - codycodes
// @match https://apps.seattlecolleges.edu/TLR/Employee/TimeEntry.aspx*
// @require https://momentjs.com/downloads/moment.min.js
// @grant none
// ==/UserScript==
You can’t perform that action at this time.