This file contains 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
javascript:(function(){try{navigator.clipboard.readText().then(function(t){if(t){var e=window.open("","_blank","width=800,height=600");e.document.open(),e.document.write(t),e.document.close()}else alert("Clipboard is empty. Please copy some text to the clipboard first.")}).catch(function(t){console.error("Failed to read clipboard contents: ",t),alert("An error occurred while trying to access the clipboard. Please ensure your browser allows clipboard access.")})}catch(t){console.error("An error occurred:",t),alert("An error occurred while trying to open the new window with the clipboard content.")}})();//bookmarklet_title: HTML Preview from Clipboard |
This file contains 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
/** | |
* 1. Go to script.google.com, and when logged in as the user that you want to do the "checking", click "➕ New Project" in the top right | |
* 2. Copy/Paste all of this code into your new project, and give it a name (e.g. Google Doc Change Notifier) | |
* 3. Change the `const docs = []` line to include all of the Docs you want to check. For example, `const docs = ["https://docs.google.com/document/blah", "https://docs.google.com/document/foo"]; | |
* 4. Click "▷ Run" in the toolbar and authorize the script to run. | |
* 5. You're done! | |
*/ | |
const docs = ["https://docs.google.com/document/d/1Gwt56BiconMLg_u-hdo0asdff27U7DlqLOzHVVgNnoM/edit"]; |
This file contains 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/python3 | |
import discord | |
import random | |
intents = discord.Intents.default() | |
intents.voice_states = True | |
client = discord.Client(intents=intents) | |
join_phrases = ['👋 **{0}** joined **{1}**', '🙋 Hi **{0}**! Welcome to **{1}**', '😊 Welcome to **{1}**, **{0}**!', '🤩 EVERYONE SHUT UP! **{0}** is in **{1}** now.'] |
This file contains 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 newOwner = '[email protected]'; | |
const fileTypesToTransfer = ['application/vnd.google-apps.form']; // https://developers.google.com/drive/api/guides/mime-types | |
function changeOwnership() { | |
console.log('Gathering all files in Drive of type ' + fileTypesToTransfer.join(',') + '...'); | |
let fileIterator = DriveApp.searchFiles(fileTypesToTransfer.map(x => 'mimeType = "' + x + '"').join(' or ')); | |
let files = []; | |
while (fileIterator.hasNext()) { |
This file contains 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
/* | |
* This is a script to look through column x for names, | |
* search your directory for email addresses for that name, | |
* and print them into column y. | |
* | |
* To get started: | |
* 1. Open an existing Google Sheet or create a new one (https://sheets.new) and give it a name. | |
* 2. Click Extensions → Apps Script and give that new Apps Script project a name (e.g. "Lookup Email from Name"). | |
* 3. Paste all of this code into that project. | |
* 4. Specify if it has a header row on line 19 of the code (true or false), as well as the name and email column letters on lines 20 and 21. |
This file contains 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
/** | |
* This script creates a simple web app where the visitor can select a Google Drive folder with the Google Picker and it will tell you the ID of the folder, since that's now hard to find in the Google Drive web app or Folder URL. | |
* To get started: | |
* 1. Go to script.google.com and log in as the user that you want to host this published web app. | |
* 2. Click "New Project". | |
* 3. Rename the project at the top from "Untitled project" to something else (ex. "Folder ID Finder") | |
* 4. Copy/paste this code over the default "myFunction" starter code that's currently there | |
* 5. Click the ➕ next to "Files" in the sidebar, add an "HTML" file, name it "index" (.html is added by Apps Script), and paste the `index.html` code below over the starter code in that file. | |
* 6. Click "Deploy ▼" → "New Deployment". In the "Select Type" ⚙️ gear, choose "Web App". Change "Execute as" to "User accessing the web app" and "Who has access" to "Anyone with a Google Account". Click "Deploy". | |
* You're done! The long "Web app" URL c |
This file contains 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/bash | |
# ======================================= | |
# eOS-Universal-Dark-Style | |
# ======================================= | |
# elementaryOS 6 has great dark themes, but they only apply to "curated" appcenter apps | |
# This script forces the system theme to work with regular Debian packages as well as non-curated Flatpak apps | |
# It also optionally changes the wallpaper based on the theme |
This file contains 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
/** | |
* @OnlyCurrentDoc | |
* 1. Create a new Google Sheet (https://sheet.new) and remove all but one column | |
* 2. Add all of the email addresses in Column A that you'd like to have as viewers on the Shared Drive | |
* 3. Click Tools → Script Editor and copy/paste all of this code into the editor | |
* 4. Edit the Shared Drive ID on line 10 (https://drive.google.com/drive/folders/{Shared Drive ID}) | |
* 5. Click "▷ Run" in the top toolbar, allow authorization, and you're done! | |
*/ | |
const sharedDriveId = '0AAt_DfuXH73UUA9dVp'; |
This file contains 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
/** | |
* This script checks a Google Drive folder for any new files and/or folders added to it, and emails you if there are changes! | |
* To get started: | |
* 1. Go to script.google.com and log in as the user that you want to do the automated "checking". | |
* 2. Click "New Project". | |
* 3. Rename the project at the top from "Untitled project" to something else (ex. "Folder Change Notifier") and copy/paste this code over the default "myFunction" stuff that's currently there. | |
* 4. Add the folder IDs to the "foldersToCheck" array on line 16 below, in quotes, comma-separated. It should look something like: | |
* const foldersToCheck = ["1J5d673365fd944334be51d4163cd8294d", "1c5d63119b730c8224a218222e5faedcad"]; | |
* 5. Add the email address that you want to notify for when there's changes on line 18 below. It should look something like: | |
* const emailToNotify = "[email protected]"; |
This file contains 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 md5(inputString) { | |
return Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, inputString) | |
.reduce((output, byte) => output + (byte & 255).toString(16).padStart(2, '0'), ''); | |
} |
NewerOlder