This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function generalSymEmail() { | |
| const recipient = 'sym@middlebury.edu';//sym@middlebury.edu | |
| const subject = 'Spring Symposium Application' | |
| const body = betterAllData(); | |
| MailApp.sendEmail({ | |
| to: recipient, | |
| replyTo: 'sym@middlebury.edu', | |
| name: 'Spring Student Symposium', | |
| subject: subject, | |
| htmlBody: body, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="kl_flex_columns_wrapper" style="margin-bottom: 30px;"> | |
| <div class="kl_flex_column"> | |
| <div class="kl_flex_columns_wrapper"> | |
| <div class="kl_flex_column"><img id="1445356" style="border-radius: 10px;" src="https://middlebury.instructure.com/courses/9255/files/1445356/preview" alt="One of your favorite teachers.jpg" data-api-endpoint="https://middlebury.instructure.com/api/v1/courses/9255/files/1445356" data-api-returntype="File" /></div> | |
| <div class="kl_flex_column"> | |
| <h2 style="border-bottom: 1px solid #efefef;">Title</h2> | |
| <h3>Date</h3> | |
| </div> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # | |
| # Imports the libraries | |
| import os, time, yaml | |
| # | |
| # Creates the array to store data | |
| user_data = [] | |
| user_data.append("LAST LOGIN DATE, USERNAME, EMAIL, PRIMARY DOMAIN, DISK USAGE, START DATE") | |
| # | |
| # Gets info on the accounts from the WHM API and cPanel last login logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getNames(){ | |
| var first = []; | |
| var last = []; | |
| const names = document.querySelectorAll('h3') | |
| names.forEach(function(name){ | |
| //console.log(name.innerText) | |
| let split = name.innerText.split(", "); | |
| first.push(split[1]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $user = "root"; | |
| $token = "YOURTOKENHERE"; | |
| $query = "https://YOURIP:YOURPORT/json-api/listaccts?api.version=1"; | |
| //json-api/listaccts -- generic info, disk usage, start date, domain, | |
| //get_disk_usage -- disk usage obviously | |
| //showbw -- bandwidth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { App } = require('@slack/bolt'); | |
| const WPAPI = require( 'wpapi' );//add in http://wp-api.org/node-wpapi | |
| // Initializes your app with your bot token and signing secret | |
| const app = new App({ | |
| token: process.env.SLACK_BOT_TOKEN, | |
| signingSecret: process.env.SLACK_SIGNING_SECRET | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| foreach ($data['custom_fields'] as $key => $value) { //first foreach loop*****************if the rest is gone does this work alone? | |
| if (empty($data['custom_fields'][$key])){ | |
| unset($data['custom_fields'][$key]); | |
| } | |
| } | |
| if (!empty($data['levels'])){ | |
| $fullPath = IHC_PATH . 'public/views/membership_card.php'; | |
| $searchFilename = 'membership_card.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { App } = require('@slack/bolt'); | |
| const WPAPI = require( 'wpapi' );//add in http://wp-api.org/node-wpapi | |
| // Initializes your app with your bot token and signing secret | |
| const app = new App({ | |
| token: process.env.SLACK_BOT_TOKEN, | |
| signingSecret: process.env.SLACK_SIGNING_SECRET | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function emailClean(input) { | |
| let email = input.split("@") | |
| let clean = email[0] | |
| return clean; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function otherWeather(){ | |
| const ss = SpreadsheetApp.getActiveSpreadsheet();//gets your spreadsheet | |
| const sheet = ss.getSheetByName('APIData');//gets the sheet in your spreadsheet with this name | |
| const apiUrl = 'http://api.openweathermap.org/data/2.5/weather?zip=05753,us&appid=YOUR_API_KEY&units=imperial';//goes to the API | |
| const response = UrlFetchApp.fetch(apiUrl);//gets the API data | |
| const json = JSON.parse(response.getContentText());//treat it as json | |
| const data = [json.dt,json.weather[0].main, json.main.temp, json.wind.speed];//get the data we want from the API | |
| sheet.appendRow(data);//write it to the sheet | |
| } |