This is a sample script for creating quizzes in Google Form using Google Forms Service with Google Apps Script.
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 USERS_SHEET_NAME = "users", | |
TASKS_SHEET_NAME = "tasks", | |
SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/abc123456/edit", /* TODO(Developer): Replace the spreadsheet ID */ | |
/* Use `SpreadsheetApp.getActiveSpreadsheet()` if the Apps Script was created from a Google Sheet. */ | |
spreadsheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL); | |
const getEmailByNickname = (() => { | |
const usersSheet = spreadsheet.getSheetByName(USERS_SHEET_NAME); | |
let userEmailTable = {}; |
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
// Coordinates to check system against | |
const coordinates = [ | |
[-3, 0], | |
[5, 1], | |
[-4, 3], | |
[2, -6], | |
]; | |
// System without solving for Y | |
function system1(x, y) { |
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
import htm from "https://esm.sh/htm"; | |
import vhtml from "https://esm.sh/vhtml"; | |
const html = htm.bind(vhtml); | |
function string2Nodes(string) { | |
const container = document.createElement("div"); | |
container.innerHTML = string; | |
return container.childNodes; |
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
console.log(5) // prints: 5 | |
Number.prototype._ = function() { | |
alert("Boo!"); | |
return this; | |
} | |
Number.prototype.__ = function() { | |
alert("Boo!"); | |
return this * 2; |
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
--- | |
/** | |
* @param moduleId Path to component | |
*/ | |
function function2AstroComponent<Args extends any>( | |
callback: (...arg: Args[]) => any | |
): (...arg: Args[]) => any & { | |
isAstroComponentFactory: true; | |
propagation: "none"; | |
name: string; |
Convert mac-os-el-capitan-pkg-to-iso.sh
from using hdiutil
and asr
to using Linux utilities.
Important: You will need about 30GB of free disk space.
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
dialog[popover]:not([open]) { | |
box-sizing: border-box; | |
/* | |
* Readd Chrome UA styles on popover dialogs since they | |
* are overwritten when marked as a popover. An explanation | |
* I found useful was [this](https://youtu.be/yZT9906ZCLU?t=543) | |
* video, but be forewarned, the padding part does not apply | |
* to `[popover]` dialogs. | |
*/ |
OlderNewer