This file contains hidden or 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
| #lang racket | |
| (require 2htdp/image) | |
| (require racket/list/grouping) | |
| ; (run "pocket_screenshots/20230114_103712.png" "gb2-scaled.png") | |
| ; passes any keyword args through to pixelize-image e.g. | |
| ; (run "pocket_screenshots/20230114_103712.png" "gb2-scaled.png" #:subpixel-size 2 #:grid-color "Blue") | |
| (define run | |
| (make-keyword-procedure |
This file contains hidden or 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
| { pkgs, ... }: | |
| let | |
| # disable game mode for mpv | |
| mpv-unwrapped = pkgs.mpv-unwrapped.overrideAttrs (attrs: { | |
| postPatch = (attrs.postPatch or "") + '' | |
| substituteInPlace TOOLS/osxbundle/mpv.app/Contents/Info.plist \ | |
| --replace-fail 'public.app-category.games' 'public.app-category.video' | |
| ''; | |
| }); | |
| mpv-no-game-mode = pkgs.mpv.override { |
This file contains hidden or 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
| // ==UserScript== | |
| // @name CDR insert links | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-02-12_v3 | |
| // @description inject external download links on cdromance | |
| // @author iamevn | |
| // @match https://cdromance.com/* | |
| // @grant GM.xmlHttpRequest | |
| // @connect cdromance.org | |
| // @updateURL http://gist.github.com/iamevn/3afea03de61fa351bcde666f7c6d13f6/raw/cdromance-download-links.user.js |
This file contains hidden or 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
| { 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" ]; |
This file contains hidden or 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/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.
This file contains hidden or 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
| 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: |
This file contains hidden or 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
| Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
This file contains hidden or 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
| 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() |
This file contains hidden or 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: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 |
NewerOlder