Skip to content

Instantly share code, notes, and snippets.

View geotrev's full-sized avatar
🏠
Working from home

George Treviranus geotrev

🏠
Working from home
View GitHub Profile

NAS + HTTPS Setup

Intended for UGREEN NASync NAS machines. This precise workflow was used on my own setup.

This guide is good for:

  • Select Linux distros (Arch-based in particular)
  • macOS

While reading this guide, keep in mind that mentions of example.com are placeholder; make sure to add your specific domain when copying commands.

@geotrev
geotrev / try-catch.ts
Created March 20, 2025 14:59 — forked from t3dotgg/try-catch.ts
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@geotrev
geotrev / Apollo-debunk.md
Created June 21, 2023 23:53
Apollo debunking

📣 I want to debunk Reddit’s claims, and talk about their unwillingness to work with developers, moderators, and the larger community, as well as say thank you for all the support

I wanted to address Reddit’s continued, provably false statements, as well as answer some questions from the community, and also just say thanks.

(Before beginning, to the uninitiated, “the Reddit API” is just how apps and tools talk with Reddit to get posts in a subreddit, comments on a post, upvote, reply, etc.)

Reddit: “Developers don’t want to pay”

Steve Huffman on June 15th: “These people who are mad, they’re mad because they used to get something for free, and now it’s going to be not free. And that free comes at the expense of our other users and our business. That’s what this is about. It can’t be free.”

@geotrev
geotrev / post-mirror.md
Last active June 9, 2023 04:20
Reddit - /r/ApolloApp post 6/8/2022 mirror

📣 Apollo will close down on June 30th. Reddit’s recent decisions and actions have unfortunately made it impossible for Apollo to continue. Thank you so, so much for all the support over the years. ❤️

Hey all,

It’s been an amazing run thanks to all of you.

Eight years ago, I posted in the Apple subreddit about a Reddit app I was looking for beta testers for, and my life completely changed that day. I just finished university and an internship at Apple, and wanted to build a Reddit client of my own: a premier, customizable, well-designed Reddit app for iPhone. This fortunately resonated with people immediately, and it’s been my full time job ever since.

Today’s a much sadder post than that initial one eight years ago. June 30th will be Apollo’s last day.

@geotrev
geotrev / eb-feedback-all.js
Last active November 28, 2021 04:49
Script to automatically add feedback to all sales/purchases
/**
* This script will automatically fill in all purchase feedback when viewing the below link.
*
* --> https://www.ebay.com/fdbk/leave_feedback
*
* Why? Leaving feedback is annoying. Let a script do it for you. It takes a basic
* configuration below and assigns 5 stars to everything. You can optionally
* change the feedback text for either a sale or purchase. It also assumes
* you've already left critical feedback for any given sale/purchase BEFORE
* running the script. In other words, it won't skip anything and you should
@geotrev
geotrev / fail.js
Created November 6, 2020 20:29
it's a fail
console.log(
(![] + [])[+[]] +
(![] + [])[+!+[]] +
([![]] + [][[]])[+!+[] + [+[]]] +
(![] + [])[!+[] + !+[]]
);
@geotrev
geotrev / tcg-player-add-card-script.js
Last active May 31, 2020 02:03
Add missing cards to collection
;(() => {
const productRows = document.querySelectorAll('tr[id^="StoreProductId_"]')
productRows.forEach((row) => {
const quantity = row.querySelector(".CollectionText").innerText
const value = row.querySelector('.minPrice').innerText
if (parseInt(quantity) > 0 || value === "$0.00") return
row.querySelector(".CollectionUpArrow").click()
@geotrev
geotrev / live-exp-active-element.js
Last active February 1, 2024 15:23
Active Element Live Expression
/**
* This script recursively checks `shadowRoot`s and `contentDocument`s until the true `activeElement` is found.
*
* HOW TO USE: Copy and paste this into your Chrome dev tools in the `Create live expression` input.
*/
(function(){function d(){var u=arguments[0]||document.activeElement;if(u.shadowRoot&&u.shadowRoot.activeElement){return d(u.shadowRoot.activeElement)}if(u.contentDocument&&u.contentDocument.activeElement){return d(u.contentDocument.activeElement)}return u}return d()})();
/**
Unminified version:
@geotrev
geotrev / tic-tac-toe.js
Last active March 3, 2020 01:26
Tic Tac Toe
class TicTacToe {
constructor() {
this.handleMouseEnter = this.handleMouseEnter.bind(this)
this.handleMouseLeave = this.handleMouseLeave.bind(this)
this.handleClick = this.handleClick.bind(this)
this.handleResetClick = this.handleResetClick.bind(this)
this.tiles = []
this.start()
}