Skip to content

Instantly share code, notes, and snippets.

View iamevn's full-sized avatar

Evan Minsk iamevn

View GitHub Profile
@iamevn
iamevn / cdromance-download-links.user.js
Last active May 15, 2024 17:40
simple userscript to insert download links back into cdromance (you might need to refresh the page if the links break) (click raw link near top right to install)
@iamevn
iamevn / plex.nix
Last active February 15, 2022 00:22
my NixOS Plex module (with a PlexPass overlay)
{ pkgs, ... }:
### Plex Media server
# Uses plexpass version if plexpass.json exists
let
plexpass-overlay = import ./plexpass-overlay.nix;
in {
# Plex is unfree, allow it anyways
imports = [ ./allowed_unfree.nix ];
allowedUnfreePkgs = [ "plexmediaserver" ];
@iamevn
iamevn / scaled_canvas_window.py
Created August 25, 2020 00:20
simple tk canvas to play around with
#/usr/bin/env python3
import tkinter as tk
import random
import threading
from wrapt import synchronized
from typing import Callable, Sequence, Union
class ScaledCanvasWindow:
'''
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def generate_ranges(lower, upper, count, pre=None):
if pre is None:
pre = []
if count > 1:
for i in range(lower, upper):
yield from generate_ranges(lower, upper, count - 1, pre + [i])
elif count == 1:
for i in range(lower, upper):
yield pre + [i]
else:
@iamevn
iamevn / readme.txt
Created April 28, 2020 05:09
Puzzlescript Chess (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@iamevn
iamevn / status.py
Created April 16, 2020 21:08
cloud function to generate basic status page for my server, it's so bad
import re
import googleapiclient.discovery
from google.cloud import logging
from google.cloud.logging import DESCENDING
def get_instance_info(project, zone, instance):
compute = googleapiclient.discovery.build('compute', 'v1')
instances = compute.instances()
instanceInfo = instances.get(project=project, zone=zone, instance=instance).execute()
javascript:var coding = "abcdefghijklmnopqrstuvwxyzabcdefghijklmABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM"; function rot13(t) { for (var r = "",i=0;i<t.length;i++) { character = t.charAt(i); position = coding.indexOf(character); if (position > -1) character = coding.charAt(position + 13); r += character; } return r; } S=window.getSelection(); function t(N) { return N.nodeType == N.TEXT_NODE; } function r(N) { if (t(N)) N.data = rot13(N.data); } for (j=0;j<S.rangeCount;++j) { var g=S.getRangeAt(j), e=g.startContainer, f=g.endContainer, E=g.startOffset, F=g.endOffset, m=(e==f); if(!m||!t(e)) { /* rot13 each text node between e and f, not including e and f. */ q=document.createTreeWalker(g.commonAncestorContainer, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, null, false); q.currentNode=e; for(N=q.nextNode(); N && N != f; N = q.nextNode()) r(N); } if (t(f)) f.splitText(F); if (!m) r(f); if (t(e)) { r(k=e.splitText(E)); if(m)f=k; e=k;} if (t(f)) g.setEnd(f,f.data.length); } void 0
import re
import webbrowser
from tweet import gen_tweet
from tweepy_api import get_api
def last_rt(user, tweet_id):
api = get_api()
timeline = api.user_timeline(user, max_id=tweet_id, count=100)
import webbrowser
from camel import Camel
from dataclasses import dataclass
from typing import List
from tweet import Tweet, gen_tweet
from camel_registry import reg
from find_boops import find_boops