Skip to content

Instantly share code, notes, and snippets.

View ezfe's full-sized avatar

Ezekiel ezfe

View GitHub Profile
// ==UserScript==
// @name Mastodon Direct Follow for 3.5.3
// @match *://*/*
// ==/UserScript==
const domain = "hachyderm.io";
if ([...document.getElementsByTagName("a")].filter(el => el.href.match(/joinmastodon/)).length > 0) {
// Applies to 3.5.3 domains only for now
[...document.querySelectorAll("a.button")].filter(el => (el.innerText == "Follow")).forEach(el => {
const remote_follow_matches = el.href.match(/https?:\/\/.*\/users\/(.*)\/remote_follow/);
if (remote_follow_matches !== null && remote_follow_matches.length == 2) {
@ezfe
ezfe / 1.18.2-arm64.json
Last active October 19, 2022 14:18
1.18.2 on Apple M1
{"id":"1.18.2-arm64","assets":"1.18","javaVersion":{"component":"java-runtime-beta","majorVersion":17},"time":"2022-04-28T02:59:52Z","downloads":{"clientMappings":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/a661c6a55a0600bd391bdbbd6827654c05b2109c\/client.txt","size":6716693,"sha1":"a661c6a55a0600bd391bdbbd6827654c05b2109c"},"client":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/2e9a3e3107cca00d6bc9c97bf7d149cae163ef21\/client.jar","size":20259661,"sha1":"2e9a3e3107cca00d6bc9c97bf7d149cae163ef21"},"server":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/c8f83c5655308435b3dcf03c06d9fe8740a77469\/server.jar","size":46592587,"sha1":"c8f83c5655308435b3dcf03c06d9fe8740a77469"},"serverMappings":{"url":"https:\/\/launcher.mojang.com\/v1\/objects\/e562f588fea155d96291267465dc3323bfe1551b\/server.txt","size":5212964,"sha1":"e562f588fea155d96291267465dc3323bfe1551b"}},"type":"release","libraries":[{"name":"com.mojang:logging:1.0.0","downloads":{"artifact":{"path":"com\/mojang\/logging\/1.0.0\/logging-
import Foundation
import Ink
func tidy(_ inputStr: String) -> String {
let task = Process()
task.launchPath = "/usr/local/Cellar/tidy-html5/5.6.0/bin/tidy"
task.arguments = ["--show-body-only", "yes", "--show-info", "no", "--show-warnings", "no", "--show-errors", "0"]
let input = Pipe()
let output = Pipe()

Keybase proof

I hereby claim:

  • I am ezfe on github.
  • I am ez (https://keybase.io/ez) on keybase.
  • I have a public key whose fingerprint is ED02 02AA 8ECC AE1D 388E B130 5CE1 24A3 3C8C 11BD

To claim this, I am signing this object:

#!/bin/sh
filter='subsystem contains "com.apple.TimeMachine"'
log show --style syslog --info --last 12h --predicate "$filter"
log stream --style syslog --info --predicate "$filter"
@ezfe
ezfe / conversion.md
Last active April 18, 2018 20:49
Conversion

Suppose we have:

PE version a

  • blocks
    • air (default)
    • stone
    • grass
    • reactor

PE version b

@ezfe
ezfe / CKManager.swift
Created August 22, 2016 19:01
ConnectorKit
//
// CKManager.swift
// Connector
//
// Created by Ezekiel Elin on 8/20/16.
// Copyright © 2016 Ezekiel Elin. All rights reserved.
//
import Foundation
import CloudKit
let somelocation = Position(x: 50.5, y: 90.13)
let cat = Sprite(name: "Cat")
cat.contents.addBlock(PressFlag())
cat.contents.addBlock(Say(text: "Hello"))
cat.contents.addBlock(GoTo(location: somelocation))
print(cat)
/*
Sprite[Cat]@(0.0,0.0)
var currentNum = 1
mainLoop: while true {
currentNum += 2
for x in 2..<currentNum where currentNum % x == 0 {
continue mainLoop
}
print(currentNum)
}
ClrAllLists
ClrHome
Prompt N
Prompt A
Prompt B
Input "Y₁=?",Str1
Str1→Y₁
(B-A)/N→H
For(I,1,N)
A+I*H→X