Skip to content

Instantly share code, notes, and snippets.

View compufox's full-sized avatar
🦊
haha focks

compufox

🦊
haha focks
View GitHub Profile
@compufox
compufox / DeleteEmoji.html
Last active September 6, 2018 16:28
a macro for Katalon Recorder that goes through and removes your custom emoji from your mastodon instance
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<title>DelEmoj</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
@compufox
compufox / eshell cursor hack.el
Last active February 20, 2018 04:24
(should) move the cursor to the bottom of an eshell buffer on entering
(defvar *eshell-cursor-moved* nil)
(defun move-eshell-cursor ()
(catch 'set-var
(when (and (string-match "eshell" (buffer-name)) (not *eshell-cursor-moved*))
(progn
(setq *eshell-cursor-moved* t)
(goto-char (point-max))
(throw 'set-var nil)))
(when (and (not (string-match "eshell" (buffer-name))) *eshell-cursor-moved*)
### Keybase proof
I hereby claim:
* I am thezacattacks on github.
* I am thezacattacks (https://keybase.io/thezacattacks) on keybase.
* I have a public key ASDyAM-OjFv3ZBWdwHvhczM8Er-8A4gcBgv-ArWvGJWg1Ao
To claim this, I am signing this object:
@compufox
compufox / Mastodon.REST.Client.addon.rb
Last active May 27, 2017 06:54
a function I tacked onto the Mastodon Ruby Client object to allow for posting really long statuses in one go
def post status, *args
args = args.first if args.first.is_a? Hash # if our arguments contain a hash of params we take them
if status.length > 500 # only ask if the post is /huge/
print "Would you like to split this status into multiple posts?[Y/n]> "
ans = gets.chomp
if ans.downcase == "y" || ans == "" || @always_split_long_posts # if user says yes
num_posts = 1 # we number each post
# and get the length of the spoiler, if one exists