Skip to content

Instantly share code, notes, and snippets.

View sweepies's full-sized avatar

Zach sweepies

View GitHub Profile
@sweepies
sweepies / worker.js
Last active January 25, 2021 07:37
conspire cloudflare shim for discord embeds
const template = "<html><head><meta property=\"og:image\" content=\"{PATH}\"></head></html>"
addEventListener('fetch', event => {
let request = event.request
let ua = request.headers.get("User-Agent")
let path = new URL(request.url).pathname
let expr = new RegExp(/.*(png|jpg|jpeg|webp|gif)$/)
// test for user agent and image type
if (ua !== null && ua.includes("Discord") && expr.test(path)) {
Initial Question: Hello, I selected same-day delivery on my order not knowing that it would mean my shipment would not be sent to the post office for pick up if I was not present to receive it. If possible, could I have this shipped via regular prime shipping to my local post office?
11:45 PM PST Agent(Amazon): Hello, my name is Agent. I'm here to help you today.
11:46 PM PST Sweepy: Hello
I'm wondering if I could have this item sent to the post office for pickup
since I wasn't home to receive it
11:47 PM PST Agent: Please give me a moment while I check on the order.
11:47 PM PST Sweepy: Thanks
11:47 PM PST Agent: Is this the Order Id : REDACTED you are referring to?
11:47 PM PST Sweepy: Correct
@sweepies
sweepies / docker-compose-rc.sh
Created March 27, 2019 15:16
Run docker-compose in docker
#!/bin/sh
# Includes release candidate versions
if [ -t 0 ]; then OPTS='-it'; fi
latest=$(curl -s https://registry.hub.docker.com/v2/repositories/docker/compose/tags/ | jq -r '.results[0].name')
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd):$(pwd)" -w "$(pwd)" \
@sweepies
sweepies / rs_redirector.user.js
Last active March 9, 2022 01:10
RuneScape Wiki Redirector
// ==UserScript==
// @name RS Redirector
// @description Redirect from Fandom to new RuneScape Wiki
// @author Sweepyoface
// @run-at document-start
// @match *://runescape.wikia.com/*
// @match *://runescape.fandom.com/*
// ==/UserScript==
if (window.location.pathname.startsWith("/wiki/")) {
[03:00:00] <Hex> Let me tell you all a story.
[03:00:07] <DemonWav> no fuck off
[03:00:14] <Hex> At my university there's a large lecture hall in the physics department.
[03:00:23] <Hex> Over the past year, several things have been stolen from it.
[03:00:29] <Byteflux> Cool story. Thx
[03:00:36] <Hex> First, it was this dinky little computer that everyone used for their presentations.
[03:00:40] <Byteflux> o story not dun
[03:00:43] <Byteflux> welp
[03:00:43] <Hex> Second, it was the room's router.
[03:01:01] <Hex> Third, which was last friday, they tried to steal one of the $2000, high-power projecters.
// A
for (Player p : Bukkit.getOnlinePlayers()) {
if (p.hasPermission("snoopy.getnotified")) {
p.sendMessage(ChatColor.translateAlternateColorCodes('&', message));
}
}
// B
Bukkit.getOnlinePlayers().forEach(p -> {
if (p.hasPermission("snoopy.getnotified")) {
@sweepies
sweepies / bsmc.log
Last active June 19, 2019 17:00
2017-01-22
[08:23:00] <Swag> Is md_5 here?
[08:27:55] *** Quits: Swag (webchat@SpigotMC-9tbh5c.te5j.okvv.6000.2606.IP) (Quit: Web client closed)
[08:37:04] *** Joins: techno156 (~techno156@SpigotMC-5m1.9hs.114.203.IP)
[08:40:17] *** Joins: T0R (webchat@SpigotMC-2d1.ubn.83.212.IP)
[08:40:39] <T0R> Hey, can you check your mail?
[08:43:00] <T0R> I just wrote to you, because i have one problem, thanks.
[08:46:55] *** Quits: Me4502 (webchat@SpigotMC-2bkigm.bigpond.net.au) (Ping timeout: 121 seconds)
[09:02:08] *** Joins: Kainzo (uid15596@SpigotMC-itqueq.hathersage.irccloud.com)
[09:04:16] <md_5> T0R: your email is a joke right?
[09:04:36] <T0R> No, its not.
ffmpeg -y -i file.mov -vf palettegen palette.png
ffmpeg -y -i file.mov -i palette.png -filter_complex paletteuse -r 45 -s 506x808 file.gif

Lightsail & DigitalOcean specs

  • 512MB RAM
  • 1 vCPU
  • 20GB SSD

Vultr specs

  • 768MB RAM
  • 1 vCPU
  • 15GB SSD

Keybase proof

I hereby claim:

  • I am sweepyoface on github.
  • I am sweepyoface (https://keybase.io/sweepyoface) on keybase.
  • I have a public key whose fingerprint is 4DC5 0445 2C19 0A58 7CB2 5EAA 1DB3 EB67 2A25 2E84

To claim this, I am signing this object: