Skip to content

Instantly share code, notes, and snippets.

@sreyemnayr
sreyemnayr / home-end-fix.sh
Created October 8, 2024 15:39
Make Home and End keys behave as expected on macOS
mkdir -p $HOME/Library/KeyBindings
echo '{
/* Remap Home / End keys to be correct */
/* Credit: radamo59 */
/* https://discussions.apple.com/thread/251108215?login=true&sortBy=rank */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
"^\UF729" = "moveToBeginningOfDocument:"; /* Ctrl + Home */
all_token_ids = [];
const get_assets = async (page) => {
await fetch(`https://api.opensea.io/api/v1/assets?collection_slug=grassverse&order_direction=desc&limit=30&include_orders=false&cursor=${page}`).then((j) => j.json()).then(async (j)=>{
all_token_ids.push(...j.assets.map((m)=>m.token_id));
if(j.next){
await get_assets(j.next);
}
});
}
// SPDX-License-Identifier: MIT
//
// ╓ ▄▄
// ╫█ ██▄
// ██ ╫▌▀▌ █▌
// ▓▌█┐ █¡╨█ █╫▌
// █µ▀▌ ╚▓:└▀▌ █░╠▓
// "█¡╙█▄ ╫▌⌐:│▀▌ ╚▓^┘▓▄
// ╙█¡"╨▓▄ █▄::"┘▀▓▄█▌::╨▓┐
// ╙█¡┌:╨▀▓█µ┌::┌:│▀▀:┌::╨▓▄
@sreyemnayr
sreyemnayr / TheStoics.sol
Created September 7, 2022 23:07
The Stoics - Version 2 for Public Audit
// SPDX-License-Identifier: MIT
//
//
// ┌▄═==╗▄═==▄▄═▄▄ ,─¬"¬─╥▓ ,
// ╞▌ ╫█ └█ ██ ▐ █ └█▀
// ╫█ ██ ,, ,, ╫▄, ,▐█,, ,, ,, ,, ,
// ╫█ ██^ ██ ▄█ ╘█µ ╙█████▄, ╞█ ▄▌ █▄ █▌ ▄▌ j█ ╓ █b
// ╫█ ██ ╫█ ▐█▌^^^^╙` ╙█▄ ╞█ ╟█ ▐█µ █▌ ╟█ ▀ └██▓▄,
// ╫█ ██ ╫█ └█µ , █ ▌ ╞█ ╙█ ▐█ █▌ ╙█ ╓╖ ╙▀▌
// ,██, ,██ ,██, ▀w ,⌐ ██. ,^ █▄,- ▀, ,╓▀ ,█▌, ^▀, ,.' ╙█, ,x
;(function () {
let participantsList = new Set();
Do()
function Do() {
setInterval(() => {
if (window.default_MeetingsUi) {
if (!window.default_MeetingsUi.__hooked) {
const p = new Proxy(window.default_MeetingsUi, __window__default_MeetingsUi())
""" classgrid.py by Ryan Meyers at St. George's Episcopal School ryan.meyers at stgnola dot org
From Alma reports, download the Teacher Schedules by Period/Day report
Open in excel and save as a CSV (this script assumes schedules.csv is the filename
Run python classgrid.py (schedules.csv should be in the same folder)
grid.csv should be generated.
"""
import csv
periods = set()
classrooms = set()
@sreyemnayr
sreyemnayr / colorterm.sh
Created March 21, 2019 15:43
Auto-color terminal background to avoid ssh production oopsiedaisies
#!/bin/bash
#
# Based almost entirely on Bryan Gilbert's solution:
# http://bryangilbert.com/post/etc/term/dynamic-ssh-terminal-background-colors/
#
# Sets terminal screen to color based on keywords or hex code (no #, for some reason that breaks)
#
# For SSH magic, add following to ~/.zshrc:
#
: <<'END_COMMENT'
@sreyemnayr
sreyemnayr / almasubmit.user.js
Created May 22, 2018 15:44
Auto-submit Alma Report Card Grades
// ==UserScript==
// @name Auto-submit Alma Report Card Grades
// @namespace https://greasyfork.org/en/users/8332-sreyemnayr
// @version 0.1
// @description When you need to edit/save every teacher's grade for the whole school.
// @author Ryan Meyers
// @match https://*.getalma.com/report-cards/batches/*/input?student=*
// @grant none
// ==/UserScript==
@sreyemnayr
sreyemnayr / wiz1
Last active August 29, 2015 14:22
close wiz1 ads
setTimeout( "closeMyAd()", 1 );
console.log("closeMyAd!!!");