This is going to be a test file for the Office 365 Add-in Tutorial
  
    
      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
    
  
  
    
  | local function get_npm_scripts() | |
| local file = io.open("package.json", "r") | |
| if file then | |
| local content = file:read("*a") | |
| file:close() | |
| local packageData = vim.json.decode(content) | |
| if packageData.scripts then | |
| local scripts = {} | |
| for key, value in pairs(packageData.scripts) do | |
| -- add key, value to the scripts table | 
  
    
      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 replaceLinks() { | |
| const trainingSheet = SpreadsheetApp.getActive().getSheetByName('Data'); | |
| const trainingRange = trainingSheet.getRange(3, 3, trainingSheet.getLastRow() - 2); | |
| const values = trainingRange.getValues(); | |
| values.forEach(([link], ind) => { | |
| const matches = /\/([\w-_]{15,})\/(.*?gid=(\d+))?/.exec(link); | |
| if(!matches) { | |
| return; | 
  
    
      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 main() { | |
| // 1. get the courses from the spreadsheet | |
| const courses = getCoursesFromSpreadsheet(); | |
| // 2. create the courses on the classroom | |
| const responses = courses.map((course, ind) => { | |
| const resource = createCourseResource(course); | |
| const response = Classroom.Courses.create(resource); | |
| course[3] = response.alternateLink; | 
  
    
      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 doGet() { | |
| var html = HtmlService | |
| .createHtmlOutputFromFile('form') | |
| .setSandboxMode(HtmlService.SandboxMode.IFRAME) | |
| .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL); | |
| return html; | |
| } | |
| function submit(name) { | 
  
    
      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
    
  
  
    
  | async function main(context: Excel.RequestContext) { | |
| // Your code here | |
| const items = context.workbook.names.load('items') | |
| await context.sync(); | |
| items.items.forEach(item => { | |
| const lastIndex = item.formula.lastIndexOf('$'); | |
| const main = item.formula.substring(0, lastIndex + 1); | |
| const split = +item.formula.substring(lastIndex + 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
    
  
  
    
  | <ul></ul> | 
  
    
      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 onOpen() { | |
| SlidesApp.getUi().createMenu('Template') | |
| .addItem('Build template', 'buildTemplate') | |
| .addToUi(); | |
| } | |
| function buildTemplate() { | |
| var presentation = SlidesApp.getActivePresentation(); | |
| var newPresentation = DriveApp.getFileById(presentation.getId()) | |
| .makeCopy('COPY OF TEMPLATE'); | 
  
    
      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 onOpen() { | |
| SpreadsheetApp.getUi() | |
| .createMenu('Marking Application') | |
| .addItem('Open App', 'openApp') | |
| .addToUi(); | |
| } | |
| function openApp() { | |
| var html = HtmlService.createHtmlOutputFromFile('app'); | |
  
    
      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 main() { | |
| var videos = YouTube.Search.list('snippet', { | |
| type: 'video', | |
| maxResults: 50, | |
| forMine: true | |
| }); | |
| var allVideos = videos.items; | |
| while(videos.nextPageToken) { | 
NewerOlder