🍴 = Fork of another library 🪦 = No longer maintained
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
// check if a reddit user exists using response code | |
// returns "TRUE" if they exist | |
// returns Error message if 404 response | |
function checkUser(input) { | |
// check that the input is a string | |
if (typeof user == 'string' && user.length) { | |
// open cache service for caching results | |
var cache = CacheService.getScriptCache(); | |
// remove u/ and trailing spaces from username to normalize inputs | |
var user = input.replace(/^\/?(user|u|U)\//, "").trim(); |
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
<?php | |
// Get the contents of a URL | |
function curl_get_contents($url): string | |
{ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE); | |
curl_setopt($ch, CURLOPT_HEADER, FALSE); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
curl_setopt($ch, CURLOPT_URL, $url); |
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
# Pig Latin Translator in Python | |
# Jonah Lawrence | |
# January 2020 | |
import re | |
def translate(message: str) -> str: | |
"""translate a message to pig latin""" |
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
Show hidden characters
{ | |
"workbench.colorTheme": "Cobalt2", | |
"workbench.iconTheme": "material-icon-theme", | |
"workbench.colorCustomizations": { | |
"editor.lineHighlightBackground": "#0088aa20", | |
"editor.lineHighlightBorder": "#0088aa20", | |
"editorCursor.foreground": "#00ffd5", | |
"editor.background": "#00141d", | |
"editorGutter.background": "#00141d", | |
"editor.selectionBackground": "#00ffff55", |
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
/* Chrome://dino Hacks | |
* Jonah Lawrence | |
* February 2021 | |
* Head to chrome://dino and paste this code in the console to add a couple cheats! | |
* - press 's' to toggle "safe mode" where you can't lose | |
* - press 'p' to add 100 points to your score | |
*/ | |
// toggles a mode where the player is not able to lose from collisions | |
Runner.prototype.toggleSafeMode = () => { |
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
// How to get Math Autocorrect on Google Docs | |
// Type shortcuts inspired by LaTeX anywhere in Google Docs | |
// Script by Jonah Lawrence (c) 2021 | |
// | |
// Steps: | |
// 1. Open a Google Doc | |
// 2. Click the Tools tab, then Preferences | |
// 3. Switch to the Substitutions Tab | |
// 4. Paste this script in the Console |
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
<?php | |
define('GH_USERNAME', ''); // Username for authentication | |
define('GH_PASSWORD', ''); // GitHub Personal Access Token with repo scope* (starting with 'ghp_') | |
define('GH_REPO', ''); // GitHub Repo URL (eg. 'github.com/UserName/RepoName.git') | |
define('GH_SECRET', ''); // Webhook secret provided to GitHub when creating the webhook | |
// Steps: | |
// 1. Visit the repository on GitHub, select 'Settings', then 'Webhooks' |
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
/** | |
* Script to manually update Wordle stats | |
* | |
* This can be useful for overriding stats if you want to transfer stats from | |
* another device, or you simply want to set your stats manually. | |
* | |
* @author Jonah Lawrence | |
* @version 1.0 | |
* @license MIT | |
* |
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
/** | |
* Codenames.gs - JavaScript Codenames Key Board Generator | |
* | |
* This script was created for use in a Google Spreadsheet. See this link below | |
* for a printable version of the game and spreadsheets that generate the key boards. | |
* | |
* https://drive.google.com/drive/folders/1KHwA2W96sawlWOQq8Hl3FiUygB6PxG8o | |
* | |
* (c) 2020-2022, Jonah Lawrence | |
* |
OlderNewer